Skip to contentSkip to conversation

case sensitivity of email addresses

DISCUSSION Neale Pickett 3 participants 5 messages Nov 15, 2005

lore
Share & tools
lore
#0 lore raw

What would people think about making the email address check case-insensitive? Right now I have people sending from case-insensitive mail clients, wondering why their posts are bouncing.

Neale

#1 lore raw

2005/11/15, Neale Pickett:

Quoted 3 lines

What would people think about making the email address check case-insensitive? Right now I have people sending from case-insensitive mail clients, wondering why their posts are bouncing.

FWIW, this is what RFC2821 says about:

The local-part of a mailbox MUST BE treated as case sensitive. Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts. Mailbox domains are not case sensitive. In
particular, for some
hosts the user "smith" is different from the user "Smith".
However, exploiting
the case sensitivity of mailbox local-parts impedes interoperability and is discouraged.

--
It is impossible to make anything foolproof, because fools are so ingenious.
- Roger Berg

#2 lore raw
In reply to Neale Pickett
Quoted 11 lines · Enrique Matías Sánchez

FWIW, this is what RFC2821 says about:

The local-part of a mailbox MUST BE treated as case sensitive.
Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts. Mailbox domains are not case sensitive. In particular, for some
hosts the user "smith" is different from the user "Smith".
However, exploiting
the case sensitivity of mailbox local-parts impedes interoperability and
is discouraged.

Right, so it's not clear to me what we're supposed to do in the face of some mail clients changing the case of the local-part. Given that "exploiting the case sensitivity of mailbox local-parts ... is discouraged", I propose the RFC is suggesting the check be case-insensitive.

Neale

#3 lore raw
In reply to Neale Pickett
Quoted 11 lines · Neale Pickett
Quoted 10 lines

FWIW, this is what RFC2821 says about:

The local-part of a mailbox MUST BE treated as case sensitive.
Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts. Mailbox domains are not case sensitive. In particular, for some
hosts the user "smith" is different from the user "Smith".
However, exploiting
the case sensitivity of mailbox local-parts impedes interoperability and
is discouraged.

Quoted 5 lines

Right, so it's not clear to me what we're supposed to do in the face of some mail clients changing the case of the local-part. Given that "exploiting the case sensitivity of mailbox local-parts ... is discouraged", I propose the RFC is suggesting the check be case-insensitive.

We want mlmmj to be case insensitive. We're not doing RFC2821--that's supposed to be handled by the smtpd delivering to mlmmj.

Anyone have a patch, just for this?

Signature · 4 lines
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
 and totally illogical, with just a little bit more effort?"
                                 -- A. P. J.
#4 lore raw
In reply to Neale Pickett
Quoted 5 lines · Mads Martin Joergensen

We want mlmmj to be case insensitive. We're not doing RFC2821--that's supposed to be handled by the smtpd delivering to mlmmj.

Anyone have a patch, just for this?

I think this will do the most important bit. Patch against RC1.

mlmmj-process.c 2005-11-15 14:34:49.000000000 -0700 renamed from mlmmj-process.c~ 2005-10-09 08:17:52.000000000 -0600 +2 -2
@@ -619,7 +619,7 @@
                for(i = 0; i < toemails.emailcount; i++) {
                        for(j = 0; j < alternates->count; j++) {
                                chomp(alternates->strs[j]);
-                               if(strcmp(alternates->strs[j],
+                               if(strcasecmp(alternates->strs[j],
                                        toemails.emaillist[i]) = 0)
                                        intocc = 1;
                        }
@@ -627,7 +627,7 @@
                for(i = 0; i < ccemails.emailcount; i++) {
                        for(j = 0; j < alternates->count; j++) {
                                chomp(alternates->strs[j]);
-                               if(strcmp(alternates->strs[j],
+                               if(strcasecmp(alternates->strs[j],
                                        ccemails.emaillist[i]) = 0)
                                        intocc = 1;
                        }