Re: [Exim] [OT] Using Wirehub! Internet Spamlists with exim4…

Góra strony
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
Dla: Dennis Davis
CC: exim-users@exim.org
Temat: Re: [Exim] [OT] Using Wirehub! Internet Spamlists with exim4.
On Fri, 28 Feb 2003, Dennis Davis wrote:

> I'm probably going to kick myself when I find out how easy this, but...is
> anyone using the Wirehub! Internet Spamlists from:
>
> http://basic.wirehub.nl/spamlist-usage.html
>
> with exim4? If so, how are you constructing your databases and what
> do your exim4 acls look like?


I use it, with very good results, I've a script which runs once per
hour and downloads the list and converts it to a cdb-file.

exim_wirehub_list.pl:
#!/usr/bin/perl -w

use strict;
use warnings;
use CDB_File;
use LWP::Simple;

#my $url = "http://basic.wirehub.nl/spamlist-extended.txt";
my $url = "http://basic.wirehub.nl/spamlist.txt";

#Wirehub list
my $wirehub = get($url);
die "Can't load spamlist.txt from wirehub" unless $wirehub;

my $cdb = new CDB_File("/etc/exim/spamlist.cdb",
                       "/tmp/spamlist.tmp".rand(1000000))
                       || die "Can't open  CDB-file";


foreach my $spammer (split("\n",$wirehub)) {
    $spammer =~ s/#.*//;
    next unless $spammer;
    $spammer =~ /^(.*)[\s\t]+(.*)$/ || next;
    $cdb->insert(lc $1,$2);
};


$cdb->finish() || die "Failed to finish cdb-file";



and the following ACL:

deny message = address listed at wirehub spamlist
        senders = cdb;/etc/exim/spamlist.cdb :\
                  *@cdb;/etc/exim/spamlist.cdb


You should place the ACL-entry in your RCPT-acl, after checks for mail to
postmaster, and before any expensive RBL-Lookups or sender/receiver
verifying

Nico