Test email has no hostname?
-
When I send a test smtp message the exact string that gets emailed to me is:
This is a test message from . It is safe to ignore this message.
I've tried re-setting the hostname etc but it doesn't appear to have helped.
-
Locate :
function saveAdvancedNotifications($post, $json = false) { global $config, $smtp_authentication_mechanisms, $pushover_sounds, $g;
in the file /usr/local/pfSense/include/www/system_advanced_notifications.inc
and add, as shown, a $g and save.
-
@gertjan is there a redmine for this?
I found this https://redmine.pfsense.org/issues/10718
edit: So your fix works and now get his
This is a test message from Netgate pfSense Plus. It is safe to ignore this message.
But should prob use just the hostname that was setup on pfsense..
-
@johnpoz said in Test email has no hostname?:
But should prob use just the hostname that was setup on pfsense..
The message uses the global variable
$g['product_label']
Because $g[...] is used, it should be made available to the function where it's used. A rather classic issue, I've seen it more often.
I'm not proposing or choosing 'pfSense' here : it's a global available string.In /etc/inc/globals.inc :
global $g; $g = array( ...... "product_label" => "pfSense", .......
I agree, using the host name here would be more appropriate. Especially if you have several pfSense instances running.
-
You want to put in the redmine? ;)
They should really at min fix the missing variable you pointed out. And maybe suggest using a different one ;)
-
@gertjan said in Test email has no hostname?:
Locate :
function saveAdvancedNotifications($post, $json = false) { global $config, $smtp_authentication_mechanisms, $pushover_sounds, $g;
in the file /usr/local/pfSense/include/www/system_advanced_notifications.inc
and add, as shown, a $g and save.
Just wanted to say thanks for this!