[EXIM] Case of local parts

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: exim-users
Aihe: [EXIM] Case of local parts
The fact that the RFCs require local parts in addresses to be treated in
a case-sensitive manner has been the cause of a number of problems.
There is now a small change of stance in RFC 2505 (Anti-Spam
Recommendations), which says

   Of course string matching on domain/host names MUST NOT be case      
   sensitive. Since <local-part> may be case sensitive it may be natural
   to keep that here. However, since <sPAmMeR@???> and  
   <spammer@???> is most probably the same user and since the
   string compares are used to refuse his messages, we suggest that   
   <local-part> comparisons be case insensitive too.   


The code in Exim is currently inconsistent.

It retains the case of local parts when checking addresses against, for
example, sender_reject. However, when checking local parts by direct
string comparison (if they appear in the list or in an @@ list) the
comparisons are done caselessly. On the other hand, if the local part is
looked up in some keyed file, the caseful version is used as the key.
This isn't in fact a problem with lsearch, because that has always been
caseless - because it was invented for alias files, and aliases are
caseless, and I never changed it. However, if an lsearch file is
converted to a DBM file (say) it can lead to surprises.

I believe that in practice, treating all local parts caselessly will not
lead to any problems, and may in fact be beneficial. What do people
think of the following proposal?

. When checking an address against any option that is an address list
(sender_reject, sender_reject_recipients, sender_reject_except, etc.)
Exim will normally lower case the local part as well as the domain in
the address that it is testing.

. However, in order to retain the current behaviour for those that want
it, an option is provided. This will be per address list, for maximum
flexibility. I'm thinking of some special address list item such as
"+caseful" (compare "+allow_unknown" in domain lists) which is not a
syntactically valid item.

This is an incompatible change, but I think it will be a change for the
better. If you disagree, please shout!


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***