-
Create a file to store our credentials:
sudo vim /etc/postfix/sasl_passwd
-
Add something like this:
smtp.gmail.com:587 [email protected]:password
-
Now run:
sudo postmap /etc/postfix/sasl_passwd
-
Prepare the postfix main config file:
sudo vim /etc/postfix/main.cf
-
Add/update these lines
relayhost=smtp.gmail.com:587 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_use_tls=yes smtp_tls_security_level=encrypt tls_random_source=dev:/dev/urandom smtp_sasl_security_options = noanonymous smtp_always_send_ehlo = yes smtp_sasl_mechanism_filter = plain
-
Stop/Start the service
sudo postfix stop && sudo postfix start
-
Check the queue for any errors
mailq
-
-
Save djromero/ca9598a625ef4779d50c33511f2d7301 to your computer and use it in GitHub Desktop.
Setup SENDMAIL on Mac OSX Yosemite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment