Freepbx 17 email not sending SASL authentication failed

Restored a freepbx15 backup to new install of freepbx17, I got everything working except email.

The debug log shows The debug shows SASL authentication failed; server mail.companyname.com[162.123.123.456] said: 535 Incorrect authentication data

I did a nearly identical system upgrade on another system and the email works fine from there.

It’s an imap server so there are no app passwords. I reentered the password but still get this error. What should I look for next.

The setup script doesn’t install required SASL modules for postfix.

apt-get install libsasl2-modules libsasl2-modules-db sasl2-bin

I just installed that and ran systemctl reload postfix and tried to send another email and get the same error.

root@phonesystem:/# apt-get install libsasl2-modules libsasl2-modules-db sasl2-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libsasl2-modules is already the newest version (2.1.28+dfsg-10).
libsasl2-modules-db is already the newest version (2.1.28+dfsg-10).
libsasl2-modules-db set to manually installed.
The following NEW packages will be installed:
  db-util db5.3-util sasl2-bin
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 179 kB of archives.
After this operation, 736 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 db5.3-util amd64 5.3.28+dfsg2-1 [64.0 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 db-util all 5.3.2 [2,176 B]
Get:3 http://deb.debian.org/debian bookworm/main amd64 sasl2-bin amd64 2.1.28+dfsg-10 [112 kB]
Fetched 179 kB in 0s (882 kB/s)
Preconfiguring packages ...
Selecting previously unselected package db5.3-util.
(Reading database ... 168835 files and directories currently installed.)
Preparing to unpack .../db5.3-util_5.3.28+dfsg2-1_amd64.deb ...
Unpacking db5.3-util (5.3.28+dfsg2-1) ...
Selecting previously unselected package db-util.
Preparing to unpack .../archives/db-util_5.3.2_all.deb ...
Unpacking db-util (5.3.2) ...
Selecting previously unselected package sasl2-bin.
Preparing to unpack .../sasl2-bin_2.1.28+dfsg-10_amd64.deb ...
Unpacking sasl2-bin (2.1.28+dfsg-10) ...
Setting up db5.3-util (5.3.28+dfsg2-1) ...
Setting up db-util (5.3.2) ...
Setting up sasl2-bin (2.1.28+dfsg-10) ...
Processing triggers for man-db (2.11.2-2) ...
root@phonesystem:/# systemctl reload postfix

I restarted the pbx and it’s still not sending emails. What’s the next step to troubleshoot?

Who’s the email provider? Perhaps engage their support?