summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-08-24 08:47:31 -0400
committerjim-p <jimp@pfsense.org>2012-08-24 08:47:31 -0400
commit0300d9ecbc60d5f3d84f424a46214959a186b61a (patch)
treec81cf2f6b38f0c97cd3af56e2150fbfefae96788 /etc
parent7fca58c602a98ea672315169e90ab038d6985240 (diff)
downloadpfsense-0300d9ecbc60d5f3d84f424a46214959a186b61a.zip
pfsense-0300d9ecbc60d5f3d84f424a46214959a186b61a.tar.gz
Try harder to determine hostname when sending e-mail.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/smtp.inc4
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)
OpenPOWER on IntegriCloud