summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-04-02 12:09:41 +0000
committerthomascube <thomas@roundcube.net>2008-04-02 12:09:41 +0000
commit5ec11328c7bbc91b2960b8b4a2db3aaaa8edbaba (patch)
tree50a7d07afc38a7ee94236cb51206a7fed950b8f9 /program/steps
parenta3e5b42e0debc9a31133c78e8e4f71169484e4a0 (diff)
Make the http-received header in outgoing mails configurable
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/sendmail.inc16
1 files changed, 10 insertions, 6 deletions
diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc
index 7c729ff33..ddd3ea897 100644
--- a/program/steps/mail/sendmail.inc
+++ b/program/steps/mail/sendmail.inc
@@ -212,12 +212,16 @@ if (!empty($_POST['_receipt']))
// additional headers
$headers['Message-ID'] = $message_id;
$headers['X-Sender'] = $from;
-$headers['Received'] = wordwrap('from ' .
- (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
- 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 ($CONFIG['http_received_header'])
+{
+ $nldlm = rcmail_header_delm() . "\t";
+ $headers['Received'] = wordwrap('from ' . (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
+ gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR'].']'.$nldlm.' via ' : '') .
+ gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR'].']'.$nldlm.'with ' .
+ $_SERVER['SERVER_PROTOCOL'].' ('.$_SERVER['REQUEST_METHOD'].'); ' . date('r'),
+ 69, $nldlm);
+}
if (!empty($CONFIG['useragent']))
$headers['User-Agent'] = $CONFIG['useragent'];