|
Posted by Phillip Thompson on September 23, 2004, 7:47 am
Please log in for more thread options
Until yesterday, I was happily using a combination of Mail::Audit and
Mail::SpamAssassin to filter my mail. Yesterday I upgraded
SpamAssassin to version 3.0.0 and my old script started failing with
this error:
Command output: Can't locate
auto/Mail/Audit/MailInternet/extract_mes.al in @INC (@INC contains:
/usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3
etc etc etc
Has anyone seen this error? Know how to fix it?
thanks!
Phil
here is my filter script:
#!/usr/local/bin/perl
use Mail::Audit;
use Mail::SpamAssassin;
my $item = Mail::Audit->new;
#send "page" messages to my cell phone
if ($item->to =~ /page@mydomain.com/) {
$item->noexit(1); #turn off exit momentarily, so a copy still goes
to local mailbox
$item->resend("myphonenumber@vtext.com"); #verizon
$item->noexit(0);
}
#spamassasin
my $spamtest = Mail::SpamAssassin->new();
my $status = $spamtest->check($item);
if ($status->is_spam ()) {
$item->accept("~/Maildir/.spamassassin"); #file for further review,
if desired
}
#forward all incoming mail to gmail
$item->noexit(1); #turn off exit momentarily, so a copy still goes to
local mailbox
$item->resend("myusername@gmail.com");
$item->noexit(0);
#temp - want to see the spam scores on ham
$status->rewrite_mail();
#by default, accept all
$item->accept("~/Maildir/");
|
|
Posted by Randal L. Schwartz on September 23, 2004, 9:18 am
Please log in for more thread options
*** post for FREE via your newsreader at post.newsfeed.com ***
Phillip> Until yesterday, I was happily using a combination of Mail::Audit and
Phillip> Mail::SpamAssassin to filter my mail. Yesterday I upgraded
Phillip> SpamAssassin to version 3.0.0 and my old script started failing with
Phillip> this error:
SpamAssassin 3.0 has an incompatible API. You'll have to wait until
Mail::Audit is updated, by which I mean "Hell Freezes Over", because
Simon Cozens has abandoned that module if I recall correctly.
Yeah, I got burned by selecting Mail::Audit for my sorting tool as
well. This is why I didn't get on the Maypole bandwagon earlier, and
as I predicted, Simon abandoned *that* midway through the project as
well.
It's easy to have over 100 CPAN modules if you never finish even one.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
|
|
Posted by Gunnar Hjalmarsson on September 23, 2004, 6:47 pm
Please log in for more thread options Randal L. Schwartz wrote:
> Phillip Thompson writes:
>> Until yesterday, I was happily using a combination of Mail::Audit
>> and Mail::SpamAssassin to filter my mail. Yesterday I upgraded
>> SpamAssassin to version 3.0.0 and my old script started failing
>> with this error:
>
> SpamAssassin 3.0 has an incompatible API. You'll have to wait
> until Mail::Audit is updated, by which I mean "Hell Freezes Over",
> because Simon Cozens has abandoned that module if I recall
> correctly.
The description in the Mail::Audit POD begins: "procmail is nasty. It
has a tortuous and complicated recipe format, and I don't like it."
When reading that, I concluded that if that's the most important thing
the author of Mail::Audit has to say about his module, something must
be wrong. Accordingly I learned some basic procmail instead, and am
now a happy procmail user.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
|
|
Posted by Phillip Thompson on September 27, 2004, 12:02 pm
Please log in for more thread options I fixed it! I'm replying to my original post, in case my solution
helps someone else.
My original script broke because Mail::SpamAssassin v3 dropped
Mail::Audit support while upgrading their Message object. I would have
discovered this from the UPGRADE file, but those of us who just do:
$cpan
cpan> install Mail::SpamAssassin
Will never even see that UPGRADE file.
Many thanks to Justin from the SpamAssassin mailing list for helping
with the workaround!
#!/usr/local/bin/perl
use Mail::Audit;
use Mail::SpamAssassin;
my @maillines = <STDIN>; #sucks incoming message into array
my $item = Mail::Audit->new( data=>@maillines );
#send "page" messages to my cell phone
if ($item->to =~ /page@mydomain.com/) {
$item->noexit(1);
$item->resend("myphonenumber@vtext.com");
$item->noexit(0);
}
#spamassasin
my $spamtest = Mail::SpamAssassin->new();
my $mail = $spamtest->parse( $mailstring );
my $status = $spamtest->check( $mail );
if ($status->is_spam()) {
$item->accept("~/Maildir/.spamassassin");
}
$status->finish();
$mail->finish();
#forward all incoming mail to gmail
$item->noexit(1);
$item->resend("myusername@gmail.com");
$item->noexit(0);
#by default, accept all
$item->accept("~/Maildir/");
|
| Similar Threads | Posted | | Mail::Audit help plz | October 26, 2005, 8:18 pm |
| Mail::Audit Question | August 30, 2004, 12:55 am |
| Found problem in Mail-SpamAssassin-2.xx causing build failure onwin32 | August 1, 2004, 9:33 pm |
| sound (playing few wavs at once) | April 23, 2005, 2:10 pm |
| Email-Filtering, what is used nowadays? (and integration w/ SpamAssassin) | April 24, 2007, 7:27 am |
| Mail:Sender - HTML Mail with alternatives problem | July 21, 2004, 6:44 pm |
| Mail::Vacation abondoned? | August 11, 2004, 3:13 pm |
| Mail::Message::TransferEnc | February 2, 2005, 4:19 pm |
| Mail::IMAPClient via SSL falls down... | June 1, 2005, 1:45 pm |
| E-Mail Problems - MAIL_MESSAGE | March 29, 2006, 5:16 pm |
|