Max CtRiX
2005-Sep-05 07:36 UTC
[Dovecot] Problem in dovecot 0.99 - login username case sensitive create fake maildirs
Hello, I have noticed a weird behaviour in dovecot 0.99 which, I hope, is not replicated in 1.0-alpha. First I have to say that it works very well. So if I login with user foo at bar.com, the maildir is created. But when I log in with User FOO at BAR.COM, or FOO at BAR.com, then two other maildirs are created. Authentication is ok (I'm using mysql backend) but no mails are obviously found. Maybe a solutions would be adding some config item to turn lowercase the maildir path or authentication tokens (received from client) at login time. Or maybe I am missing something. Is there a solution for this problem out there ? Thanks, Massimo
Chris Wakelin
2005-Sep-05 09:22 UTC
[Dovecot] Problem in dovecot 0.99 - login username case sensitive create fake maildirs
In 1.0, you can have auth_username_translation AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz which converts the username to lower-case. Best Wishes, Chris Max CtRiX wrote:> > Hello, > > I have noticed a weird behaviour in dovecot 0.99 which, I hope, is not > replicated in 1.0-alpha. > > First I have to say that it works very well. > So if I login with user foo at bar.com, the maildir is created. > > But when I log in with User FOO at BAR.COM, or FOO at BAR.com, then > two other maildirs are created. Authentication is ok (I'm using mysql > backend) but no mails are obviously found. > > Maybe a solutions would be adding some config item to turn lowercase the > maildir path or authentication tokens (received from client) at login time. > > Or maybe I am missing something. Is there a solution for this problem > out there ? > > Thanks, > Massimo > > >-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin at reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
Timo Sirainen
2005-Sep-11 11:27 UTC
[Dovecot] Problem in dovecot 0.99 - login username case sensitive create fake maildirs
On Mon, 2005-09-05 at 09:36 +0200, Max CtRiX wrote:> Hello, > > I have noticed a weird behaviour in dovecot 0.99 which, I hope, is not > replicated in 1.0-alpha. > > First I have to say that it works very well. > So if I login with user foo at bar.com, the maildir is created. > > But when I log in with User FOO at BAR.COM, or FOO at BAR.com, then > two other maildirs are created. Authentication is ok (I'm using mysql > backend) but no mails are obviously found.One problem here is that mysql matches strings case-insensitively. If you changed your pass_query to match the username case-sensitively, this problem wouldn't exist (I'm not sure how that could be done, probably there's some function). With 1.0alpha you can also return a changed username in pass_query. For example: password_query = SELECT userid as user, password FROM users WHERE userid = '%u' That changes the username to be in the same case as it's in database. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050911/dcc5d03f/attachment.bin>