Email issue

Hi all
I already added email module and tried to config it by built in SMTP and also External SMTP server, but both don’t work on my Freepbx 16.
Please have a look at the debug log and let me know what did I wrong?
Much appreciated in advance for your time.

Nov 24 12:25:57 mphone1 postfix/pickup[3908]: 0CF65128C5C8: uid=999 from=
Nov 24 12:25:57 mphone1 postfix/cleanup[3968]: 0CF65128C5C8: message-id=[email protected]
Nov 24 12:25:57 mphone1 postfix/qmgr[1508]: 0CF65128C5C8: from=[email protected], size=471, nrcpt=1 (queue active)
Nov 24 12:25:57 mphone1 postfix/smtp[3970]: warning: database /etc/postfix/generic.db is older than source file /etc/postfix/generic
Nov 24 12:25:59 mphone1 postfix/smtp[3970]: 0CF65128C5C8: SASL authentication failed; server smtp.gmail.com[2404:6800:4003:c11::6c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help g74-20020a62524d000000b0056abff42a8bsm13293045pfb.69 - gsmtp
Nov 24 12:26:02 mphone1 postfix/smtp[3970]: 0CF65128C5C8: to=[email protected], relay=smtp.gmail.com[142.251.12.108]:587, delay=5.8, delays=0.11/0.2/5.5/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp.gmail.com[142.251.12.108] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help n5-20020a63f805000000b0046f1cbd2631sm2503pgh.50 - gsmtp)
Nov 24 12:26:04 mphone1 postfix/postsuper[4015]: Deleted: 3 messages
Nov 24 12:26:07 mphone1 postfix/pickup[3908]: D42351254395: uid=0 from=[email protected]
Nov 24 12:26:07 mphone1 postfix/cleanup[3968]: D42351254395: message-id=[email protected]
Nov 24 12:26:07 mphone1 postfix/qmgr[1508]: D42351254395: from=[email protected], size=521, nrcpt=1 (queue active)
Nov 24 12:26:07 mphone1 postfix/pickup[3908]: D94681255995: uid=0 from=[email protected]
Nov 24 12:26:07 mphone1 postfix/cleanup[3968]: D94681255995: message-id=[email protected]
Nov 24 12:26:07 mphone1 postfix/qmgr[1508]: D94681255995: from=[email protected], size=519, nrcpt=1 (queue active)
Nov 24 12:26:07 mphone1 postfix/smtp[4047]: warning: database /etc/postfix/generic.db is older than source file /etc/postfix/generic
Nov 24 12:26:07 mphone1 postfix/pickup[3908]: E09231255997: uid=0 from=[email protected]
Nov 24 12:26:07 mphone1 postfix/cleanup[3968]: E09231255997: message-id=[email protected]
Nov 24 12:26:07 mphone1 postfix/qmgr[1508]: E09231255997: from=[email protected], size=521, nrcpt=1 (queue active)
Nov 24 12:26:07 mphone1 postfix/smtp[4062]: warning: database /etc/postfix/generic.db is older than source file /etc/postfix/generic
Nov 24 12:26:07 mphone1 postfix/pickup[3908]: E7981128C5C8: uid=0 from=[email protected]
Nov 24 12:26:07 mphone1 postfix/cleanup[3968]: E7981128C5C8: message-id=[email protected]
Nov 24 12:26:07 mphone1 postfix/qmgr[1508]: E7981128C5C8: from=[email protected], size=521, nrcpt=1 (queue active)
Nov 24 12:26:07 mphone1 postfix/smtp[4077]: warning: database /etc/postfix/generic.db is older than source file /etc/postfix/generic
Nov 24 12:26:07 mphone1 postfix/pickup[3908]: EEAFF128C5CA: uid=0 from=[email protected]
Nov 24 12:26:07 mphone1 postfix/cleanup[3968]: EEAFF128C5CA: message-id=[email protected]
Nov 24 12:26:07 mphone1 postfix/qmgr[1508]: EEAFF128C5CA: from=[email protected], size=521, nrcpt=1 (queue active)
Nov 24 12:26:07 mphone1 postfix/smtp[4089]: warning: database /etc/postfix/generic.db is older than source file /etc/postfix/generic
Nov 24 12:26:10 mphone1 postfix/smtp[4062]: E09231255997: SASL authentication failed; server smtp.gmail.com[2404:6800:4003:c11::6c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help 12-20020a170902c20c00b00172f6726d8esm14745704pll.277 - gsmtp
Nov 24 12:26:10 mphone1 postfix/smtp[4047]: D94681255995: SASL authentication failed; server smtp.gmail.com[2404:6800:4003:c11::6c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help z10-20020a170903018a00b00186b945c0d1sm15171944plg.2 - gsmtp
Nov 24 12:26:10 mphone1 postfix/smtp[3970]: D42351254395: SASL authentication failed; server smtp.gmail.com[2404:6800:4003:c11::6c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help a14-20020a1709027e4e00b00186a6b6350esm14814393pln.268 - gsmtp
Nov 24 12:26:10 mphone1 postfix/smtp[4077]: E7981128C5C8: SASL authentication failed; server smtp.gmail.com[2404:6800:4003:c11::6c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help f1-20020a170902ce8100b0017f592a7eccsm14983645plg.298 - gsmtp
Nov 24 12:26:11 mphone1 postfix/smtp[4089]: EEAFF128C5CA: SASL authentication failed; server smtp.gmail.com[142.251.12.109] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help b8-20020a17090a6e0800b002130ad34d24sm2064011pjk.4 - gsmtp
Nov 24 12:26:12 mphone1 postfix/smtp[4062]: E09231255997: to=[email protected], relay=smtp.gmail.com[142.251.12.108]:587, delay=4.7, delays=0.01/0.01/4.7/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp.gmail.com[142.251.12.108] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help s1-20020a170902c64100b00188f0c641easm14731682pls.225 - gsmtp)
Nov 24 12:26:12 mphone1 postfix/smtp[4047]: D94681255995: to=[email protected], relay=smtp.gmail.com[142.251.12.109]:587, delay=4.8, delays=0.01/0.01/4.7/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp.gmail.com[142.251.12.109] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help j3-20020a170902da8300b001867fb4056asm3765170plx.32 - gsmtp)
Nov 24 12:26:12 mphone1 postfix/smtp[3970]: D42351254395: to=[email protected], relay=smtp.gmail.com[142.251.12.108]:587, delay=4.9, delays=0.01/0/4.9/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp.gmail.com[142.251.12.108] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help i6-20020a170902c94600b00172e19c5f8bsm15108765pla.168 - gsmtp)
Nov 24 12:26:12 mphone1 postfix/smtp[4077]: E7981128C5C8: to=[email protected], relay=smtp.gmail.com[142.251.12.108]:587, delay=4.9, delays=0.01/0.01/4.9/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp.gmail.com[142.251.12.108] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help b7-20020a170902d50700b0017c37a5a2fdsm15002179plg.216 - gsmtp)
Nov 24 12:26:13 mphone1 postfix/smtp[4089]: EEAFF128C5CA: to=[email protected], relay=smtp.gmail.com[2404:6800:4003:c11::6c]:587, delay=5.7, delays=0.01/0.01/5.6/0, dsn=4.7.8, status=deferred (SASL authentication failed; server smtp.gmail.com[2404:6800:4003:c11::6c] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help t7-20020a17090a6a0700b00208c58d5a0esm2021200pjj.40 - gsmtp)
Nov 24 12:27:26 mphone1 postfix/pickup[3908]: 8284D128C5CC: uid=999 from=
Nov 24 12:27:26 mphone1 postfix/cleanup[3968]: 8284D128C5CC: message-id=[email protected]
Nov 24 12:27:26 mphone1 postfix/qmgr[1508]: 8284D128C5CC: from=[email protected], size=471, nrcpt=1 (queue active)
Nov 24 12:27:26 mphone1 postfix/error[4420]: 8284D128C5CC: to=[email protected], relay=none, delay=0.01, delays=0/0.01/0/0, dsn=4.7.8, status=deferred (delivery temporarily suspended: SASL authentication failed; server smtp.gmail.com[142.251.12.108] said: 535-5.7.8 Username and Password not accepted. Learn more at?535 5.7.8 Check Gmail through other email platforms - Gmail Help i6-20020a170902c94600b00172e19c5f8bsm15108765pla.168 - gsmtp)

ActivationDNSDDNSEmail SetupProvisioning ProtocolsIntrusion DetectionNetwork SettingsDHCP ServerHostnameNotifications SettingsPacket CapturePower OptionsPort ManagementPnP ConfigurationHTTPS SetupTime ZoneStorageSupportUPS ServerSupport VPNVPN Server


Did you ‘postmap’ any changes you made in any config files and then reload postfix?

It was not working from the beginning. I have email notifications on my ver13, but from the time that I installed ver16, I couldn’t make it working.
Is there anything that I missed?

Apparently, but I can’t tell you what you missed :wink:

hahaha why? is that secret? come on I know you are the GOD of freepbx

Thanks for that, but I already followed this document.
Also mine even doesn’t work with the built-in one, so it might be some issues somewhere :frowning:

This is what I have on end of the main.cf in postfix :
Do I need to change anything?:

readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES

smtp_use_tls= yes

smtp_generic_maps = hash:/etc/postfix/generic

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
smtp_use_tls = yes
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
relayhost = smtp.gmail.com:587
myhostname = mphone1.andatech.com.au
mydomain = andatech.com.au
myorigin = mphone1.andatech.com.au

relayhost = smtp-relay.gmail.com:587

Thanks mate for looking at this. I changed it but still seems it doesn’t go through

Nov 24 14:05:43 mphone1 postfix/pickup[30354]: 220A01254395: uid=999 from=
Nov 24 14:05:43 mphone1 postfix/cleanup[30360]: 220A01254395: message-id=[email protected]
Nov 24 14:05:43 mphone1 postfix/qmgr[30355]: 220A01254395: from=[email protected], size=471, nrcpt=1 (queue active)
Nov 24 14:05:45 mphone1 postfix/smtp[30357]: 220A01254395: to=[email protected], relay=smtp-relay.gmail.com[2404:6800:4003:c04::1c]:587, delay=2.8, delays=0/0/2.5/0.32, dsn=5.7.1, status=bounced (host smtp-relay.gmail.com[2404:6800:4003:c04::1c] said: 550-5.7.1 Invalid credentials for relay [2401:c080:2000:2362:5400:4ff:fe1d:9b07] 550-5.7.1 . The IP address you’ve registered in your G Suite SMTP Relay service 550-5.7.1 doesn’t match domain of the account this email is being sent from. If 550-5.7.1 you are trying to relay mail from a domain that isn’t registered 550-5.7.1 under your G Suite account or has empty envelope-from, you must 550-5.7.1 configure your mail server either to use SMTP AUTH to identify the 550-5.7.1 sending domain or to present one of your domain names in the HELO or 550-5.7.1 EHLO command. For more information, please visit 550 5.7.1 SMTP relay service error messages - Google Workspace Admin Help y31-20020a056870b49f00b0013b0f5f6c6csm4799oap.22 - gsmtp (in reply to MAIL FROM command))
Nov 24 14:05:45 mphone1 postfix/smtp[30357]: 220A01254395: lost connection with smtp-relay.gmail.com[2404:6800:4003:c04::1c] while sending RCPT TO
Nov 24 14:05:45 mphone1 postfix/cleanup[30360]: EE3E11255995: message-id=[email protected]
Nov 24 14:05:45 mphone1 postfix/qmgr[30355]: EE3E11255995: from=<>, size=3967, nrcpt=1 (queue active)
Nov 24 14:05:45 mphone1 postfix/bounce[30359]: 220A01254395: sender non-delivery notification: EE3E11255995
Nov 24 14:05:45 mphone1 postfix/qmgr[30355]: 220A01254395: removed
Nov 24 14:05:45 mphone1 postfix/local[32618]: EE3E11255995: to=[email protected], relay=local, delay=0, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Nov 24 14:05:45 mphone1 postfix/qmgr[30355]: EE3E11255995: removed

I’m guessing that your Gmail account doesn’t allow you to send from the anandtech address. Try sending from a Gmail or other address that you know works with your account.

even though when I set it on the built-in smtp, it shows the same error!!

Also here in the log, it shows that status is bounced, I don’t really get why it’s still trying to use relay=smtp-relay.gmail.com