Make the http-received header in outgoing mails configurable

release-0.6
thomascube 17 years ago
parent a3e5b42e0d
commit 5ec11328c7

@ -212,12 +212,16 @@ if (!empty($_POST['_receipt']))
// additional headers // additional headers
$headers['Message-ID'] = $message_id; $headers['Message-ID'] = $message_id;
$headers['X-Sender'] = $from; $headers['X-Sender'] = $from;
$headers['Received'] = wordwrap('from ' .
(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? if ($CONFIG['http_received_header'])
gethostbyaddr($_SERVER['HTTP_X_FORWARDED_FOR']).' ['.$_SERVER['HTTP_X_FORWARDED_FOR'].'] via ' : '') . {
gethostbyaddr($_SERVER['REMOTE_ADDR']).' ['.$_SERVER['REMOTE_ADDR'].'] with ' . $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'), $_SERVER['SERVER_PROTOCOL'].' ('.$_SERVER['REQUEST_METHOD'].'); ' . date('r'),
69, rcmail_header_delm() . "\t"); 69, $nldlm);
}
if (!empty($CONFIG['useragent'])) if (!empty($CONFIG['useragent']))
$headers['User-Agent'] = $CONFIG['useragent']; $headers['User-Agent'] = $CONFIG['useragent'];

Loading…
Cancel
Save