Hi, I have mail box info at mydomain.com stored in MySQL db. But dovecot is allowing me to login as both INFO at MYDOMAIN.COM info at mydomain.com Shows two mail boxes. The small letter account is the one mail server really deliver all mails. Is there any way i can specify all login names are small letters, so that user always access real mail box ? Regards, Yujin ------------------------------------ http://www.flashwebhost.com
On 7.8.2006, at 23.11, FlashWebHost.com wrote:> I have mail box info at mydomain.com stored in MySQL db. > > But dovecot is allowing me to login as both > > INFO at MYDOMAIN.COM > info at mydomain.com > > Shows two mail boxes. The small letter account is the one mail server > really deliver all mails. > > Is there any way i can specify all login names are small letters, so > that user always access real mail box ?One way would be to allow both, but change the username to the correct case: password_query = select user, password, .. ie. make it return the "user" field as in the database. 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060807/79c43eec/attachment.bin>
> 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