Question
How I do for use postfix with relay from gmail?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×/etc/postfix/main.cf
file to include:
relayhost = [smtp.gmail.com]:587 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 = yesThen you need to set your gmail password and address in
/etc/postfix/sasl_passwd
like so:
[smtp.gmail.com]:587 user@gmail.com:PASSWORDNow make sure it's permissions are correct and update it with:
sudo chmod 400 /etc/postfix/sasl_passwd sudo postmap /etc/postfix/sasl_passwdAnd finally, restart postfix with:
sudo service postfix restartIn your specific case, since you can't telnet to
smtp.gmail.com
it sounds like you might have your SMTP port blocked. This happens in some specific cases in order to fight against spam. Please open a support ticket, and the team should be able to help you get that fixed:
https://cloud.digitalocean.com/supportSame problem with me. Tryed a lot of firewall configurations, even the more
permissive ones and could not telnet smtp.google.com
Will try to open a support ticket.