Emails from [email protected]

This has been going on forever and I just never got around to tracking it down. Pretty much all my systems are set up to use my mail server to send emails in Admin > system Administration > Email settings and the hostnames are always changed to match the FQDN.

Why am I constantly getting notification emails from [email protected] to my email instead of from the settings in the system admin email settings?

Because postfix.

so basically replace all the [email protected] with what I want it to be?

Yes. The left side is the various ways it may show up and the right is what oyu want it to be.

ok, maybe I’m a bit thick today but I think your post is saying add:

root [email protected]
root@localhost [email protected]
[email protected] [email protected]
root@freepbx [email protected]
[email protected] [email protected]
asterisk [email protected]
asterisk@localhost [email protected]
[email protected] [email protected]
asterisk@freepbx [email protected]
[email protected] [email protected]
[email protected] [email protected]
vm@asterisk [email protected]

to the /etc/postfix/generic file (substituting my info for [email protected] of course) and then issue all those commands below that part of the post to rebuild postfix settings?


didn’t work… still getting a buttload of emails from that pbx from [email protected]

actually, it may have worked, there was a ton of old junk in the mail queue that was deferred. I deleted them. We’ll see going forward. Thanks for the help!!

The framework was added in 14/15 to unify email. Making everything use a single email source is one of those technical debt items that needs to be gone through.

Most commercial modules will use the email address set in sysadmin.
Many of the open source modules that have a setting for “from” will use an address set in sysadmin too.

If you have a custom hostname set you want to use typically asterisk@{hostname} or root@{hostname}

It is pretty common through out the code to fail back to user@hostname if another option isn’t set.

pretty commonly cut and paste everywhere

		$femail = $this->FreePBX->Config()->get('AMPUSERMANEMAILFROM');
		if(function_exists('sysadmin_get_storage_email')) {
			$emails = sysadmin_get_storage_email();
			if(!empty($emails['fromemail']) && filter_var($emails['fromemail'],FILTER_VALIDATE_EMAIL)) {
				$femail = $emails['fromemail'];

		$from = !empty($femail) ? $femail : get_current_user() . '@' . gethostname();

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.