When I set the e-mail adres in Settings > Voicemail Admin > Settings > E-mail Config > Server Email.
FreePBX still sends Voicemails as [email protected] which I don’t want.
When I check /etc/asterisk/voicemail.conf I see that serveremail= is showing the correct e-mail adres. (The one I setup in the VM settings menu)
I also use the Voicemail Notification addon and the e-mail adres set at Email From is working as intended.
Also e-mail addresses in Admin > System Admin > Notification Settings are using the ones I setup there.
So only the “default” voicemails are send with the wrong address even though I filled it in.
I restarted/reloaded postfix, rebooted the whole server and changed it to different e-mail adresses but it refuses to use the e-mail address I provide.
I’m running FreePBX 14.0.3.6 official distro with everything patched to the latest (modules and yum).
If someone could point me in the right direction to look I would be very happy because i’m struggling with this for quite a while now
edit
Changing the hostname of the server to mydomain.com sends e-mails as [email protected].
But I don’t want them to be send from this e-mail address. So I need a way to change the e-mail address from voicemails. If that’s not possible at least some fix to override the asterisk part with something else
Do you get emails from Freepbx (generally availability of updates should get notified) and other apps such as fail2ban? If not, I would check the outgoing mailserver settings.
I have never had any issues with this setting. Check the content of the log file /var/log/maillog and confirm that the messages are being sent with the incorrect from address.
I did, that’s how I know they are send with the .local address.
However when I change /etc/postfix/main.cf > Sending Mail to myorigin: servername and myorigin: domainname it sends with the correct address.
It looks like the asterisk user doesn’t have the rights to rewrite the mail address and falls back to the default settings. Which, by changing it in main.cf, solves my issue for now.
However this still leaves:
Why is the asterisk user not allowed to rewrite the postfix e-mail
is the main.cf untouched on updates so I don’t need to set this up after every update/upgrade
Why is the asterisk user not allowed to rewrite the postfix rules
Why WOULD the asterisk user be allowed to rewrite the postfix rules? Postfix is something that is administered by the superuser, not by a program. That being said though, you would have to change the permissions of the postfix config to chmod 666 to allow “others” to edit it. note This is NOT a good idea; those permissions are tight for a reason. Allowing just anybody to change the postfix configuration could turn your system into a spam-generating engine.
Well I was guessing. It’s weird that voicemail.conf is ignored and I don’t have enough knowledge of FreePBX to understand why it don’t work…I assumed it rewrote the postfix address since it was stubborn on using the postfix ones.