[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] Re: Spam
Hi
Think I might have answered my own question with this one.
I've hacked the .forward file so that it says .......
" | IFS=' ' && exec/home/richard/.spam -f-f || exit 75 #richard"
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #richard"
and I've changed permissions on the the .spam file with 'chmod 700'
which now reads as
#!/usr/bin/perl
use Mail::Audit;
my $item = Mail::Audit->new;
my $maildir = "/home/richard/inbox";
my %lists = (
sheflug => "sheflug",
debian => "debian",
suse => "suse",
spamassassin => "spamassassin",
mailscanner => "mailscanner"
);
while (<DATA>) {
chomp;
next unless $from =~ /$_/i or $to =~ /$_/i;
print LOG "$from:$subject:Spam?\n";
$item->accept($folder."spam");
}
for my $pattern (keys %lists) {
$item->accept($maildir.$lists{$pattern})
if $item->from =~ /$pattern/
or $item->to =~ /$pattern/;
}
$item->accept;
I think all I have to do now is some final configuration in the .spam
file and that should finish it off.
Apologies to anyone who received a bounced postfix message from my
workstation.
Richard
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.