From 82c98e674dde384575b992e7d3ea7057fe9e7d78 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 25 Feb 2010 08:59:02 -0500
Subject: [PATCH] - Fix Received headers to behave better with SpamAssassin (#1486513)
---
CHANGELOG | 1 +
program/steps/mail/sendmail.inc | 12 ++++++------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index ececfd7..184d06a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Fix Received headers to behave better with SpamAssassin (#1486513)
- Password: Make passwords encoding consistent with core, add 'password_charset' global option (#1486473)
- Fix adding contacts SQL error on mysql (#1486459)
- Squirrelmail_usercopy: support reply-to field (#1486506)
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 13c162d..7e9e895 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -260,8 +260,8 @@
$http_header .= ' ('. rcmail_encrypt_header($host) . ')';
} else {
$http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']');
- $http_header .= ' ('. ($host == $hostname ? '' : $hostname . ' ') .
- '[' . $host .'])';
+ if ($host != $hostname)
+ $http_header .= ' (['. $host .'])';
}
$http_header .= $nldlm . ' via ';
}
@@ -273,14 +273,14 @@
$http_header .= ' ('. rcmail_encrypt_header($host) . ')';
} else {
$http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']');
- $http_header .= ' ('. ($host == $hostname ? '' : $hostname . ' ') .
- '[' . $host .'])';
+ if ($host != $hostname)
+ $http_header .= ' (['. $host .'])';
}
// BY
$http_header .= $nldlm . 'by ' . $_SERVER['HTTP_HOST'];
// WITH
- $http_header .= $nldlm . 'with ' . $_SERVER['SERVER_PROTOCOL'] .
- ' ('.$_SERVER['REQUEST_METHOD'] . '); ' . date('r');
+ $http_header .= $nldlm . 'with HTTP (' . $_SERVER['SERVER_PROTOCOL'] .
+ ' '.$_SERVER['REQUEST_METHOD'] . '); ' . date('r');
$http_header = wordwrap($http_header, 69, $nldlm);
$headers['Received'] = $http_header;
--
Gitblit v1.9.1