Skip to content

Instantly share code, notes, and snippets.

@ideaoforder
Last active July 30, 2017 18:23
Show Gist options
  • Save ideaoforder/02a89b20e457782f4013 to your computer and use it in GitHub Desktop.
Save ideaoforder/02a89b20e457782f4013 to your computer and use it in GitHub Desktop.
Postfix Gmail Relay (to circumvent Comcast blocking port 25)

sudo nano /etc/postfix/main.cf

Add this to bottom of file

# Gmail SMTP
relayhost=[smtp.gmail.com]:587
smtp_tls_loglevel=1
smtp_tls_security_level=encrypt
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/saslpasswd
smtp_sasl_security_options=noanonymous

sudo nano /etc/postfix/saslpasswd

[smtp.gmail.com]:587 [email protected]:my password

sudo postmap /etc/postfix/saslpasswd

sudo postfix reload (or restart)

Reference:

http://www.developerfiles.com/how-to-send-smtp-mails-with-postfix-mac-os-x-10-8/ http://pastebin.com/NzxiGJqw

@vgkids
Copy link

vgkids commented Apr 16, 2015

I finally fixed this!

When you posted it I found that I already had the relayhost setup so I didn't follow any further.

I came back fresh and once I hit that postmap feature– BAM! Back in business!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment