AWG Blogs

Sunday, May 15, 2011

Setup Postfix Ubuntu Gmail SMTP Relay

Refer to

On clean Ubuntu (natty) 11.04 (with ssh and aptitude installed, and as root)

aptitude install postfix libsasl2 ca-certificate libsasl2-modules

During Postfix Configuration Package configuration wizard
On first page, choose "Internet with smarthost"
For SMTP relay host enter: []:587
(brackets are to avoid mx lookups)

paste in /etc/postfix/

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/Equifax_Secure_CA.pem
smtp_use_tls = yes

while still in, add your local IP network to the mynetworks variable

create /etc/postfix/sasl_passwd with the following contents:



chmod 400 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd

/etc/init.d/postfix reload

Now test:

telnet postfixserverip 25
rcpt notify=success,failure
subject:Test from awgtek

This is a test message


check's email to see if message arrived
check for errors in /var/log/mail.log

No comments:

Post a Comment