Re: [Exim] why was this rbl checked?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: dman
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] why was this rbl checked?
On Thu, 11 Apr 2002, dman wrote:

> hostlist not_rbl_hosts = <, !192.168.0.0/23 , !127.0.0.1/32 , !::1
>
>     warn    hosts = +not_rbl_hosts : !129.21.30.24
>             dnslists =  \
>                     dsn.rfc-ignorant.org/$sender_address_domain : \
>                     postmaster.rfc-ignorant.org/$sender_address_domain : \
>                     abuse.rfc-ignorant.org/$sender_address_domain
>             message = X-RBL-Warning: $sender_address_domain , $dnslist_domain , $dnslist_value , $dnslist_text
>             log_message = RBL : $sender_address_domain , $dnslist_domain , $dnslist_value , $dnslist_text

>
>
> I got this in my rejectlog :
>
> 2002-04-11 19:07:44 H=(martha.itusa.org) [192.168.0.4] Warning: RBL : 192.168.0.4 , abuse.rfc-ignorant.org , 127.0.0.4 , Not supporting abuse@domain


> My understanding is that that message shouldn't have been checked at
> all because it came from 192.168.0.4 (the internal side of that host).
> As it was, the domain in the Reply-To: is what failed the test.
>
> Why was this message checked?


You have fallen into a trap/confusion. Unfortunately, the flexibility of
all of this introduces complications that aren't always easy to check
out. The interactions between negations and named host lists don't
always work the way people expect.

Your case works like this:

  . Exim sees "+not_rbl_hosts", so goes away to check if the host
    matches that named list.


  . 192.168.0.0/23 does match 192.168.0.4, so the answer is "no, it
    doesn't match +not_rbl_hosts". (Your name is a bit confusing. It
    should surely be "rbl_hosts", shouldn't it?)


  . So Exim proceeds to look at the rest of its list. The host doesn't
    match 129.21.30.24, and that's the end of the list.


  . When a list ends with a negative item, there's an implied :* at the
    end, so the host matches.


It is a general case, in English and in logic, that dealing with
negatives is confusing, and double negatives are doubly confusing. Try
writing it like this instead:

hostlist local_hosts = <, 192.168.0.0/23 , 127.0.0.1/32 , ::1

  warn    hosts = !+local_hosts : !129.21.30.24


Named host lists are not the same as macros. They are like subroutines.
What you wrote would work as a macro, because the address would then be
"not in the host list" instead of just "not in this item of the host
list".



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