Permalink
Browse files

Make smtp HELO/EHLO hostname configurable (closes #1484067)

  • Loading branch information...
thomascube committed Sep 20, 2007
1 parent 84d06ed commit aca3d25f1b65bc601ea66b59528e39ce158f6c89
Showing with 12 additions and 1 deletion.
  1. +5 −0 CHANGELOG
  2. +6 −0 config/main.inc.php.dist
  3. +1 −1 program/include/rcube_smtp.inc
View
@@ -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)
View
@@ -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;
@@ -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

0 comments on commit aca3d25

Please sign in to comment.