Exim case insensitive authentication

Kiekeboe100

Verified User
Joined
Apr 19, 2008
Messages
146
Location
Belgium
Hi,

I had an issue with a client that couldn't get authenticated. After looking at the exim logs, he had written his name with a capital letter.

I know that Linux's default is to have user names case sensitive, although to make it easier for clients (and eventually for us), it would be nice if email addresses are case insensitive.
Delivering e-mail already acts like that ([email protected] and [email protected] get's delivered to the same mailbox).

Apparently exim.pl is used to do the authentication for exim.

I've changed line 174 to this:
Code:
if (lc($test_user) eq lc($username))

and changed line 35 to this:
Code:
my($username) = @_;
$username = lc($username);

and changed line 79:
Code:
my($user,$domain) = @_;
$user = lc($user);

This seems to work, although I don't know if the limits are still working (didn't test the limits).
There shouldn't be a problem accessing the limits files in all lowercase, because an email address added through DirectAdmin is lowercased automatically.

I would like your opinion whether this should be default in exim.pl or not. (I hope so, as I would otherwise have to think about this after every exim.pl upgrade).

regards,
Stijn
 
I would be hesitant to allow upper case characters, when all data is stored with lower case.
Although some systems might accept them, others may not.
DA is also only checking lower case values, so if some log entries show up in upper case, they may go unnoticed, un-logged, or denied.

Also, it might cause confusion as one area might accept upper case, and another might not due to the case alone.. making the client confused.
Keeping a consistent case over all services would avoid that problem... once they figure out they need lower case.

John
 
But where was the upper case character exactly in this situation? Since exim seems to make the input lowercase. It would seem DA created the address with an uppercase in it or am I missing something.
 
Directadmin creates everything in lowercase.

But my client used [email protected] as username for smtp authentication.
Dovecot ignores the uppercase, and allows authentication
Exim ignores uppercase when receiving an email for [email protected]

Only exim.pl fails to authenticate when using [email protected]
That's why I changed this.

But if other code (not exim.pl) depend on lowercase, then I can see that there might be other problems which aren't obvious in the beginning.

regards,
Stijn
 
Back
Top