diff options
author | jim-p <jimp@pfsense.org> | 2012-08-24 08:47:31 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-08-24 08:47:31 -0400 |
commit | 0300d9ecbc60d5f3d84f424a46214959a186b61a (patch) | |
tree | c81cf2f6b38f0c97cd3af56e2150fbfefae96788 /etc/inc/smtp.inc | |
parent | 7fca58c602a98ea672315169e90ab038d6985240 (diff) | |
download | pfsense-0300d9ecbc60d5f3d84f424a46214959a186b61a.zip pfsense-0300d9ecbc60d5f3d84f424a46214959a186b61a.tar.gz |
Try harder to determine hostname when sending e-mail.
Diffstat (limited to 'etc/inc/smtp.inc')
-rw-r--r-- | etc/inc/smtp.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/inc/smtp.inc b/etc/inc/smtp.inc index 5aec015..d884c86 100644 --- a/etc/inc/smtp.inc +++ b/etc/inc/smtp.inc @@ -463,7 +463,9 @@ class smtp_class $this->OutputDebug(sprintf(gettext("Connected to SMTP server \"%s\"."), $domain)); if(!strcmp($localhost=$this->localhost,"") && !strcmp($localhost=getenv("SERVER_NAME"),"") - && !strcmp($localhost=getenv("HOST"),"")) + && !strcmp($localhost=getenv("HOST"),"") + && !strcmp($localhost=getenv("HOSTNAME"),"") + && !strcmp($localhost=exec("/bin/hostname"),"")) $localhost="localhost"; $success=0; if($this->VerifyResultLines("220",$responses)>0) |