support at majordomo.ru
2005-Mar-30 17:16 UTC
[Dovecot] [ #14832]: Capital letters in POP3 logins
????????????, ??? ????????????? ????????? ?????????, ??????? ?? ???????? ?? ????. ???? ??????, ???????????? ?? support at majordomo.ru ? ????? "Capital letters in POP3 logins", ???????? ???????? ???????? ???????-?????????? Majordomo.ru. ??? ??????? ? ????????? ?????. ?????? ?????? ???????? ????? 14832 , ???? ? ?????????? ?? ?????? ??????????? ? ???? ?? ??????? ???????, ??????? ??? ???????. ? ?????????, ?????? ???????????? Majordomo.ru. ========================================== URL http://www.majordomo.ru phone +7 812 3200732 phone +7 095 7272278 e-mail support at majordomo.ru
Gerald V. Livingston II
2005-Mar-30 18:38 UTC
[Dovecot] [ #14832]: Capital letters in POP3 logins
I just tested and IMAP doesn't ignore case either. Remove the UPPER CASE maildir created by your POP3 login then do the same thing with an IMAP client. Set up the IMAP client to use an UPPER CASE username and when you log-in/refresh folders it creates the new UPPERCASE empty Maildir all over again. Crap, between this and the missing QUOTA feature I guess I'm gonna have to rip out Dovecot and use Courier. I really wanted to use Dovecot for it's speed with the indexing. What I don't understand is -- all usernames in my test database are stored in lower case -- shouldn't it simply fail to match and cause the login to fail? Can anyone point out how to force the match to be case sensitive? I'll investigate and get back to the list. It would be "nicer" though if Dovecot converted all username input to lower case before authenticating to maintain uniqueness of email addresses. Gerald On Wed, 30 Mar 2005 21:16:12 +0400 "support at majordomo.ru" <support at majordomo.ru> wrote:> Using dovecot (version 1.0-test59, with mysql-auth) I saw strange problem: > after authentication by POP3 in case that username given has capital letters, for example SupportTeam at majordomo.ru, > dovecot creates new maildir 'SupportTeam' for this username instead reading mails from existing maildir 'supportteam'. > Then dovecot scans created maildir 'SupportTeam' and returns 0 messages (sure:). > IMAP4 works fine in the same time.> Can I solve this problem or it is virtually "bug" of dovecot?
support at majordomo.ru wrote:> Can I solve this problem or it is virtually "bug" of dovecot?No bug, just the "garbage in, garbage out" principle. Mysql's string matches are case-insensisitive by default, so when dovecot asks mysql for the user information of UsEr1, it will get the information of user1 and therefore assumes that UsEr1 is a valid login. It's not dovecot's fault. If you want the match case-insensitive (so UsEr1 will be rejected), add the BINARY attribute to the userid field or change your query to '... WHERE BINARY userid = "%u"' in password_query and user_query. If you want to allow logins as UsEr1 (and let him access user1's mail), you have to change your dovecot.conf, I think. Use %h instead of %u there, and let user_query return the home directory with something like 'SELECT CONCAT('/var/spool/vmail/',LOWER(userid)) AS home, ...'.
In CVS pass_query can now return "user" column to replace the username that was used to log in. Besides fixing character casing problems, it also allows login aliases. -------------- 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/20050403/a7523271/attachment-0001.bin>
Reasonably Related Threads
- 1.0-test59 on OpenBSD: Undefined symbol `_strtoull' referenced
- Problem in dovecot 0.99 - login username case sensitive create fake maildirs
- AR: Be careful w/legacy column names with capital letters
- Capital letters in usernames
- Match directive can't recognize capital letters