]> git.donarmstrong.com Git - roundcube.git/blob - debian/patches/received-headers-sa.patch
Imported Debian patch 0.5.2+dfsg-1
[roundcube.git] / debian / patches / received-headers-sa.patch
1 Fix Received headers to behave better with SpamAssassin?
2  http://trac.roundcube.net/changeset/3291
3  http://trac.roundcube.net/ticket/1486513
4
5 --- a/program/steps/mail/sendmail.inc   2009-11-16 23:49:07 +0000
6 +++ a/program/steps/mail/sendmail.inc   2010-02-24 00:48:24 +0000
7 @@ -259,8 +259,8 @@
8          $http_header .= ' ('. rcmail_encrypt_header($host) . ')';
9      } else {
10        $http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']');
11 -      $http_header .= ' ('. ($host == $hostname ? '' : $hostname . ' ') .
12 -        '[' . $host .'])';
13 +      if ($host != $hostname)
14 +        $http_header .= ' (['. $host .'])';
15      }
16      $http_header .= $nldlm . ' via ';
17    }
18 @@ -272,14 +272,14 @@
19        $http_header .= ' ('. rcmail_encrypt_header($host) . ')';
20    } else {
21      $http_header .= (($host != $hostname) ? $hostname : '[' . $host . ']');
22 -    $http_header .= ' ('. ($host == $hostname ? '' : $hostname . ' ') .
23 -      '[' . $host .'])';
24 +    if ($host != $hostname)
25 +      $http_header .= ' (['. $host .'])';
26    }
27    // BY
28    $http_header .= $nldlm . 'by ' . $_SERVER['HTTP_HOST'];
29    // WITH
30 -  $http_header .= $nldlm . 'with ' . $_SERVER['SERVER_PROTOCOL'] .
31 -      ' ('.$_SERVER['REQUEST_METHOD'] . '); ' . date('r');
32 +  $http_header .= $nldlm . 'with HTTP (' . $_SERVER['SERVER_PROTOCOL'] .
33 +      ' '.$_SERVER['REQUEST_METHOD'] . '); ' . date('r');
34    $http_header = wordwrap($http_header, 69, $nldlm);
35  
36    $headers['Received'] = $http_header;
37