Re: [exim] DNS Blacklist/DNS Whitelist

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Marc Sherman
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] DNS Blacklist/DNS Whitelist
Pascal wrote:
>
> I was guessing it should be something like this:
>
>    accept message        = X-Blacklist-Whitelisted: $sender_host_address is 
> listed at $dnslist_domain
>           dnslists       = nlwhitelist.dnsbl.bit.nl

>
>    warn  message         = X-Blacklist-Warning: $sender_host_address is 
> listed at $dnslist_domain ($dnslist_text)
>          log_message     = $sender_host_address is listed at 
> $dnslist_domain ($dnslist_value: $dnslist_text)
>          dnslists        = sbl.spamhaus.org:virbl.dnsbl.bit.nl:relays.ordb.org

>
> I however would expect that sending a mail through a mailserver that is on
> the nlwhitelist would be tagged
> with the X-Blacklist-Whitelisted header. This however seems not to be the
> case when I tested this.


The problem is that the "message" ACL condition is heavily overloaded.
It only adds a message header when used on a "warn" verb; when used on a
verb that rejects a message, such as deny or require, it instead sets
the error that is returned with the 5xx message. On an accept, it's
behaviour seems to be undefined by my read of the spec.

Philip, I think it would be good if warn set a header on an accept, as
well. Can you add that to the wishlist?

Until then, Pascal, you'll have do something like do your whitelist test
in a warn which sets the header and an acl variable, and then test the
acl variable in an accept right after it.

See:
http://exim.org/exim-html-4.60/doc/html/spec.html/ch39.html#SECTACLmodi
http://exim.org/exim-html-4.60/doc/html/spec.html/ch39.html#SECTaddheadwarn

- Marc