summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-02-05 23:34:18 +0000
committerthomascube <thomas@roundcube.net>2008-02-05 23:34:18 +0000
commitc08b7347c1a04e1930fbb50e2779cc5e0928ff0d (patch)
tree29ff2efb4b00e43ab37f9ccd3e66a7d7fabc97c4 /program/steps/mail
parentb155682d575dad71f35bd8c1c1d27467c9caa1e2 (diff)
Applied patch to prevent bad header delimiters (#1484751)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/sendmail.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 869ed6e87..8ead1b0e0 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -206,11 +206,12 @@ if (!empty($_POST['_receipt']))
// additional headers
$headers['Message-ID'] = $message_id;
$headers['X-Sender'] = $from;
-$headers['Received'] = 'from '.
+$headers['Received'] = wordwrap('from ' .
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
- gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR']."]\r\n\tvia " : '').
- gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR']."]\r\n\t with ".
- $_SERVER['SERVER_PROTOCOL'].' ('.$_SERVER['REQUEST_METHOD'].'); '.date('r');
+ gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR'].'] via ' : '') .
+ gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR'].'] with ' .
+ $_SERVER['SERVER_PROTOCOL'].' ('.$_SERVER['REQUEST_METHOD'].'); ' . date('r'),
+ 69, rcmail_header_delm() . "\t");
if (!empty($CONFIG['useragent']))
$headers['User-Agent'] = $CONFIG['useragent'];