I am posting this to both ask a few questions but also inform those who are unaware of its existence. I have been experiencing some issues with reliably sending emails from FusionPBX 4.4.10 using Office 365. Most do go but I do have some reports that a fax didn't come through that should have yet there they where in the WebGUI inbox. Well first I looked in Status > Emails and noticed I had quite a few failed emails like 10 pages dating back to 2018. I am running 66 domains, with 338, and 330 destinations so that isn't so bad but I noticed faxes where not showing there. So then I ran some message traces in O365 and found that the faxes reported not being received by the smtp server. This led me to dig further and found that the mailer app stores a log of the last sent email
Next I noticed
/tmp/mailer-app.log
which when a email does fail it reads:
Code:
SMTP -> FROM SERVER:220 2.0.0 SMTP server ready
SMTP -> FROM SERVER:
SMTP -> ERROR: RSET failed:
SMTP -> NOTICE:
EOF caught while checking if connectedThe following From address failed: no-reply@domain.com
Mailer Error: The following From address failed: no-reply@domain.com
Retained in v_emails
Next I noticed
/tmp/fax_to_email.log
which is the same as the mailer app log file and /tmp/failed_fax_emails.sh
. That bash script was very interesting, it takes /var/lib/freeswitch/storage/fax/failed_fax_emails.log
and moves it to /tmp/fax_email_retry.sh
and then executes it. In /var/lib/freeswitch/storage/fax/failed_fax_emails.log
I found every failed fax email attempt since 2018 when I built this server. So the question becomes if we are keeping track of this in that file why is /tmp/failed_fax_emails.sh
not entered into cron? Is there a reason I shouldn't just run this script every hour to ensure my faxes are going out? Additionally is there a similar script hiding somewhere for the emails in Status > Emails. And if anyone knows why phpmailer is failing sometimes in the first place, and clues would be much appreciated. Hopefully someone reading this didn't know about some of this and it will be helpful and hopefully I wasn't the only one who didn't know this stuff was here