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.
OverviewPermalink
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.
SolutionPermalink
Which leads me to today. I was searching (again) a way to fix this by sending a simple sendmail user@domain.tld < 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:
#### Added by jbr 2014-07-08
smtp_connection_cache_destinations = smtp.gmail.com
relay_destination_concurrency_limit = 1
default_destination_concurrency_limit = 5
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_tls_scert_verifydepth = 5
smtpd_tls_req_ccert =no
smtpd_tls_ask_ccert = yes
soft_bounce = yes
NotePermalink
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.
SourcePermalink
Comments are closed. If you have a question concerning the content of this page, please feel free to contact me.
Comments
Bijesh
These three lines did the trick for me:
Justin
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)
clarkeee
Thank you, Justin! This is exactly what I needed to get OS X Server Email Alerts working with Gmail!