Skip to content

Instantly share code, notes, and snippets.

@cheleb
Last active August 29, 2015 14:12
Show Gist options
  • Save cheleb/71adb8d8cb9adadd695a to your computer and use it in GitHub Desktop.
Save cheleb/71adb8d8cb9adadd695a to your computer and use it in GitHub Desktop.
postfix / macosx

Create or modify this files:

  • /System/Library/LaunchDaemons/org.postfix.master.plist to create (or modify) This is the launchctl file.
  • /etc/postfix/main.cf to append to. This id the postfix configuration file.
  • /etc/postfix/sasl_passwd to create or modify This the sasl password file that must be filled with your google application password settings.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.postfix.master</string>
<key>Program</key>
<string>/usr/libexec/postfix/master</string>
<key>ProgramArguments</key>
<array>
<string>master</string>
</array>
<key>QueueDirectories</key>
<array>
<string>/var/spool/postfix/maildrop</string>
</array>
<key>AbandonProcessGroup</key>
<true/>
<key>OnDemand</key>
<true/>
</dict>
</plist>
#Gmail SMTP
relayhost=[smtp.gmail.com]:587
# SASL SUPPORT FOR SERVERS
#
# The following options set parameters needed by Postfix to enable
# Cyrus-SASL support for authentication of mail servers.
#
smtp_sasl_mechanism_filter = plain
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
[smtp.gmail.com]:587 [email protected]:your_application_password
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd
launchctl unload /System/Library/LaunchDaemons/org.postfix.master.plist
launchctl load /System/Library/LaunchDaemons/org.postfix.master.plist
launchctl stop org.postfix.master
launchctl start org.postfix.master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment