Re: [Exim] $value in hosts= acl

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: William Thompson
Dátum:  
Címzett: John Jetmore
CC: exim-users
Tárgy: Re: [Exim] $value in hosts= acl
> I've been playing around w/ various DNSBL services for a while, and
> finally decided that I'd rather implement it as a cdb file lookup than a
> local DNS zone. spfilter lets me create files w/ contents like this:
>
> 12.0.195.78:DSBL Insecure host http://dsbl.org/listing?12.0.195.78
>
> I want to flag the message as tripping this, and provide the TXT record
> "Insecure host..." as part of the header. This was a breeze when I was
> doing DNS lookups (which had special variables), but doesn't seem to be
> working for file lookup. Here's my ACL:
>
>   warn message = X-RBL-hit-at: $value
>        log_message = RBL-hit $value
>        hosts = net-cdb;GRULESD/cdb.rblhosts.cdb

>
> This works in that the X-RBL-hit-at: header gets added to the mail, but
> it's always empty:
>
> Subject: test flatfile lookup
> Date: Thu, 10 Apr 2003 13:41:49 -0500
> X-RBL-hit-at:
>
> test
>
> What'm I missing? If $value is the wrong variable, is there a right one?


I ran into a similar problem when trying to block people from sending
messages of a specific size and to tell them the size.

Something like this for you:
    warn    message = X-RBL-hit-at: $acl_m9;
        set acl_m9 = ${lookup{$sender_host_address}cdb{GRULESD/cdb.rblhosts.cdb}{$value}fail}
        condition = ${if eq{$acl_m9}{}{no}{yes}}


You shouldn't need the condition, but I put it there anyway. If the lookup
didn't find anything, it fails, which skips this acl.

If it works/doesn't work, I'd like to know.