We encountered a problem on our Asterisk/FreePBX system where voicemail emails weren’t being delivered.
After digging around in the logs, I found errors resembling this: ( /var/log/maillog )
Apr 25 13:03:35 localhost postfix/smtp[27048]: 8788E1A0B8C0: to=
I was unsure why this was happening, nothing changed on our end.
It seemed google had an open relay, and either by default, or previous administrator, an outdated FreePBX system I was working on was configured to use gmail.com as a relay for all email. It looks like google shut down this open relay, so a user+password was required. where previously it wasn’t.
After searching the postfix configs, I came across main.cf and found the line that said “relayhost = smtp.gmail.com:587” and commented it out with a hash (#).
A quick # service postfix restart and emails were coming through again.
I wrote a quick script to send off all of the mails that were already there.
email.php – script to email old voicemails to an email address.
Copy this file to /var/spool/asterisk/voicemail/device/{EXTN}/INBOX folder, modify the config variables and run.
View this file in browser: FreePBX Voicemail to Email Sender
Update! This file is now working, sincere apologize to anyone who previously tried to access this file 🙁
Leave a Reply