Неворотин Вадим
2010-May-05 11:37 UTC
[Dovecot] [Bug] Case sensitive usernames and variables
Today I've found a very irritating bug: I use mail_location = maildir:/var/mail/%u/ in my dovecot.conf. And if user type Username, username, USERname etc at login dovecot create a different Maildir's for one real user. But LDA works corretly and save all messages to lowercase username mailbox. No problem, add L: mail_location = maildir:/var/mail/%Lu/ Then all works good. But I has also such namespace configuration: namespace shared { separator = / prefix = &BCAEMARBBEEESwQ7BDoEOA-/%%u/ location = maildir:/var/mail/%%u:INDEX=/var/mail/%u/shared/%%u subscriptions = no list = children } And here I can't replace %u with %Lu, because dovecot write to dovecot.log: IMAP(malamut): Error: Namespace '&BCAEMARBBEEESwQ7BDoEOA-/%Lu/': shared: Shared namespace prefix contains unknown variables So user has only one mailbox (with lovercase name), but a lot of different indexes for shared mailboxes, eg /var/mail/username/shared, /var/mail/USERname/shared etc. How can I tune dovecot to use always lowercase username? Dovecot 1.2.10
Steffen Kaiser
2010-May-05 12:03 UTC
[Dovecot] [Bug] Case sensitive usernames and variables
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 5 May 2010, ????????? ????? wrote:> corretly and save all messages to lowercase username mailbox. No problem, > add L: > > mail_location = maildir:/var/mail/%Lu/ > > Then all works good. But I has also such namespace configuration: > > namespace shared { > separator = / > prefix = &BCAEMARBBEEESwQ7BDoEOA-/%%u/ > location = maildir:/var/mail/%%u:INDEX=/var/mail/%u/shared/%%u > subscriptions = no > list = children > } > > And here I can't replace %u with %Lu, because dovecot write to dovecot.log: > > IMAP(malamut): Error: Namespace '&BCAEMARBBEEESwQ7BDoEOA-/%Lu/': shared: > Shared namespace prefix contains unknown variables >First: Is it a typo or did you replaced %%u by %Lu ? Note the different number of %'s. Second: You can have passdb return set/overwrite "user", just return the "normalized" variant of the username as "user" field: http://wiki.dovecot.org/PasswordDatabase/ExtraFields Regards, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS+Fegb+Vh58GPL/cAQJA7ggAwcbsJZ9vJR+kitrnAukttV7uqpHz16bH zHOGyF1LBIUyE3HQfl5yJWLF/H6wF3c8sY0AZfvvhrfA5+nidBGUKZbEhkuVwcw+ bp49WjJwIXoltQ+kaKuMrS3vXmbx6rFLrDrHLTQxXqlRfKhT/OqHzq84fEd7iRTw D0jyPS/Uyzvg8YrBY31Q3x8s2Sx8GFagQ1HY03RhMdB2Gft5swoQcfbjTDKmF7ax ewlX5cv7s9OTAqfTJW9xc4ryMfd/38e7Gm1/upQcOF2gHMwq2+fMUykvuMEn6OnL IoAtAxvuLe0p3VsWmxx40/rYl5J9IW1IhZG1iz7NcygHhH3H7jH2Xw==MQfV -----END PGP SIGNATURE-----