On Wed, Jul 31, 2002 at 01:35:52AM -0700, Mark Edwards wrote:
> On Wednesday, July 31, 2002, at 12:57 AM, Matthew Byng-Maddick wrote:
> >On Wed, Jul 31, 2002 at 09:01:55AM +0200, Tamas TEVESZ wrote:
> >>On Tue, 30 Jul 2002, Mark Edwards wrote:
> >[> > Tamas thought he knew what he was talking about and wrote:]
> >>>>condition = ${if eq{$sender_host_addres}{spamcop's.ip.addy}{yes}{no}}
> >Oh, and I'd ignore Tamas' condition as it doesn't have a hope in hell
> >of working.
> >
> >Mark, probably the best way of doing it is to use the commented-out bits
> >in the default acl to add a header, and then add a router (and I can't
> >do this now - pre-coffee), which checks for this header and does a new
> >file delivery, something like:
> Sorry, I don't quite follow. I don't see anything commented-out in the ACL
> section that suggests adding headers. The only stuff I see in the manual
> off-hand about adding headers relates to routers ...
warn message = X-spam-header: $sender_host_address is in a black list at $dnslist_domain
log_message = found in $dnslist_domain
dnslists = bl.spamcop.net
> >spam_trap:
> > driver = redirect
> > condition = ${if def:h_Spam_header_that_youve_added: {yes}{no}}
> > user = exim
> > data = /path/to/spambox
> > transport = address_file
> > no_verify
> So, something like this:
> spam_trap:
> driver = redirect
> condition = ${if def:h_Spam_header_that_I_havent_added_yet: {yes}{no}}
> user = exim
> data = /var/mail/spam
> transport = address_file
> no_verify
> Is there no way to set a condition that will reference the blacklist
> directly without having to add a header? Thanks for the help.
If you've got embedded perl, you could try something like:
${perl {check_rbls} {$sender_host_address}}
with
--------8<--------
my @blacklists=qw(
bl.spamcop.net
relays.osirusoft.com
);
sub check_rbls {
my $ip_addr = shift;
$ip_addr=reverse split /\./ , $ip_addr;
for my $bl (@blacklists) {
if( defined ( gethostbyname ($ip_addr . "." . $bl) ) ) {
return "yes";
}
}
return "no";
}
-------->8--------
Otherwise I can't think of a useful way of doing it.
Sorry
MBM
--
Matthew Byng-Maddick <mbm@???> http://colondot.net/