Sending Mail from OS X Server on Verizon FiOS via Gmail
Yes I know this is a lengthy… long… and very specific post title, but I hope it helps someone else in the same predicament.
I have been fighting OS X Server and Verizon FiOS for months. The shortest explanation is that Verizon blocks port 25 (standard SMTP port) and forces you to use port 465 (SMTP via SSL). I’m Ok with that rule, however, no matter how many times I try to use smtp.verizon.net:465 in OS X Server, I would get an error in the /var/log/mail.log stating you must use TLS. When trying to use port 587 to force TLS, I get an operation timeout error. If I switch to use smtp.gmail.com:[25,465,587] I would get black listed b/c Verizon won’t allow SMTP off their FiOS network that does not originate from a verizon SMTP server.
Which leads me to today. I was searching (again) a way to fix this by sending a simple
sendmail email@example.com < filename.txt when I stumbled upon this blog post. The goal of the article is to send TLS mail from postfix on a linux box. While reviewing the commands and comparing to an OS X Server main.cf file (in /Library/Server/Mail/Config/postfix) I noticed a couple key items missing. Unfortunately I took a shotgun approach so I don’t know specifically which line fixed the issue, but here is a copy/paste of the items that I placed at the bottom of my main.cf:
These settings assume that you have configured Mail services to relay to smtp.gmail.com:587 and associated it to a proper Gmail account that can send mail.
Comments are closed. If you have a question concerning the content of this page, please feel free to contact me.
These three lines did the trick for me:
A couple of days ago I received an email stating things were not working again. Doing some more googling I found https://blog.anupamsg.me/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/ and noticed one line was missing in my mods:
since adding this line I can now send mail from my server via these test commands:
(the period on the last line is important)
Thank you, Justin! This is exactly what I needed to get OS X Server Email Alerts working with Gmail!