Re: [Exim] Reject on "X-Easynet-RBL-Warning" header

Etusivu
Poista viesti
Vastaa
Lähettäjä: Mark Hynes
Päiväys:  
Vastaanottaja: Exim Users
Kopio: Rory Campbell-Lange
Aihe: Re: [Exim] Reject on "X-Easynet-RBL-Warning" header
On May 04, Anand Buddhdev wrote:
> On Tue, May 04, 2004 at 03:11:42PM +0100, Rory Campbell-Lange wrote:
>
> > Easynet is routing mail to us through it servers, and sometimes adds a
> > header like this "X-Easynet-RBL-Warning".
> >
> > I'd like to reject messages with this header. I'm not sure how to do it.
> >
> > acl_check_data:
> >
> >     deny message   = "Host in Easynet RBL"
> >        condition   = ${if {$header}{"X-Easynet-RBL-Warning"}{yes}{no}}
> >        log_message = "RBL: Easynet RBL $h_sender"

>
> Try:
>
> condition = ${if def:header_x-easynet-rbl-warning {yes} {no} }


That'll reject them, yes. Just thought I should clarify the rather
misleading name of the header though:

It's not intended to mean "The sending host is in an Easynet block list", but
rather "The sending host was found in a dns list by Easynet" - we don't
have our own list, currently the sbl-xbl.spamhaus.org list is checked. That
might change, but the right hand side of the header should say what list.

Of course the header name is badly worded for another reason too - it shouldn't
be suggesting that it's "the RBL" but rather "a DNSBL" or similar.

It might be useful too to make your rejection message have more detail,
by including the header or the right hand side of it in the message, eg. an
example of the header is:

X-Easynet-RBL-Warning: 61.173.41.46 is listed at sbl-xbl.spamhaus.org - See http://www.spamhaus.org/query/bl?ip=61.173.41.46

...so you could give a more informative reject message with, for example:

    deny message   = ${sg {$header_X-Easynet-RBL-Warning:}{^.+: (.*)\$}{\$1}}
         condition = ${if def:header_X-Easynet-RBL-Warning: {yes}{no}}
         log_message = Your log message


which would return "550 61.173.41.46 is listed at sbl-xbl.spamhaus.org - See http://www.spamhaus.org/query/bl?ip=61.173.41.46"

Hope that's of use,

--
  Mark Hynes               mark.hynes@???
    Service Developer        http://www.uk.easynet.net/
      Easynet Ltd