thunderbird / thunderbird-android

Thunderbird for Android – Open Source Email App for Android (fka K-9 Mail)
https://thunderbird.net/mobile
Apache License 2.0
10.93k stars 2.51k forks source link

"reply all" should case normalize addresses #925

Open bjacke opened 8 years ago

bjacke commented 8 years ago

i got a mail from a mailman list which uses munge-from. the original posting went to Foo@list.example.com, mailman replaced the original sender with the normal mail addess foo@list.example.com. a reply all via k9mail ended up in two mails to the mailing list because it replied to Foo@list.example.com (from the To: header) and to foo@lists.example.com (from the From: header).

if the mail addresses would have the same case, the k9mail would have reduced them to one.

k9mail should also handle the case of different cased double mail addresses right by comparing them caseless.

cketti commented 8 years ago

The local-part of a mailbox MUST BE treated as case sensitive

RFC 5321, section 2.4

However, this doesn't entirely invalidate your point. I believe we don't compare the domain part case-insensitive.

bjacke commented 8 years ago

The "MUST BE treated as case sensitive" part is interesting, but

Can anybody tell a domain which actually treats the localpart case sensitive for mails? Yes, I know for SIP addresses but not for mail in the real world. Please consider sometimes not only stick to RFCs but also to the real world ;-)

cketti commented 8 years ago

I don't see why we should deviate from the standard to work around edge case problems created by other software. Since your mailing list software rewrites the From header it might as well rewrite the To/Cc headers to normalize the mailing list address. There, problem solved. And without having to introduce non standard compliant behavior into email clients.

bjacke commented 8 years ago

On 02.12.2015 09:50, cketti wrote:

And without having to introduce non standard compliant behavior into email clients.

coming back to my question - you also cannot tell me any domain that treats local part case sensitive, right?

And you ask all the mailing list servers in the worlds etc. to change and stick to a point of a RFC which is in real world irrelevant - instead of making k9mail behave like obviously all mail servers in the internet work.

As much as I usually like software to be RFC compliant there are cases, where RFCs are not completely right (or sometimes outdated). And finally as the name says, a Request For Comment is not a law, which has to be followed completely, it is a guide line. Don't forget to look at the real world also.

cketti commented 8 years ago

The point is that changing the behavior like you suggested needlessly introduces a bug. The consequence in your case is a mail being received twice. With the behavior change a valid recipient might not get the message because the recipient address was removed.

I'm not asking anyone to change what they are doing. You just have to be aware that rewriting headers might lead to unintended consequences like this one. But with some extra care when rewriting the headers this particular problem can be avoided.