Postfix Not Honoring serveremail setting in voicemail.conf

1 post / 0 new
AdHominem
AdHominem's picture
Postfix Not Honoring serveremail setting in voicemail.conf

I'm running the latest FreePBX Distro.

Postfix is not honoring the severemail setting in voicemail.conf (or in the Voicemail Admin module). As a result, e-mails are being sent by asterisk@new-host-(whatever).localdomain and are being rejected.

Here's what I've done:

nano hosts
add:

127.0.0.1 MYDOMAIN.com

From FreePBX GUI, changed severemail from settings page of voicemail admin so that from address is "VM@MYDOMAIN.com"

Did an amportal restart. Then tried a reboot.

Left a voicemail message for myself.

/etc/log/maillog shows that emails are still coming from "asterisk@new-host-..". Emails are rejected by receiving server because they're not coming from a valid e-mail address.

From what I've read, it appears that this is a consequence of running Asterisk as asterisk user instead of root. It appears that Postfix is refusing to allow the asterisk user to use a different e-mail address.

As a workaround, I've edited /etc/postfix/main.cf and added "myorigin=MYDOMAIN.com." This allows the messages to out as "asterisk@MYDOMAIN.com". When I receive the messages, the "From" header shows the "serveremail" setting, but the "returnpath" header still has "asterisk@MYDOMAIN.com."