Personally I go for postfix, but yeah, same thing, if you're just after outbound email, that's the way to do it.
I tried with sendmail but it's too complicated.. <_< <_<
I'm trying postfix now..
I'm trying postfix now..
-_-
This is what I did..
sudo apt-get install postfix
This is my /etc/postfix/main.cf:
Code: [Select]
Then I created the file /etc/mailname with my hostname as content:
tsXXX561.server.topcloud.it
Then I created the file /etc/postfix/sasl_passwd:
Code: [Select]
Then sudo postmap /etc/postfix/sasl/passwd
sudo cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
service postfix restart
Still sends nothing...
This is what I did..
sudo apt-get install postfix
This is my /etc/postfix/main.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=no
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# in myhostname indicate il nome del vostro server. Meglio se gli date un FQDN tipo mioserver.home.local
myhostname = tsXXX561.server.topcloud.it
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
default_transport = smtp
relay_transport = smtp
inet_protocols = all
# SASL Settings
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pemThen I created the file /etc/mailname with my hostname as content:
tsXXX561.server.topcloud.it
Then I created the file /etc/postfix/sasl_passwd:
[smtp.gmail.com]:587 gmail_username@gmail.com:gmail_passwordThen sudo postmap /etc/postfix/sasl/passwd
sudo cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
service postfix restart
Still sends nothing...
I had, for my own sanity, forgotten how fucked up server management can be...
![]() | ...« I say wedge wedge (in the butt) » « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson) |
I had, for my own sanity, forgotten how fucked up server management can be...
![]() | The way it's meant to be |
Especially if they have Suhosin installed, ahah!
![]() | ...« I say wedge wedge (in the butt) » « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson) |
I'm reasonably hardened and can reconfigure Apache for modest needs without referring to the docs, but other stuff like postfix, once I had it set up, I left it firmly alone!
I read a bit of documentation and I managed to setup a server (stock Ubuntu 11.10, which I upgraded to 12.04) with apache2, php5, MySQL, phpmyadmin, enable virtual servers, compile mods for apache.. in 2 days. It's pretty easy. But email servers are fu***ng complex. Sendmail is arabic, postfix is complicated (I set it up, I have no errors but I can't send mails.. I think it's a certificates issue.. gmail requires TLS..). I'm still trying with exim4 (Dragooon gave me a guide I'll try this afternoon).
YEAHHH!! Managed to get exim4 to work (thanks Dragooon for the link)!! :D
I'm using my FQDN.. I gave up on Gmail as a relay for now.. :P
EDIT: Maybe I found the problem with Gmail and exim4.. if it's this is a stupid stupid stupid bug. In my Gmail password I have a $ symbol. In exim 'mainlog' I found these errors:
2012-06-03 14:28:15 xxxxxxxxx == username@gmail.com R=send_via_gmail T=gmail_smtp defer (0): expansion of "my_password_with_$_char" failed in gmail_login authenticator: unknown variable name "part_of_the_password_after_$"
I'm using my FQDN.. I gave up on Gmail as a relay for now.. :P
EDIT: Maybe I found the problem with Gmail and exim4.. if it's this is a stupid stupid stupid bug. In my Gmail password I have a $ symbol. In exim 'mainlog' I found these errors:
2012-06-03 14:28:15 xxxxxxxxx == username@gmail.com R=send_via_gmail T=gmail_smtp defer (0): expansion of "my_password_with_$_char" failed in gmail_login authenticator: unknown variable name "part_of_the_password_after_$"
Is there a way to hide my hostname from the "Received: from" or "envelope-from", etc..?
Are these packages used by exim4 or I can remove 'em?
m4{u} procmail{u} sendmail-base{u} sendmail-cf{u} sensible-mda{u}
m4{u} procmail{u} sendmail-base{u} sendmail-cf{u} sensible-mda{u}
As these packages used by exim4 or I can remove 'em?
m4{u} procmail{u} sendmail-base{u} sendmail-cf{u} sensible-mda{u}
![]() | The way it's meant to be |
Thanks! :)
I noticed a "weird" behavior with CHMOD. I moved my SMF install to my VPS and to get everything to work properly I had to CHMOD 777 /cache, /attachments, /avatars, /mgal_data... Not even 775 was good! With /cache to 775 I got the error that cache folder hadn't the right permissions.. the same for the others.. it's not normal!
Maybe because owner is not root but a user I created to use for FTP?
I noticed a "weird" behavior with CHMOD. I moved my SMF install to my VPS and to get everything to work properly I had to CHMOD 777 /cache, /attachments, /avatars, /mgal_data... Not even 775 was good! With /cache to 775 I got the error that cache folder hadn't the right permissions.. the same for the others.. it's not normal!
Maybe because owner is not root but a user I created to use for FTP?









