[FIX] mail: Ignore case for mail aliases.
When receiving new mail (not replies) to an alias we should not take case into account. This also homogenize the treatment of local parts. For instance, lines 967 and 980 convert the local part to lower case to avoid case-sensitivity issues. Also `mail_alias` normalizes alias names by lowering case and finding, if necessary to make it unique, a suffix to alias name provided. From RFC 5321, section 2.4: > Exploiting the case sensitivity of mailbox local-parts impedes > interoperability and is discouraged Closes #334 Closes #13037
This commit is contained in:
parent
295f62741d
commit
5b692df1b1
|
@ -1056,7 +1056,7 @@ class mail_thread(osv.AbstractModel):
|
|||
decode_header(message, 'Cc'),
|
||||
decode_header(message, 'Resent-To'),
|
||||
decode_header(message, 'Resent-Cc')])
|
||||
local_parts = [e.split('@')[0] for e in tools.email_split(rcpt_tos)]
|
||||
local_parts = [e.split('@')[0].lower() for e in tools.email_split(rcpt_tos)]
|
||||
if local_parts:
|
||||
alias_ids = mail_alias.search(cr, uid, [('alias_name', 'in', local_parts)])
|
||||
if alias_ids:
|
||||
|
|
Loading…
Reference in New Issue