Gmail relay

Using gmail as a relay

apt-get install libsasl2-2 ca-certificates libsasl2-modules
Add this to /etc/postfix/

# use gmail as a relay
relayhost = []:587
smtp_use_tls = yes
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

Add something like this to /etc/postfix/sasl_passwd

postmap /etc/postfix/sasl_passwd
chown 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db


To get relay working add domain name to mynetworks

mynetworks =,, solar.lan,

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.