You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/09/23 20:41:42 UTC
Re: Mail::Audit and Mail::SpamAssassin no longer getting along?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Phil Thompson writes:
> disclaimer: I posted this to comp.lang.perl.modules (no reply yet), but since this list is the FIRST place I looked, I'll send here as well.
>
> Hello,
>
> 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?
Sounds like you forgot to read UPGRADE ;)
Unfortunately, we had to drop Mail::Audit support -- our Message object
representation needed better support for MIME structure modelling, and M:A
didn't do that (unless the MIME::Base64 set of modules was used). Since
we didn't want to require MIME::Base64 and rely on that, nor did we want
to maintain code to deal with two parallel message object models, we
rewrote the Message object entirely and had to drop M:A support.
The way to do it now is to extract the message as a string from M:A, and
call $spamtest->parse($string). (using an array ref also works.)
- --j.
> thanks!
> Phil
>
> here is my (hopefully anonymized) 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/");
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFBUxjmQTcbUG5Y7woRAgF9AJ46EQbhPfLRdQ5cJci4HXEdf0NzrgCfSDXj
oapQgvzS7lzFknKGAmYhgV0=
=V7YC
-----END PGP SIGNATURE-----