Skip to content

Instantly share code, notes, and snippets.

@mondalaci
Created April 4, 2013 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mondalaci/5306840 to your computer and use it in GitHub Desktop.
Save mondalaci/5306840 to your computer and use it in GitHub Desktop.
SMTP relaying with Postfix through GMail
cat << END >> /etc/postfix/main.cf
smtp_sasl_auth_enable = yes
smtp_use_tls = yes
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
relayhost = smtp.gmail.com
END
echo "smtp.gmail.com youraccount@gmail.com:yourpassword" >> /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
/etc/init.d/postfix restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment