Emails from [email protected]


#1

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?


(Jared Busch) #2

Because postfix.


#3

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


(Jared Busch) #4

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


#5

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

root [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
asterisk [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
[email protected] [email protected]
@pbx.domain.com @domain.com

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?


(Jared Busch) #6

Correct


#7

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


#8

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!!


(TheJames) #9

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 [email protected]{hostname} or [email protected]{hostname}

It is pretty common through out the code to fail back to [email protected] 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();


(system) closed #10

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