uppercase usernames

Julien Coloos julien.coloos at gmail.com
Mon Mar 11 18:55:30 EDT 2013


Le 11/03/2013 23:00, Joerg Maier a écrit :
> Hi Julien,
>
> Thanks for the hint!
>
> My system is (now) Ubuntu 12.04.2 LTS. I found normalizeuid in the 
> docs, which I set to 0. Still with the same result.
>
> I scanned the code a bit as well, I find such a patch in the Ubuntu 
> distribution patches 
> (cyrus-imapd-2.4.2-903-normalize-authorization-id.patch). If I 
> understand the code, it is initialized with 0, and only if set to 1 if 
> config says.
>
> I think now, the best solution would be to install a debug version 
> somewhere and see which of the 68 tolower calls in the code performs 
> my unwanted tolower and why.
>
> As I only have 20 mailboxes with UpperCase letters in them, and after 
> testing I found that a combination of "rename user/CamelCase 
> user/camelcase" plus "sam user/camelcase camelcase lrswipcda" plus 
> some account changing in the database will fix my issue,
> - without any manual configuration steps for the users
> - still the rcpt to:CamelCase mails will get to the renamed account
>
> Thanks for all your help. I guess the next person who runs into this 
> and reads this thread needs to debug a bit or study the code investing 
> more time.
>
> Joerg

Maybe it's the same patch than in RedHat. There the issue is that cyrus 
configuration code is separated in 2 parts: one in the core library 
(pretty much static; values accessed with 
libcyrus_config_getxxx/libcyrus_config_setxxx), the other being 
accessible in all services and populated from the content of imapd.conf 
(values accessed with config_getxxx).
The patch declares the option in both parts and uses 
libcyrus_config_getxxx to query the value because it is needed in the 
core library. From what I could see, what is lacking is a line of code - 
usually in imap/global.c:cyrus_init - do get the value from imapd.conf 
and set it in the core library, like it is already done for some other 
options. Example with username_tolower:

     libcyrus_config_setswitch(CYRUSOPT_USERNAME_TOLOWER,
                   config_getswitch(IMAPOPT_USERNAME_TOLOWER));

I don't know who is in charge of this patch, but maybe Jeroen can help 
fix the issue on RedHat side. Actually he seems also linked to the patch 
on Debian ? 
(http://git.kolabsys.com/apt/cyrus-imapd/diff/debian/patches/cyrus-imapd-2.4.2-903-normalize-authorization-id.patch?h=debian/master&id=e3af2e17dc0d31ad8c8f7360970f93fe7fbf6d3e)



More information about the Info-cyrus mailing list