summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-07-31 11:10:40 +0200
committerAleksander Machniak <alec@alec.pl>2013-07-31 11:14:34 +0200
commita67ad15d2f0b2f2e8aec9e5f0cff07f48447f287 (patch)
tree7c8234eb056262bc6974d6118fa0d49b153e629e /program
parentdfaf8c5b8c5f1152275a2201b6b44c29fa10397c (diff)
Support special Return-Path form used on some (PEAR) mailing list (#1489241)
Diffstat (limited to 'program')
-rw-r--r--program/steps/mail/func.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 16a9f495d..28e6baadf 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1803,8 +1803,14 @@ function rcmail_identity_select($MESSAGE, $identities = null, $compose_mode = 'r
// Try Return-Path
if ($from_idx === null && ($return_path = $MESSAGE->headers->others['return-path'])) {
foreach ($identities as $idx => $ident) {
+ // Return-Path header contains an email address, but on some mailing list
+ // it can be e.g. <pear-dev-return-55250-local=domain.tld@lists.php.net>
+ // where local@domain.tld is the address we're looking for (#1489241)
+ $ident1 = $ident['email_ascii'];
+ $ident2 = str_replace('@', '=', $ident1);
+
foreach ((array)$return_path as $path) {
- if (stripos($path, $ident['email_ascii']) !== false) {
+ if (stripos($path, $ident1) !== false || stripos($path, $ident2)) {
$from_idx = $idx;
break 2;
}