[Exim] Match failing against negated regexp in address-list

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Phil Pennock
日付:  
To: Exim Users
題目: [Exim] Match failing against negated regexp in address-list
Hi,

Related to my earlier post, we have a CDB file holding rewrites to
/dev/null. I've just been scratching my head trying to figure out a
customer problem; I've ended up using a work-around, but clearly I'm
missing something so I seek enlightenment.

CDB file, keyed by domain, result is address-list; so:

devnull_filtering:
driver = smartuser
transport = devnull
domains = cdb;DEVNULLCDB
local_parts = $domain_data

If the $domain_data is something like:

fred:barney:wilma

then this works fine -- mail to fred@, barney@ and wilma@ disappears
down the bitbucket.

If the $domain_data is something like:

^.*[0-9]+.*$
or:
! ^(postmaster|fred|barney)$

then it again works; in the former case, addresses with a digit in the
LHS are filtered (spammers commonly fake their sender to be something
like <GarbageAndDigits@???>, so this is one
solution which customers like); in the latter case, only mail for
postmaster@, fred@ or barney@ is accepted, everything else experiences
terminal bitbucket syndrome.

If the $domain_data is something like:

^.*[0-9]+.*$:ebay:sales

then again, this works as expected; mails to ebay@, sales@ and
anything-with-digits-in-it@ is filtered to the bitbucket. Everything
else is accepted.


Now, if $domain_data is something like:

! ^(postmaster|webmaster|valid_1|valid_2)$:fred:barney

then this doesn't work; the "fred" and "barney" are redundant, so the
work-around was to remove them, but I don't see why foo@ failed to
match. It seems that the negated regexp only works if it's not part of
a list.

This is Exim 3.36; any pointers much appreciated.

Ta,
--
2001: Blogging invented. Promises to change the way people bore strangers with
banal anecdotes about their pets. <http://www.thelemon.net/issues/timeline.php>