Last active
August 29, 2015 14:16
-
-
Save delputnam/71b11fb750310f3e57b3 to your computer and use it in GitHub Desktop.
Set up postfix (on Mac OS X 10.10 Yosemite) with Google Apps smtp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vim /etc/postfix/main.cf | |
Add the following to the 'relayhost' section: | |
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_use_tls = yes | |
smtp_sasl_mechanism_filter = plain | |
$ sudo vi /etc/postfix/sasl_passwd | |
Add the following line: | |
[smtp.gmail.com]:587 [email protected]:yourpassword | |
$ sudo chmod 600 /etc/postfix/sasl_passwd | |
$ sudo postmap /etc/postfix/sasl_passwd | |
$ sudo launchctl stop org.postfix.master | |
$ sudo launchctl start org.postfix.master | |
Then test with something like: | |
$ mail -s "This is a test" [email protected] <<EOF | |
> This is just a test. | |
> EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment