From d3ca74af0db45585ca3a04132b765c3462f935b4 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 28 Mar 2016 18:28:40 +0000 Subject: [PATCH] merge github pull request into svn manually - https://github.com/postfixadmin/postfixadmin/commit/3e62d3975ab78eee565b484b1f0fa3c29e0909fb - adding configurable smtp helo (CONF["smtp_client"]) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1832 a1433add-5e2c-0410-b055-b7f2511e0802 --- config.inc.php | 5 +++++ functions.inc.php | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config.inc.php b/config.inc.php index c88bf2b9..827a9a8e 100644 --- a/config.inc.php +++ b/config.inc.php @@ -125,6 +125,11 @@ $CONF['admin_email'] = ''; $CONF['smtp_server'] = 'localhost'; $CONF['smtp_port'] = '25'; +// SMTP Client +// Hostname (FQDN) of the server hosting Postfix Admin +// Used in the HELO when sending emails from Postfix Admin +$CONF['smtp_client'] = ''; + // Encrypt // In what way do you want the passwords to be crypted? // md5crypt = internal postfix admin md5 diff --git a/functions.inc.php b/functions.inc.php index 81414b9a..5dd7a389 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1136,7 +1136,10 @@ function smtp_mail ($to, $from, $data, $body = "") { $smtpd_server = $CONF['smtp_server']; $smtpd_port = $CONF['smtp_port']; //$smtp_server = $_SERVER["SERVER_NAME"]; - $smtp_server = php_uname("n"); + $smtp_server = php_uname('n'); + if(!empty($CONF['smtp_client'])) { + $smtp_server = $CONF['smtp_client']; + } $errno = "0"; $errstr = "0"; $timeout = "30";