Re: [exim] expansion operator address: case-sensitive?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Reinhard Haller
CC: exim-users
Sujet: Re: [exim] expansion operator address: case-sensitive?
On Sat, 9 Oct 2004, Reinhard Haller wrote:

> RFC 2821 (2.4) states:
>
> 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.
>
> Therefore my question:
>
> Is the behavior of the expansion operators address/domain/local_part
> feature or bug?


If only we could have had *everything* case-independent, life would be
much easier. I believe that Exim is working as intended. When processing
a local part, it normally lower cases it because most sites, most of the
time, want this. There are switches (e.g. caseful_local_part in routers)
for those few sites that want to process local parts in a case-dependent
manner.

However, the fact that Exim processes things case-independently does not
mean that it should always force all the values that it keeps into lower
(or upper) case. It keeps most of them in the original case, because
that's what people want. (It even keeps local parts in the original
case, and uses that in outgoing RCPT TO: commands, for example.) You
would probably not be happy if you sent a message from
Reinhard.Haller@??? and it arrived at the other end with that
address in a different case.

All of this is a compromise. $local_part and $domain in routers are
(unless you use caseful_local_part) in lower case, but other values keep
their original cases. There are expansion operators that can be used to
enforce case independence if you need it: see eqi and lc/uc.

I think I have just taken 3 paragraphs to say "feature". :-)

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book