[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Sheflug] SpamAssassin problems. Was: (no subject)
Oooops. I really should have run my script through perl, I've just
noticed that I didn't correct all instances of $item vs $mail.
I've fallen back to using the "$mail" used in Mail::Audit's perldoc.
#!/usr/bin/perl
use strict;
use warnings;
use Mail::Audit;
use Mail::SpamAssassin;
my $mailbox = "/home/richard/inbox"; # Why not $ENV{'MAIL'} ?
my $mail = Mail::Audit->new( nomime => 1, );
my $spamtest = Mail::SpamAssassin->new();
my $status = $spamtest->check( $mail );
if ( $status->is_spam() ) {
$status->rewrite_mail();
$mail->accept( "/home/richard/Spam" );
} else {
$mail->accept( $mailbox );
}
I guess that's what happens trying to debug at one in the morning :-)
Ah - just got your second email.
--
Barrie J. Bremner
baz-sheflug [at] barriebremner.com http://barriebremner.com/
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.