Re: [Exim] Exim 4 - problem mixing acls with hostlists

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: John Horne
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Exim 4 - problem mixing acls with hostlists
On Thu, 28 Mar 2002, John Horne wrote:

> > hostlist internal_hosts = PLYM_NET : 127.0.0.0/8
> > hostlist rbl_hosts = !+internal_hosts : ! ISP
> >
> Having thought about it, I haven't tried it yet, would the above work?
> Doesn't '!+internal_hosts' expand to:
>   ! 141.163.0.0/16 : ! 127.0.0.0/8 : *          (note the implied ':*')


Don't think in terms of "expand" except for macros. The "implied :*"
happens only for an individual list. An external ! doesn't force it into
a list that is being referenced. Think of "+internal_hosts" as a single
condition (similar to !1.2.3.4). If true, the host is in the set. The
negation happens at a higher level. The above rbl_hosts condition should
be read as

"not an internal host and not the ISP (else OK)"

The test for "is an internal host" is

"PLYM_NET or 127.0.0.0/8 (else fail)"

Exim takes the IP it has in its hand, checks first for
"+internal_hosts". If the answer is OK, we have an internal host.
!+internal_hosts returns "no" for "is host in rbl_hosts?". If the answer
is FAIL we have an external host that does not match +internal_hosts;
Exim goes on to check !ISP.

Does this help? (I realize it's hellish complicated.)

Philip

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