Re: uppercase usernames
Hi Jeroen, > Fedora[3], but I cannot make the call for Red Hat Enterprise > Linux/Ubuntu/Debian. I sent a mail to ond...@debian.org, who did last maintenance on cyrus-imapd-2.4 on Ubuntu. Joerg Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: uppercase usernames
On 2013-03-11 22:55, Julien Coloos wrote: > I don't know who is in charge of this patch, but maybe Jeroen can help > fix the issue on RedHat side. Hi, thanks for pointing this one out. I can fix the Cyrus IMAP RPM and APT packages I provide[1,2], and those that are shipped as part of Fedora[3], but I cannot make the call for Red Hat Enterprise Linux/Ubuntu/Debian. Please also note this patch does not apply cleanly to cyrus-imapd git master, and could possibly not be necessary either. Kind regards, Jeroen van Meeuwen [1] http://git.kolabsys.com/rpm/cyrus-imapd/ [2] http://git.kolabsys.com/apt/cyrus-imapd/ [3] http://pkgs.fedoraproject.org/cgit/cyrus-imapd.git/ -- Systems Architect, Kolab Systems AG e: vanmeeuwen at kolabsys.com m: +44 74 2516 3817 w: http://www.kolabsys.com pgp: 9342 BF08 Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: uppercase usernames
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) Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: uppercase usernames
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 On 2013-03-11 13:19, Julien Coloos wrote: > Hi, > > Is your system RedHat/CentOS/Fedora ? > I think their version (since 2.3.x) have a patch that "normalize" > (lowercase + strip leading and trailing whitespaces) authentication > ids. From what I could see it appears it was added as a configuration > option, but the code is not complete and so the default value > (enabled) applies. > > > Le 11/03/2013 08:49, Joerg Maier a écrit : >> Hi Dan, >> >> Thanks for you suggestion! >> >> Unfortunately, testing the solution i have in mind, i renamed and >> finally deleted my one CamelCase testaccount. And now, when I try to >> create a mailbox with CamelCase with cyradm, the default acls are >> set to >> a user with lowercase username, and I am not able to set additional >> acls >> to a user with CamelCase with sam. >> >> I suppose that "username_tolower: 0" just does not does what I >> thiought >> it did in the source installation. >> >> The solution I want to use for my users now is: >> - renaming user to lowercase in userdatabase >> - renamin cyrus account with cyradm rename to lowercase >> - creating a virtual forward rule, so postfix delivers the mail sent >> to >> CamelCase address -> camelcase (and keep lmtp_downcase_rcpt: 0 and >> username_tolower: 0 until last CamelCase adress is converted. >> >> Thanks, Joerg >> >> >> On 2013-03-11 0:29, Dan White wrote: >>> On 03/10/13 23:28 +0100, Joerg Maier joerg.maier wrote: Hi List, I am using cyrus since ~8 years for a mailserver with ~200 mailaccounts. After transferring a mailserver from cyrus 2.2 to 2.4, I have an issue with usernames containing uppercase letters. Up to now, i did tread the part before the @ as case sensitive, and i allowed users to create mailboxes like TestCApital. I have set: lmtp_downcase_rcpt: 0 username_tolower: 0 When I try: testsaslauthd -u TestCApital. -p I get 0: OK "Success." But when I try to logon via imap, i see in the logs: ... saslauthd[24118]: do_auth : auth failure: [user=testcapital.] [service=imap] [realm=] [mech=pam] [reason=PAM auth error] What is the best solution to work around this? >>> Do you get the same result with imtest? >> >> Cyrus Home Page: http://www.cyrusimap.org/ >> List Archives/Info: >> http://lists.andrew.cmu.edu/pipermail/info-cyrus/ >> To Unsubscribe: >> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: uppercase usernames
Hi, Is your system RedHat/CentOS/Fedora ? I think their version (since 2.3.x) have a patch that "normalize" (lowercase + strip leading and trailing whitespaces) authentication ids. From what I could see it appears it was added as a configuration option, but the code is not complete and so the default value (enabled) applies. Le 11/03/2013 08:49, Joerg Maier a écrit : > Hi Dan, > > Thanks for you suggestion! > > Unfortunately, testing the solution i have in mind, i renamed and > finally deleted my one CamelCase testaccount. And now, when I try to > create a mailbox with CamelCase with cyradm, the default acls are set to > a user with lowercase username, and I am not able to set additional acls > to a user with CamelCase with sam. > > I suppose that "username_tolower: 0" just does not does what I thiought > it did in the source installation. > > The solution I want to use for my users now is: > - renaming user to lowercase in userdatabase > - renamin cyrus account with cyradm rename to lowercase > - creating a virtual forward rule, so postfix delivers the mail sent to > CamelCase address -> camelcase (and keep lmtp_downcase_rcpt: 0 and > username_tolower: 0 until last CamelCase adress is converted. > > Thanks, Joerg > > > On 2013-03-11 0:29, Dan White wrote: >> On 03/10/13 23:28 +0100, Joerg Maier joerg.maier wrote: >>> Hi List, >>> >>> I am using cyrus since ~8 years for a mailserver with ~200 >>> mailaccounts. >>> >>> After transferring a mailserver from cyrus 2.2 to 2.4, I have an >>> issue >>> with usernames containing uppercase letters. Up to now, i did tread >>> the >>> part before the @ as case sensitive, and i allowed users to create >>> mailboxes like TestCApital. >>> >>> I have set: >>> lmtp_downcase_rcpt: 0 >>> username_tolower: 0 >>> >>> When I try: >>> testsaslauthd -u TestCApital. -p >>> I get >>> 0: OK "Success." >>> >>> But when I try to logon via imap, i see in the logs: >>> ... saslauthd[24118]: do_auth : auth failure: >>> [user=testcapital.] [service=imap] [realm=] [mech=pam] >>> [reason=PAM auth error] >>> >>> What is the best solution to work around this? >> Do you get the same result with imtest? > > Cyrus Home Page: http://www.cyrusimap.org/ > List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ > To Unsubscribe: > https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: uppercase usernames
Hi Dan, Thanks for you suggestion! Unfortunately, testing the solution i have in mind, i renamed and finally deleted my one CamelCase testaccount. And now, when I try to create a mailbox with CamelCase with cyradm, the default acls are set to a user with lowercase username, and I am not able to set additional acls to a user with CamelCase with sam. I suppose that "username_tolower: 0" just does not does what I thiought it did in the source installation. The solution I want to use for my users now is: - renaming user to lowercase in userdatabase - renamin cyrus account with cyradm rename to lowercase - creating a virtual forward rule, so postfix delivers the mail sent to CamelCase address -> camelcase (and keep lmtp_downcase_rcpt: 0 and username_tolower: 0 until last CamelCase adress is converted. Thanks, Joerg On 2013-03-11 0:29, Dan White wrote: > On 03/10/13 23:28 +0100, Joerg Maier joerg.maier wrote: >>Hi List, >> >>I am using cyrus since ~8 years for a mailserver with ~200 >>mailaccounts. >> >>After transferring a mailserver from cyrus 2.2 to 2.4, I have an >> issue >>with usernames containing uppercase letters. Up to now, i did tread >> the >>part before the @ as case sensitive, and i allowed users to create >>mailboxes like TestCApital. >> >>I have set: >>lmtp_downcase_rcpt: 0 >>username_tolower: 0 >> >>When I try: >>testsaslauthd -u TestCApital. -p >>I get >>0: OK "Success." >> >>But when I try to logon via imap, i see in the logs: >>... saslauthd[24118]: do_auth : auth failure: >>[user=testcapital.] [service=imap] [realm=] [mech=pam] >>[reason=PAM auth error] >> >>What is the best solution to work around this? > > Do you get the same result with imtest? Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
Re: uppercase usernames
On 03/10/13 23:28 +0100, Joerg Maier joerg.maier wrote: >Hi List, > >I am using cyrus since ~8 years for a mailserver with ~200 >mailaccounts. > >After transferring a mailserver from cyrus 2.2 to 2.4, I have an issue >with usernames containing uppercase letters. Up to now, i did tread the >part before the @ as case sensitive, and i allowed users to create >mailboxes like TestCApital. > >I have set: >lmtp_downcase_rcpt: 0 >username_tolower: 0 > >When I try: >testsaslauthd -u TestCApital. -p >I get >0: OK "Success." > >But when I try to logon via imap, i see in the logs: >... saslauthd[24118]: do_auth : auth failure: >[user=testcapital.] [service=imap] [realm=] [mech=pam] >[reason=PAM auth error] > >What is the best solution to work around this? Do you get the same result with imtest? -- Dan White Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus
uppercase usernames
Hi List, I am using cyrus since ~8 years for a mailserver with ~200 mailaccounts. After transferring a mailserver from cyrus 2.2 to 2.4, I have an issue with usernames containing uppercase letters. Up to now, i did tread the part before the @ as case sensitive, and i allowed users to create mailboxes like TestCApital. I have set: lmtp_downcase_rcpt: 0 username_tolower: 0 When I try: testsaslauthd -u TestCApital. -p I get 0: OK "Success." But when I try to logon via imap, i see in the logs: ... saslauthd[24118]: do_auth : auth failure: [user=testcapital.] [service=imap] [realm=] [mech=pam] [reason=PAM auth error] What is the best solution to work around this? Thanks a lot for support, Joerg Cyrus Home Page: http://www.cyrusimap.org/ List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/ To Unsubscribe: https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus