Wednesday, 2 May 2012

Setup Postfix to use Gmail as a smarthost

If you wanted Jenkins to send emails via gmail for instance.

 sudo apt-get install mailutils 

 echo > /etc/mailname
 emacs /etc/postfix/

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
html_directory = /usr/share/doc/postfix/html

 emacs /etc/postfix/sasl_passwd # create password file

 postmap hash:/etc/postfix/sasl_passwd
 /etc/init.d/postfix reload

No comments:

Post a Comment