james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Case sensitivity "Bug"?
Date Mon, 18 Nov 2002 18:02:43 GMT

What I meant is that my reading of RFC 2821 gives us latitude to make the
decision for James (which is why "Bug" was in quotes).  Here are the
relevent portions from RFC 2821:


   Verbs and argument values (e.g., "TO:" or "to:" in the RCPT command
   and extension name keywords) are not case sensitive, with the sole
   exception in this specification of a mailbox local-part (SMTP
   Extensions may explicitly specify case-sensitive elements).  That is,
   a command verb, an argument value other than a mailbox local-part,
   and free form text MAY be encoded in upper case, lower case, or any
   mixture of upper and lower case with no impact on its meaning.  This
   is NOT true of a mailbox local-part.  The local-part of a mailbox
   MUST BE treated as case sensitive.  Therefore, SMTP implementations
   MUST take care to preserve the case of mailbox local-parts.  Mailbox
   domains are not case sensitive.  In particular, for some hosts the
   user "smith" is different from the user "Smith".  However, exploiting
   the case sensitivity of mailbox local-parts impedes interoperability
   and is discouraged.

So, yes, during the SMTP portion of processing, case sensitivity must be
preserved.  No SMTP handler can discard the case of the local part.
However, when our list manager processes the local part, what is our option
then?  From another portion of the RFC:


      Local-part = Dot-string / Quoted-string
            ; MAY be case-sensitive

   While the above definition for Local-part is relatively permissive,
   for maximum interoperability, a host that expects to receive mail
   SHOULD avoid defining mailboxes where the Local-part requires (or
   uses) the Quoted-string form or where the Local-part is case-
   sensitive.  For any purposes that require generating or comparing
   Local-parts (e.g., to specific mailbox names), all quoted forms MUST
   be treated as equivalent and the sending system SHOULD transmit the
   form that uses the minimum quoting possible.

Translating that part for this specific issue, I read it as: "James hosts
SHOULD avoid defining mailboxes where the Local-part (list command) is

So the reason why I said that it isn't an RFC issue is that the RFC does not
mandate local behavior.  It simultaneously mandates that the exchange must
preserve case sensitivity, and encourages that the server ignore case, but
it does not mandate that the server ignore case.  Contrary to your statement
that "the RFC's would expect james-user-ON and james-user-on to be two
distinct addresses", I read it as saying that the RFC requires that the
transport PRESERVE that option, but discourages servers from actually taking
advantage of it.

In any event, I do agree with you on the overall picture.  My analysis is
that we already have the <usernames> configuration element to specify
whether or not the server treats local parts as  case-sensitive.  However,
we don't expose this configuration information via the Mailet API, and this
is something that really must be available to Matchers and Mailets in order
for them to play their part.

	--- Noel

-----Original Message-----
From: Danny Angus [mailto:danny@apache.org]
Sent: Monday, November 18, 2002 5:10
To: James Developers List
Subject: RE: Case sensitivity "Bug"?

it *is* an rfc issue, local parts should be case-sensitive.
While its unlikely to actually break anything real it would be better to
make case-sensitivity a configurable option, allowing operators to specify
non standard behaviour.
The RFC's would expect james-user-ON and james-user-on to be two distinct
addresses, and anyone working with this knowledge in mind may be bamboozled
if we don't provide standard behaviour as standard, but pleased if we allow
them to override it.

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: 18 November 2002 08:01
> To: James-Dev Mailing List
> Subject: Case sensitivity "Bug"?
> This isn't an RFC issue, but shouldn't these be case insensitive?
>     public boolean matchRecipient(MailAddress recipient) {
>         if (recipient.getHost().equals(listservAddress.getHost())) {
>             if (recipient.getUser().equals(listservAddress.getUser() +
> "-on")
>                 || recipient.getUser().equals(listservAddress.getUser() +
> "-off")) {
>                 return true;
>             }
>         }
>         return false;
>     }
> That is from CommandForListserv.java.  I just ran into a situation where a
> user was sending e-mail to the list address with a different case than
> expected.
> 	--- Noel

To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message