Roundcube, Dovecot IMAP and case sensitive user names

Do your mail users like it to use mixed upper/lower case in user names? So the problem described below may hit you.

Your mail user is known to the system as user.name@domain.tld. The user itself knows himself as User Name so he naturally (it seems) uses User.Name@domain.tld when logging in to the Roundcube webmail page. Roundcube does not care much and saves User.Name@domain.tld to it's internal data base.

It tries to connect to the Dovecot IMAP server and gets a a001 NO Authentication failed. back. Dovecot indeed cares about the case. When trying to use the lower case variant user.name@domain.tld Roundcube still seems to use the former mixed case variant it already saved for connecting to the IMAP server.

To make it easy for your users just configure Dovecot to convert user names to lower case before looking it up in the system. Set this variable in /etc/dovecot/dovecot.conf:

auth_username_format = %Lu

And restart Dovecot.

Comments

perfect.. worked like

perfect.. worked like charm..
thanks

You are my man! :) Thanks

You are my man! :) Thanks

Yep .. you got it in one :-)

It's just a pity that I needed to send 20+ hours of my life (finished up installing my own sqlite auth database) before I found out .. and only then thought to Google "dovecot case sensitive" and find this & other helpful articles :-(

Congratulations all around, now lets think up ways to slowly roast those responsible :-)