Can't Send email via Gmail

Hello
I’m using System Admin Pro and my Gmail account to send voicemail notifications. I’m not receiving any notifications. I can ping both alt1.gmail-smtp-in.l.google.com & alt2.gmail-smtp-in.l.google.com.
My ISP is Rogers (in Toronto).
I’ve validated my sent address is active.
What steps do I need to take to resolve this issue.
Please see below for a print out of a test email sent from FreePBX to [email protected]

Apr 15 08:08:35 localhost postfix/qmgr[19342]: 2DA5321BDB: from=[email protected], size=1987, nrcpt=1 (queue active)
Apr 15 08:08:35 localhost postfix/qmgr[19342]: 2200B21E03: from=[email protected], size=502, nrcpt=1 (queue active)
Apr 15 08:08:35 localhost postfix/smtp[22526]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c02::1b]:25: Network is unreachable
Apr 15 08:09:05 localhost postfix/smtp[22527]: connect to mx.easymail.ca[64.68.200.59]:25: Connection timed out
Apr 15 08:09:05 localhost postfix/smtp[22526]: connect to gmail-smtp-in.l.google.com[209.85.201.27]:25: Connection timed out
Apr 15 08:09:05 localhost postfix/smtp[22526]: connect to alt1.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1a]:25: Network is unreachable
Apr 15 08:09:05 localhost postfix/smtp[22527]: 2200B21E03: to=[email protected], relay=none, delay=34139, delays=34109/0.11/30/0, dsn=4.4.1, status=deferred (connect to mx.easymail.ca[64.68.200.59]:25: Connection timed out)
Apr 15 08:09:35 localhost postfix/smtp[22526]: connect to alt1.gmail-smtp-in.l.google.com[64.233.186.27]:25: Connection timed out
Apr 15 08:09:35 localhost postfix/smtp[22526]: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400b:c02::1b]:25: Network is unreachable
Apr 15 08:09:35 localhost postfix/smtp[22526]: 2DA5321BDB: to=[email protected], relay=none, delay=55218, delays=55157/0.06/61/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400b:c02::1b]:25: Network is unreachable)
Apr 15 08:21:48 localhost postfix/pickup[14182]: 0BE8721BEF: uid=498 from=
Apr 15 08:21:48 localhost postfix/cleanup[24137]: 0BE8721BEF: message-id=[email protected]
Apr 15 08:21:48 localhost postfix/qmgr[19342]: 0BE8721BEF: from=[email protected], size=502, nrcpt=1 (queue active)

network issues maybe

Hello
Thanks for the response.
I can ping 64.233.186.27
Could Rogers (my ISP) by blocking port 25? If so, then where in FreePBX do I change this to a different port?

I’m not sure you can edit the port using FreePBX. I believe you have to edit the postfix config at /etc/postfix/main.cf

Gmail is working for me using this configuration (Port 587)

relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtpd_sasl_path = smtpd
smtp_sasl_type = cyrus
smtp_sasl_tls_security_options = noanonymous
smtp_use_tls = yes
smtp_tls_CAfile = /usr/share/ncat/ca-bundle.crt

1 Like

You are being filtered by your ISP. If you are running FreePBX Distro with Sysadmin, you can enable TLS Email transport through the Sysadmin module. Otherwise, you’ll need to manually configure your postfix.conf to send email via TLS, as @necits2015 has said. I haven’t tested that configuration, but it looks legitimate.

Hello
I’ve made the correct changes to “main.cf” however I still get an error.

relay=smtp.gmail.com[173.194.205.109]:587, delay=1.9, delays=0.17/0.05/1.7/0, dsn=4.7.9, status=deferred (SASL authentication failed; server smtp.gmail.com[173.194.205.109] said: 534-5.7.9 Application-specific password required. Learn more at?534 5.7.9 https://support.google.com/accounts/answer/185833 u102sm21435662qge.27 - gsmtp)

What does “application-specific password required” mean?

Google provided you a link that fully explains this in the error message. In fact our forums ended up relinking it. I suggest you click the link in your error log to learn what that means.

1 Like

Any numbers of answers to that, specifically

“SASL authentication failed”

is just one solution, they are all much the same.

If your network don’t properly route ipv6 then ignore the:-

Apr 15 08:08:35 localhost postfix/smtp[22526]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400d:c02::1b]:25: Network is unreachable

like stuff and possibly think about disabling ipv6 on your server

Dicko

The link you provided will lead him on a wild goose chase. All he has to do is follow the link Google provided to him

Specifically he needs an app specific password. The article you provided is pre app specific passwords.

Hello
I’ve followed the instructions provided by Google to Turn Off and On App Specific Passwords. Either way I’m still getting this error messge: "Apr 17 15:25:12 localhost postfix/smtp[22711]: 062A121A48: to=[email protected], relay=smtp.gmail.com[209.85.144.108]:587, delay=0.64, delays=0.17/0.05/0.37/0.04, dsn=5.5.1, status=bounced (host smtp.gmail.com[209.85.144.108] said: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 https://support.google.com/mail/answer/14257 g186sm5494210qke.49 - gsmtp (in reply to MAIL FROM command))"
Andrew, do you have any current documentation and how to enable this in Google? I seem to find a number of google pages that speak of the “App Specific Passwords” but I’m confused about whether I’ve followed them correctly.
As an FYI I’m wondering if it would be a good idea to have a button in the FreePBX GUI that would return postfix to it’s original default settings. If people (such as myself) start mucking about with the main.cf file, they may have accidentally changed a setting. Just a thought.
Again to thanks to everyone who’s responded to my posts. Any further help would be greatly appreciated or links to documentation that out lines the steps required to solve my issue.

That’s a different error message.

Did you run?postmap /etc/postfix/sasl_passwd
After you modified the sasl_password file? Not sure if FreePBX does this automatically or not.

I’ve just done some changes to Sysadmin, and released 13.0.52 where I have thoroughly tested sending email through gmail.

Feel free to download Sysadmin through edge mode and try it out. (From the command line you can do fwconsole --edge ma downloadinstall sysadmin to get 13.0.52, before it’s released for General Availability)

1 Like

Hi Rob
Thanks for the update. I’m currently running 10.13.66-11. Can I jump from this to 13.0.52?

Michael

Thanks
I ran the command postmap /etc/postfix/sasl_passwd and didn’t experience any improvement. Any other ideas? Are there changes I need to make within my gmail account?
Michael

Rob
Please ignore my previous message; I was quoting the wrong numbers. I’ve successfully installed the update and will need to do a bit of reading in order to figure out how to use the new settings.
Michael

Rob
Congratulations!
This is a test email from your FreePBX Phone System, please do not respond to this message.

I also left a VM message and it was sent successfully via the Gmail SMTP server.
Thanks again for the help.
Michael

2 Likes