From 4f727902f7762c44c0776edf0c216ad63c915f66 Mon Sep 17 00:00:00 2001 From: robin Date: Thu, 13 Dec 2007 12:49:28 +0000 Subject: Add Received header to outgoing mail. git-svn-id: https://svn.roundcube.net/trunk@944 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/mail/sendmail.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/steps/mail/sendmail.inc b/roundcubemail/program/steps/mail/sendmail.inc index c2f9ff7b6..869ed6e87 100644 --- a/roundcubemail/program/steps/mail/sendmail.inc +++ b/roundcubemail/program/steps/mail/sendmail.inc @@ -206,6 +206,11 @@ if (!empty($_POST['_receipt'])) // additional headers $headers['Message-ID'] = $message_id; $headers['X-Sender'] = $from; +$headers['Received'] = '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'); if (!empty($CONFIG['useragent'])) $headers['User-Agent'] = $CONFIG['useragent']; -- cgit v1.2.3