diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -1,6 +1,10 @@ CHANGELOG RoundCube Webmail --------------------------- +2007/12/13 (robin) +---------- +- Add Received header on outgoing mail + 2007/12/10 (estadtherr) ---------- - Upgrade to TinyMCE 2.1.3 diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index c2f9ff7b6..869ed6e87 100644 --- a/program/steps/mail/sendmail.inc +++ b/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']; |