summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-08-14 23:36:55 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-08-14 23:36:55 +0200
commit341fa8b9a6207000d057e00678d96ada6136f783 (patch)
treef8049ade80bf816e6b9d4d843b6e83a8b132e72a /program/steps/mail/func.inc
parent96c4b9098bec7191c708d4e4f96b80b2768a7ef0 (diff)
parentf4ba655a41bad1d2f833e36dd3fbe7cb2a5582ee (diff)
Merge branch 'release-0.9' of github.com:roundcube/roundcubemail into release-0.9
Diffstat (limited to 'program/steps/mail/func.inc')
-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;
}