Re: [exim] Multiple warning headers for multiple RBL matches

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Brian Candler
Datum:  
To: David Woodhouse
CC: exim-users
Betreff: Re: [exim] Multiple warning headers for multiple RBL matches
On Thu, Jul 14, 2005 at 12:12:42PM +0100, David Woodhouse wrote:
> Try a subroutine something like this (entirely untested):
>
> check_rbls:
> # Split first RBL off into acl_m2
> warn set acl_m2 = ${sg {$acl_m1}{^([^:]*)}{\$1}}
> # Remove it from the list
> warn set acl_m1 = ${sg {$acl_m1}{^[^:]*:*}{}}
>
>   warn dnslists = $acl_m2
>        set acl_m0 = ${eval:$acl_m0+1}
>        message = X-RBL-Warning: $dnslist_domain: $dnslist_text

>
> # Break out of loop if there are no RBLs left in $acl_m1
> accept condition = ${if eq {$acl_m1}{} {no}{yes}}
>
> accept acl = check_rbls
>
>
> .... invoked like this...
>
> warn set acl_m1 = $address_data
> warn acl = check_rbls


That is truly evil. I love it! I notice there's a max ACL nesting depth
of 20 - perhaps Philip can implement tail-recursion for ACLs :-)

Cheers,

Brian.