summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-20 11:24:41 +0000
committerrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-20 11:24:41 +0000
commit389e3714a18e7a14d391d6a54bd076094b19c539 (patch)
treee93a46487ff4cdd81fbfb686d5a705d928dcbb33
parentb43e04dabc63cf87c2543243159cc50beaa97114 (diff)
Make smtp HELO/EHLO hostname configurable (closes #1484067)
git-svn-id: https://svn.roundcube.net/trunk@804 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG5
-rw-r--r--roundcubemail/config/main.inc.php.dist6
-rw-r--r--roundcubemail/program/include/rcube_smtp.inc2
3 files changed, 12 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index f227acbc3..03db1d3f7 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -1,6 +1,11 @@
CHANGELOG RoundCube Webmail
---------------------------
+2007/09/20 (robin)
+----------
+- Make smtp HELO/EHLO hostname configurable (#1484067)
+
+
2007/09/19 (thomasb)
----------
- Unlock interface when message sending fails (#1484570)
diff --git a/roundcubemail/config/main.inc.php.dist b/roundcubemail/config/main.inc.php.dist
index b948b3845..6aa6e4b40 100644
--- a/roundcubemail/config/main.inc.php.dist
+++ b/roundcubemail/config/main.inc.php.dist
@@ -77,6 +77,12 @@ $rcmail_config['smtp_pass'] = '';
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';
+// SMTP HELO host
+// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
+// Leave this blank and you will get the server variable 'server_name' or
+// localhost if that isn't defined.
+$rcmail_config['smtp_helo_host'] = '';
+
// Log sent messages
$rcmail_config['smtp_log'] = TRUE;
diff --git a/roundcubemail/program/include/rcube_smtp.inc b/roundcubemail/program/include/rcube_smtp.inc
index 7b839873e..f56246bbd 100644
--- a/roundcubemail/program/include/rcube_smtp.inc
+++ b/roundcubemail/program/include/rcube_smtp.inc
@@ -76,7 +76,7 @@ function smtp_mail($from, $recipients, &$headers, &$body, &$response)
// create Net_SMTP object and connect to server
if (!is_object($smtp_conn))
{
- $helo_host = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost';
+ $helo_host = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : (!empty($CONFIG['smtp_helo_host']) ? $CONFIG['smtp_helo_host'] : 'localhost');
$SMTP_CONN = new Net_SMTP($smtp_host, $smtp_port, $helo_host);
// set debugging