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

Top Page
Delete this message
Reply to this message
Author: Tor Slettnes
Date:  
To: Mark Hynes
CC: Exim Users
Subject: Re: [Exim] Reject on "X-Easynet-RBL-Warning" header
On May 5, 2004, at 05:32, Mark Hynes wrote:
> On May 04, Anand Buddhdev wrote:
>> condition = ${if def:header_x-easynet-rbl-warning {yes} {no} }


There should be a colon after the header name:
     ${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.


Some clarification! Now I am more confused than ever.

This check _does_ indeed check only for the presence of this header,
i.e. if EasyNet found the sending host in a DNSBL. This check does
_not_ result in any DNS lookup on your side. This is what you are
trying to accomplish, no?

To use the text of the header as your rejection message, you can do:

     deny message     = $header_x-easynet-rbl-warning:
          condition   = ${if def:header_x-easynet-rbl-warning: {yes}
{no}}



> ...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"


The ${sg...} part is unneccessary; $header_X-Easynet-RBL-Warning:
expands to only the content of the header, not including the header
name itself.

-tor