Use also Envelope-To for identity selection (#1488553)

pull/52/head
Aleksander Machniak 12 years ago
parent 3a1a361422
commit bb5d728285

@ -8,7 +8,7 @@ CHANGELOG Roundcube Webmail
- Fix broken message/part bodies when FETCH response contains more untagged lines (#1488836)
- Fix empty email on identities list after identity update (#1488834)
- Add new identities_level: (4) one identity with possibility to edit only signature
- Use Delivered-To header as a last resort for identity selection (#1488840)
- Use Delivered-To and Envelope-To headers for identity selection (#1488840, #1488553)
- Fix XSS vulnerability using Flash files (#1488828)
- Fix absolute positioning in HTML messages (#1488819)
- Fix cache (in)validation after setting \Deleted flag

@ -65,6 +65,7 @@ abstract class rcube_storage
'MAIL-REPLY-TO',
'RETURN-PATH',
'DELIVERED-TO',
'ENVELOPE-TO',
);
const UNKNOWN = 0;

@ -455,6 +455,16 @@ function rcmail_identity_select($MESSAGE, $identities, $compose_mode)
}
}
// Fallback using Envelope-To
if ($from_idx === null && ($envelope_to = $MESSAGE->headers->others['envelope-to'])) {
foreach ($identities as $idx => $ident) {
if (in_array($ident['email_ascii'], (array)$envelope_to)) {
$from_idx = $idx;
break;
}
}
}
return $identities[$from_idx !== null ? $from_idx : $default_identity];
}

Loading…
Cancel
Save