Re: case sensitivity
On Fri, 29 Apr 2005, Dag-Erling Smørgrav wrote: > From: Dag-Erling Smørgrav <[EMAIL PROTECTED]> > To: info-cyrus@lists.andrew.cmu.edu > Date: Fri, 29 Apr 2005 11:11:47 +0200 > Subject: case sensitivity > > I discovered by accident that lmtpd (or possibly deliver, or both) is > case-sensitive; mail to [EMAIL PROTECTED] will bounce with > > 550-Mailbox unknown. Either there is no mailbox associated with this > 550-name or you do not have authorization to see it. > > Is this intentional? It doesn't seem right; mail addresses are > supposed to be case insensitive. Not quite. The spec (RFC2822 I think) mandates that mail domain names are case insensitive. The local part is case sensitive. > Can this be fixed in Cyrus, or do I have to set up my SMTP server > (Postfix) to lowercase the address before delivering each message > to Cyrus? Others have pointed out how to do this in Cyrus. I believe most modern MTAs have facilities for handling local parts as case insensitive. For example it's the default with Exim unless you set caseful_local_part as a router option. -- Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK [EMAIL PROTECTED] Phone: +44 1225 386101
Re: case sensitivity
Zitat von Dag-Erling Smørgrav <[EMAIL PROTECTED]>: I discovered by accident that lmtpd (or possibly deliver, or both) is case-sensitive; mail to [EMAIL PROTECTED] will bounce with 550-Mailbox unknown. Either there is no mailbox associated with this 550-name or you do not have authorization to see it. Is this intentional? It doesn't seem right; mail addresses are supposed to be case insensitive. Can this be fixed in Cyrus, or do I have to set up my SMTP server (Postfix) to lowercase the address before delivering each message to Cyrus? Set in imapd.conf lmtp_downcase_rcpt : yes Regards Andreas --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: case sensitivity
>From imapd.conf: # Forcing recipient user to lowercase # Cyrus 2.1 is case-sensitive. If all your mail users are in lowercase, it is # probably a very good idea to set lmtp_downcase_rcpt to true. The default is # to assume the user knows what he is doing, and not downcase anything. lmtp_downcase_rcpt: yes Ondrej On Fri, 2005-04-29 at 11:11 +0200, Dag-Erling Smørgrav wrote: > I discovered by accident that lmtpd (or possibly deliver, or both) is > case-sensitive; mail to [EMAIL PROTECTED] will bounce with > > 550-Mailbox unknown. Either there is no mailbox associated with this > 550-name or you do not have authorization to see it. > > Is this intentional? It doesn't seem right; mail addresses are > supposed to be case insensitive. Can this be fixed in Cyrus, or do I > have to set up my SMTP server (Postfix) to lowercase the address > before delivering each message to Cyrus? > > DES -- Ondrej Sury <[EMAIL PROTECTED]> --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: case sensitivity
Am Freitag 29 April 2005 11:11 schrieb Dag-Erling Smørgrav: > I discovered by accident that lmtpd (or possibly deliver, or both) is > case-sensitive; mail to [EMAIL PROTECTED] will bounce with > > 550-Mailbox unknown. Either there is no mailbox associated with this > 550-name or you do not have authorization to see it. > > Is this intentional? It doesn't seem right; mail addresses are > supposed to be case insensitive. Can this be fixed in Cyrus, or do I > have to set up my SMTP server (Postfix) to lowercase the address > before delivering each message to Cyrus? > > DES master1:~# grep case /etc/imapd.conf # Forcing recipient user to lowercase # Cyrus 2.1 is case-sensitive. If all your mail users are in lowercase, it is # probably a very good idea to set lmtp_downcase_rcpt to true. The default is # to assume the user knows what he is doing, and not downcase anything. lmtp_downcase_rcpt: yes Lutz --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
Re: [PATCH][CVS IMAPd 2.1] lmtp_downcase_rcpt implementation (Re: Case Sensitivity)
On Tue, 24 Dec 2002, Lawrence Greenfield wrote: > --On Tuesday, December 24, 2002 11:57 PM -0200 Henrique de Moraes Holschuh > <[EMAIL PROTECTED]> wrote: > >On Tue, 24 Dec 2002, Lawrence Greenfield wrote: > >>--On Tuesday, December 24, 2002 12:01 AM -0200 Henrique de Moraes > >>Holschuh <[EMAIL PROTECTED]> wrote: > >>> Here's the cleaned up patch, against 2.1 CVS. It could be enhanced > >>> not to touch the +fooobar part of the recipient, I suppose. > >> > >>I guess I'm mostly of the opinion that this is an MTA job, as most other > >>recipient rewriting is, especially since Cyrus mailboxes are case > >>sensitive. > > > >Well, at least part of the MTA crew disagreed, and that was why it was > >removed from lmtp delivery in postfix. > > Well, I understand why they don't want to force all LMTP deliveries to be > downcases. But Postfix must have some method of address rewriting. It does, but AFAIK, it is a royal pain to tell it to lowercase everything using rewrites (rewrites in postfix are table based). Lots of overhead... I foresee trouble with postfix in that area, so I will be enhancing that patch shortly. It is MTA-agnostic, and it might help people with other MTAs in the future anyway. Mind you, I plan to request postfix lmtp to be configurable to lowercase everything _as well_, but I must locate and read the thread that caused people to switch that off in the first place... -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Re: [PATCH][CVS IMAPd 2.1] lmtp_downcase_rcpt implementation (Re: Case Sensitivity)
On Tue, 24 Dec 2002, Lawrence Greenfield wrote: > --On Tuesday, December 24, 2002 12:01 AM -0200 Henrique de Moraes Holschuh > <[EMAIL PROTECTED]> wrote: > > >Here's the cleaned up patch, against 2.1 CVS. It could be enhanced not to > >touch the +fooobar part of the recipient, I suppose. > > I guess I'm mostly of the opinion that this is an MTA job, as most other > recipient rewriting is, especially since Cyrus mailboxes are case sensitive. Well, at least part of the MTA crew disagreed, and that was why it was removed from lmtp delivery in postfix. > I'm not strongly opposed. I will see if I have the time to clean it up to skip +Mailbox soon, then... -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Re: Case Sensitivity
On Tue, 24 Dec 2002, Scott Smith wrote: > OK. I finally found the note in the Postfix changelog, but that doesn't > explain why he claims that the behavior changed without changing Postfix > versions? Beats me, I have no idea whatsoever... -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Re: Case Sensitivity
OK. I finally found the note in the Postfix changelog, but that doesn't explain why he claims that the behavior changed without changing Postfix versions? Scott -- [EMAIL PROTECTED] ``Chews? I'll take charleston http://storm.lackluster.net/~scott/ chews for SIXTEEN MILLIONS!!'' On Tue, 24 Dec 2002, Henrique de Moraes Holschuh wrote: > Not anymore. Old postfix (1.*) will. New postfix (snapshots, 2.0) won't. >
Re: Case Sensitivity
On Tue, 24 Dec 2002, Scott Smith wrote: > I am using a UNIX socket for Cyrus LMTPregardless, at some point, > someone stated that this behavior has changed with Postfix. I am using > 1.1.12, which up until, like, Sunday was the latest release. Latest *stable* release. And yes, the snapshot releases we were talking about just got promoted to the new stable release, and now postfix lmtp won't touch the recipient. > Discussion on this list has implied that this behavior (Postfix NOT > lowercasing the username, supposedly) has been in place for a reasonably > non-trivial amount of time. In the stable stapshots (well, even alpha postfix code is quite stable, just like cyrus ;-) ), it has been for quite some time. > So, unless someone got their dates wrong, or unless this guy is using 2.0, > then Postfix will deliver to an address with an uppercase username just > fine. Not anymore. Old postfix (1.*) will. New postfix (snapshots, 2.0) won't. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Re: Case Sensitivity
I am using a UNIX socket for Cyrus LMTPregardless, at some point, someone stated that this behavior has changed with Postfix. I am using 1.1.12, which up until, like, Sunday was the latest release. Discussion on this list has implied that this behavior (Postfix NOT lowercasing the username, supposedly) has been in place for a reasonably non-trivial amount of time. So, unless someone got their dates wrong, or unless this guy is using 2.0, then Postfix will deliver to an address with an uppercase username just fine. He didn't specify which Postfix release he was using, and IIRC he didn't even UPGRADE Postfix, just Cyrus IMAP and SASL, so Scott -- [EMAIL PROTECTED] ``Chews? I'll take charleston http://storm.lackluster.net/~scott/ chews for SIXTEEN MILLIONS!!'' On Tue, 24 Dec 2002, Henrique de Moraes Holschuh wrote: > On Tue, 24 Dec 2002, Scott Smith wrote: > > So like, what's the problem? Works fine for me: > > Your postfix is still downcasing the lmtp recipient. Try with lmtptest. > > -- > "One disk to rule them all, One disk to find them. One disk to bring > them all and in the darkness grind them. In the Land of Redmond > where the shadows lie." -- The Silicon Valley Tarot > Henrique Holschuh >
Re: Case Sensitivity
On Tue, 24 Dec 2002, Scott Smith wrote: > So like, what's the problem? Works fine for me: Your postfix is still downcasing the lmtp recipient. Try with lmtptest. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Re: Case Sensitivity
So like, what's the problem? Works fine for me: Dec 24 02:00:15 storm postfix/qmgr[88272]: F0DACCEE0B: from=<[EMAIL PROTECTED]>, size=644, nrcpt=1 (queue active) Dec 24 02:00:15 storm postfix/smtpd[88677]: disconnect from gecko.roadtoad.net[209.209.8.2] Dec 24 02:00:15 storm postfix/lmtp[88678]: F0DACCEE0B: to=<[EMAIL PROTECTED]>, relay=/var/imap/socket/lmtp[/var/imap/socket/lmtp], delay=2, status=sent (250 2.1.5 Ok) That's with cyrus-imapd-2.1.11 (just upgraded), postfix-1.1.11. -- [EMAIL PROTECTED] ``Chews? I'll take charleston http://storm.lackluster.net/~scott/ chews for SIXTEEN MILLIONS!!'' On Mon, 23 Dec 2002, Henrique de Moraes Holschuh wrote: > On Mon, 23 Dec 2002, Amos Gouaux wrote: > > When the discussion came up on postfix-users after some folks found > > this problematic, it was decided that it was wrong of the lmtp > > client to forcibly downcase everything. Now we run into this fun. > > Bleh. They should have added an option so that we can tell it to lowercase > stuff :( > > > I wonder, perhaps there could be a switch to the Cyrus lmtp server > > to downcase stuff? Maybe I'm wrong, but it seems like this is logic > > See the attached, untested patch. I will send it to CMU after testing it. > > -- > "One disk to rule them all, One disk to find them. One disk to bring > them all and in the darkness grind them. In the Land of Redmond > where the shadows lie." -- The Silicon Valley Tarot > Henrique Holschuh >
[PATCH][CVS IMAPd 2.1] lmtp_downcase_rcpt implementation (Re: Case Sensitivity)
Here's the cleaned up patch, against 2.1 CVS. It could be enhanced not to touch the +fooobar part of the recipient, I suppose. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh diff -ru cyrus-imapd.orig/imap/lmtpengine.c cyrus-imapd/imap/lmtpengine.c --- cyrus-imapd.orig/imap/lmtpengine.c 2002-11-03 12:33:59.0 -0200 +++ cyrus-imapd/imap/lmtpengine.c 2002-12-23 23:58:09.0 -0200 @@ -1114,9 +1114,12 @@ char *user; int r, sl; address_data_t *ret = (address_data_t *) xmalloc(sizeof(address_data_t)); +int forcedowncase; assert(addr != NULL && msg != NULL); +forcedowncase = config_getswitch("lmtp_downcase_rcpt", 0); + if (*addr == '<') addr++; dest = user = addr; @@ -1149,11 +1152,12 @@ else { while (*addr != '@' && *addr != '>') { if (*addr == '\\') addr++; - *dest++ = *addr++; + if (! forcedowncase) *dest++ = *addr++; + else *dest++ = TOLOWER(*addr++); } } *dest = '\0'; - + r = verify_user(user, ignorequota ? -1 : msg->size, msg->authstate); if (r) { /* we lost */ diff -ru cyrus-imapd.orig/man/imapd.conf.5 cyrus-imapd/man/imapd.conf.5 --- cyrus-imapd.orig/man/imapd.conf.5 2002-11-21 09:11:37.0 -0200 +++ cyrus-imapd/man/imapd.conf.52002-12-23 23:54:56.0 -0200 @@ -232,6 +232,9 @@ mailbox is over quota. By default, the failure is temporary. .IP "\fBlmtp_allowplaintext:\fR " 5 Allow the use of the SASL PLAIN mechanism for LMTP. +.IP "\fBlmtp_downcase_rcpt:\fR no" 5 +If enabled, lmtpd will convert the entire recipient address to lowercase, +including any address extensions "+folder". .IP "\fBpostuser:\fR " 5 Userid used to deliver messages to shared folders. For example, if set to "bb", email sent to "bb+shared.blah" would be delivered to the
Re: Case Sensitivity
Hmmm, with 2.2 out of CVS, uppercase username works just fine... Scott -- [EMAIL PROTECTED] ``Chews? I'll take charleston http://storm.lackluster.net/~scott/ chews for SIXTEEN MILLIONS!!'' On Mon, 23 Dec 2002, Vernon A. Fort wrote: > With the current release of cyrus-imapd-2.1.11, is there now case > sensitivity on the lmtp delivery. With 2.1.10 and previous version, I could > email VFORT and well as vfort and it would be delivered. I just (today) > reinstall our mail server from: > > Cyrus-2.0.16 to cyrus-2.1.11 using the same version of postfix. > > I simply copied the mailboxes.db file from the var/imap to the /var/lib/imap > and restarted the server. This was a fresh install. I have worked with > previous 2.1 version and have not seen this feature. Is there any way to > get around this other that having multiple aliases entried? > > All I get is user unknown > > Andy > > --- > Vernon A. Fort (Andy) > Provident Solutions, LLC > (615) 427-4016 http://www.provident-solutions.com > >
Re: Case Sensitivity
On Mon, 23 Dec 2002, Amos Gouaux wrote: > When the discussion came up on postfix-users after some folks found > this problematic, it was decided that it was wrong of the lmtp > client to forcibly downcase everything. Now we run into this fun. Bleh. They should have added an option so that we can tell it to lowercase stuff :( > I wonder, perhaps there could be a switch to the Cyrus lmtp server > to downcase stuff? Maybe I'm wrong, but it seems like this is logic See the attached, untested patch. I will send it to CMU after testing it. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh Index: imap/lmtpengine.c === RCS file: /home/cvs/debian/cyrus21-imapd/imap/lmtpengine.c,v retrieving revision 1.17 diff -u -r1.17 lmtpengine.c --- imap/lmtpengine.c 15 Nov 2002 00:24:28 - 1.17 +++ imap/lmtpengine.c 23 Dec 2002 22:11:54 - @@ -1116,9 +1116,12 @@ int r, sl; address_data_t *ret = (address_data_t *) xmalloc(sizeof(address_data_t)); char lmtpeolat; +int forcedowncase; assert(addr != NULL && msg != NULL); +forcedowncase = config_getswitch("lmtp_downcase_rcpt", 0); + /* disgusting hack to allow [EMAIL PROTECTED] users */ lmtpeolat = config_getswitch("robot101mode",0) ? '\0' : '@'; @@ -1154,11 +1157,12 @@ else { while (*addr != lmtpeolat && *addr != '>') { if (*addr == '\\') addr++; - *dest++ = *addr++; + if (! forcedowncase) *dest++ = *addr++; + else *dest++ = TOLOWER(*addr++); } } *dest = '\0'; - + r = verify_user(user, ignorequota ? -1 : msg->size, msg->authstate); if (r) { /* we lost */ Index: man/imapd.conf.5 === RCS file: /home/cvs/debian/cyrus21-imapd/man/imapd.conf.5,v retrieving revision 1.18 diff -u -r1.18 imapd.conf.5 --- man/imapd.conf.525 Nov 2002 21:16:21 - 1.18 +++ man/imapd.conf.523 Dec 2002 22:14:53 - @@ -235,6 +235,9 @@ mailbox is over quota. By default, the failure is temporary. .IP "\fBlmtp_allowplaintext:\fR " 5 Allow the use of the SASL PLAIN mechanism for LMTP. +.IP "\fBlmtp_downcase_rcpt:\fR no" 5 +If enabled, lmtpd will convert the entire recipient address to lowercase, +including any address extensions "+folder". .IP "\fBpostuser:\fR " 5 Userid used to deliver messages to shared folders. For example, if set to "bb", email sent to "bb+shared.blah" would be delivered to the
Re: Case Sensitivity
> On Mon, 23 Dec 2002 19:12:42 -0200, > Henrique de Moraes Holschuh <[EMAIL PROTECTED]> (hdmh) writes: hdmh> On Mon, 23 Dec 2002, Vernon A. Fort wrote: >> >> Cyrus-2.0.16 to cyrus-2.1.11 using the same version of postfix. >> hdmh> Well, as a workaround, use pipe delivery on postfix (and thus, use the hdmh> deliver Cyrus program, which is much slower than LMTP), and tell postfix to hdmh> lowercase the recipient. I guess this is why the original Postfix lmtp client downcased everything. I remember noticing it at the time, but it didn't cause me problems, so I didn't think much of it. When the discussion came up on postfix-users after some folks found this problematic, it was decided that it was wrong of the lmtp client to forcibly downcase everything. Now we run into this fun. I wonder, perhaps there could be a switch to the Cyrus lmtp server to downcase stuff? Maybe I'm wrong, but it seems like this is logic more appropriate for the LDA, not the conduit to that LDA. Thoughts? What does Sendmail do, anyway? -- Amos
Re: Case Sensitivity
On Mon, 23 Dec 2002, Vernon A. Fort wrote: > > Cyrus-2.0.16 to cyrus-2.1.11 using the same version of postfix. > Well, as a workaround, use pipe delivery on postfix (and thus, use the deliver Cyrus program, which is much slower than LMTP), and tell postfix to lowercase the recipient. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh