[exim] LHS quoting rules in local_parts option

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: exim-users
Tárgy: [exim] LHS quoting rules in local_parts option
Morning all,

I'm trying to figure out if I'm doing something stupid or if this is a
problem. Enlightenment sought.

We have a mail-system which issues mail-domains to customers and
customers get to use any LHS they want. We should accept and pass
through anything RFC-compliant. We have some mildly complicated rewrite
rules which inherently handle some filtering, but I want the ability to
have clean whitelisting and blacklisting of LHSs, on a per-customer
basis. So, CDB file (we use a lot of those) with the mail-domain as the
key and a colon-separated list of LHSs, wherein colons in data are
doubled up for Exim, as the CDB value.

Hence a CDB dump of blacklist-exim.cdb shows things like:

+NN,27:some.account.here->humpty:noob:"foo bar":funky

On our test platform, this works nicely for the simple case. But the
<"foo bar"@???> blacklist is not being matched. I'm
wondering why?

  blacklist_filter:
    driver = redirect
    verify_only
    no_expn
    local_part_suffix = +*
    local_part_suffix_optional
    domains = cdb;DISTCONF/blacklist-exim.cdb
    local_parts = $domain_data
    allow_fail
    data = :fail: Blacklisted LHS for mail-domain $domain


And vaguely anonymised output of "exim -oX 26 -d -bd" includes:

61034 --------> blacklist_filter router <--------
61034 local_part=foo bar domain=some.account.here
61034 checking domains
61034 search_open: cdb "/path/to/blacklist-exim.cdb"
61034 cached open
61034 search_find: file="/path/to/blacklist-exim.cdb"
61034 key="some.account.here" partial=-1 affix=NULL starflags=0
61034 LRU list:
61034 0/path/to/blacklist-exim.cdb
61034 0/path/to/whitelist-exim.cdb
61034 0/path/to/devnull-exim.cdb
61034 0/path/to/maildomain_accept-exim.cdb
61034 0/path/to/smtp-chn-exim.cdb
61034 0/path/to/rewrite-same-exim.cdb
61034 0/path/to/rewrite-one-exim.cdb
61034 0/path/to/rewrite_address-exim.cdb
61034 0/path/to/lhs_corpdomains.cdb
61034 0/path/to/forbidden-helo-exim.cdb
61034 End
61034 internal_search_find: file="/path/to/blacklist-exim.cdb"
61034 type=cdb key="some.account.here"
61034 file lookup required for some.account.here
61034 in /path/to/blacklist-exim.cdb
61034 lookup yielded: humpty:noob:"foo bar":funky
61034 some.account.here in "cdb;/path/to/blacklist-exim.cdb"? yes (matched "cdb;/path/to/blacklist-exim.cdb")
61034 checking local_parts
61034 foo bar in "humpty:noob:"foo bar":funky"? no (end of list)
61034 blacklist_filter router skipped: local_parts mismatch

Should the local_parts option be automatically applying quote_local_part
as needed? Is the current behaviour correct and should I then be
trying to fudge something together with a condition option?

Thanks,
-- 
Phil Pennock,       Senior Systems Administrator,      Demon Netherlands
NL Sales: +31 20 422 20 00      Thus Plc      NL Support: 0800 33 6666 8