[Dovecot] Make user name CaSe Insensitive

FlashWebHost.com flashweb at gmail.com
Mon Aug 7 23:45:53 EEST 2006


> password_query = select user, password, ..
> ie. make it return the "user" field as in the database.

I have tried this.

password_query = SELECT username as user, password FROM mailbox WHERE
username = '%u' AND active=1

But it do not make the user name case insensitive. I can login with
CAPITAL and small letter user names and getting two different inboxes.

> Another way would be to change the SQL query to do case sensitive
> comparision instead of .. where user = '%u'. I don't remember how
> exactly this was done with MySQL, see its documentation.

This can be done with

password_query = SELECT password FROM mailbox WHERE username = BINARY
'%u' AND active=1

But this will stop login case senstive (do not allow the capital user,
in my case as mysql have lower case user, this is what i have done
now).

This will almost solve my problem. But it will be great if i can allow
case insensitive login to mail box.

Regards,

Yujin

------------------------------------
http://www.flashwebhost.com


More information about the dovecot mailing list