summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authorrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-13 12:49:28 +0000
committerrobin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-13 12:49:28 +0000
commit4f727902f7762c44c0776edf0c216ad63c915f66 (patch)
treecde4bb49b7230820771fc60ec8e3fecbb0da7739 /roundcubemail/program
parent1718653c5ec4674beb28c77aeb25f8a561c3ff5a (diff)
Add Received header to outgoing mail.
git-svn-id: https://svn.roundcube.net/trunk@944 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/mail/sendmail.inc5
1 files changed, 5 insertions, 0 deletions
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'];