Re: [EXIM] Local-part case comparison in sender_reject_recip…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: David Osborne
CC: exim-users
Subject: Re: [EXIM] Local-part case comparison in sender_reject_recipients
On Fri, 23 Jan 1998, David Osborne wrote:

> I'm trying to reject incoming mail from a specific sender who has a
> mixed-case local part. I use
>
> sender_reject_recipients = partial-dbm;/usr/local/exim/tables/blacklist
>
> which normally works fine. However, mail from that sender arrived last night
> despite their address being in the dbm database. After testing exim in debug
> mode on a separate port, I think the problem is the mixed case of the local
> part. If I add a lowercased version of the address to my blacklist and test
> that in an SMTP connection, it's rejected as I expect. However, the mixed
> case version is not rejected, even if both the mixed-case and lowercased
> versions are in the database.


I have this item on my problems list. I don't know what to do about it.
In theory <abc@domain> and <ABC@domain> (where domain is some remote
domain you don't know anything about) could be entirely different
mailboxes. Consequently, the check for whole email addresses is done
with the local part unmodified.

How are you building the DBM database? If you are using exim_dbmbuild,
then it lowercases the keys automatically, because it was designed for
building alias databases for your local local parts, which Exim
lowercases (by default nowadays - originally there was no option).

If you use the @@ lookup facility, things are better. Domains are
caseless, so it looks up the domain whatever its case. You can then
arrange to have any cased versions in the local parts list.

Alternatively, put the special case directly into the configuration file
rather into the DBM file. You can force lowercasing if you use a regular
expression by means of the (?i) flag-setting feature.

How I wish, Oh, how I wish, Oh, how I *really*, *really* wish, that
entire email addresses were deemed to be caseless. The current state has
caused no end of grief.


-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



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