From 7f89041e9ae0c6b59b6f2a3d77789764b0421b93 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 06 Oct 2010 14:19:04 -0400
Subject: [PATCH] - Use empty envelope sender address for message disposition notifications (RFC2298.3)
---
program/include/rcube_smtp.php | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/program/include/rcube_smtp.php b/program/include/rcube_smtp.php
index b457476..61eebf3 100644
--- a/program/include/rcube_smtp.php
+++ b/program/include/rcube_smtp.php
@@ -195,6 +195,13 @@
return false;
}
+ // RFC2298.3: remove envelope sender address
+ if (preg_match('/Content-Type: multipart\/report/', $text_headers)
+ && preg_match('/report-type=disposition-notification/', $text_headers)
+ ) {
+ $from = '';
+ }
+
// set From: address
if (PEAR::isError($this->conn->mailFrom($from)))
{
--
Gitblit v1.9.1