Elastix Voicemail to Email not working
I was trying to configure my Elastix voicemail to send voicemail on Email. but the email was not being delivered to the my email address. I had configured properly my remote SMTP under mail configuration. I was able to send email from my elastix mail system and emails was being delivered to my email address.
But Voice mail was not being delivered to users email address.
I started troubleshooting I checked the log
tail -f /var/log/maillog
I found below error message
Apr 16 01:29:26 localhost postfix/qmgr: 6B600C90A91: from=<firstname.lastname@example.org>, size=813, nrcpt=1 (queue active)
Apr 16 01:29:49 localhost postfix/smtp: 6B600C90A91: to=<email@example.com>, relay=gkhan.in[126.96.36.199]:25, delay=23, delays=0.02/0.01/22/0.33, dsn=5.0.0, status=bounced (host gkhan.in[188.8.131.52] said: 550-Verification failed for <firstname.lastname@example.org> 550-The mail server could not deliver mail to email@example.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries. 550 Sender verify failed (in reply to RCPT TO command))
Apr 16 01:29:49 localhost postfix/cleanup: 7537CC90A92: message-id=<20160415222949.7537CC90A92@pockw.localdomain>
Apr 16 01:29:49 localhost postfix/qmgr: 7537CC90A92: from=<>, size=3184, nrcpt=1 (queue active)
Apr 16 01:29:49 localhost postfix/bounce: 6B600C90A91: sender non-delivery notification: 7537CC90A92
The problem was firstname.lastname@example.org which was sending voicemail to email it was not a proper email address and it was not being resolved by the DNS server as pockw.localdomain was my server host name .
I found below article
As it says
in freepbx gui set serveremail in voicemail admin > settings to email@example.com
Above point I did not find in freepbx setting so I left that. and followed the next point.
a. uncommented mydomain paramater in INTERNET HOST AND DOMAIN NAMES section
b. set mydomain = mydomainname.com
service postfix restart
accounts set to email voicemails as attachments are now receiving emails from firstname.lastname@example.org
Is it a bug that the postfix setting has to be manually changed?
Thats work for me it just changed the sender email address from email@example.com to firstname.lastname@example.org but still mail was not being delivered.
Now I was getting below messge.
Apr 16 02:18:24 localhost postfix/cleanup: 143F1C90A91: message-id=<Asterisk-6-1160313698-111-2974@pockw>
Apr 16 02:18:24 localhost postfix/qmgr: 143F1C90A91: from=<email@example.com>, size=55680, nrcpt=1 (queue active)
Apr 16 02:18:46 localhost postfix/smtp: 143F1C90A91: to=<firstname.lastname@example.org>, relay=gkhan.in[184.108.40.206]:25, delay=23, delays=0.03/0.01/22/0.35, dsn=5.0.0, status=bounced (host gkhan.in[220.127.116.11] said: 550-Verification failed for <email@example.com> 550-No Such User Here 550 Sender verify failed (in reply to RCPT TO command))
Apr 16 02:18:47 localhost postfix/cleanup: 37D98C90A92: message-id=<20160415231847.37D98C90A92@pockw.gkhan.in>
Apr 16 02:18:47 localhost postfix/qmgr: 37D98C90A92: from=<>, size=2515, nrcpt=1 (queue active)
Apr 16 02:18:47 localhost postfix/bounce: 143F1C90A91: sender non-delivery notification: 37D98C90A92
To resolve the issue I did the following .
I created a sub domain pockw.gkhan.in and created a mx record pointed to gkhan.in mx record and created a email id user under pockw.gkhan.in as firstname.lastname@example.org .
Note :- All above i did it on my Domain Cpanel .
Now the mails was being delivered successfully.
Apr 16 20:34:56 localhost postfix/cleanup: 66C17C90A91: message-id=<Asterisk-9-1233714121-111-2974@pockw>
Apr 16 20:34:56 localhost postfix/qmgr: 66C17C90A91: from=<email@example.com>, size=72822, nrcpt=1 (queue active)
Apr 16 20:35:21 localhost postfix/smtp: 66C17C90A91: to=<firstname.lastname@example.org>, relay=gkhan.in[18.104.22.168]:25, delay=25, delays=0.03/0.01/23/2.1, dsn=2.0.0, status=sent (250 OK id=1arU7o-0003I6-4t)
Apr 16 20:35:21 localhost postfix/qmgr: 66C17C90A91: removed
Now It was working fine and voicemail was being delivered to users email address.
I got good solution from below link on comment of Billsion . postfix-masquerade.
you can masquerade the sender email address to the real one which you want .which will accepted by the you SMTP server .
Postfix MTA offers smtp_generic_maps parameter. You can specify lookup tables that replace local mail addresses by valid Internet addresses when mail leaves the machine via SMTP.
Open your main.cf file
# vi /etc/postfix/main.cf
Append following parameter
smtp_generic_maps = hash:/etc/postfix/generic
Save and close the file. Open /etc/postfix/generic file:
# vi /etc/postfix/generic
Make sure email@example.com change to firstname.lastname@example.org
Save and close the file. Create or update generic postfix table:
# postmap /etc/postfix/generic
# /etc/init.d/postfix restart
When mail is sent to a remote host via SMTP this replaces email@example.com by firstname.lastname@example.org mail address. You can use this trick to replace address with your ISP address if you are connected via local SMTP.
I check with my PBX its working fine.