You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The 'Can't locate Mail/SpamAssassin/NoMailAudit.pm' error

In SpamAssassin 3.0.0, we switched over to a new message-parsing public API. This means that tools which use the SpamAssassin perl modules will need to update to use the new interface. A typical symptom is this error message:

  Can't locate Mail/SpamAssassin/NoMailAudit.pm in @INC (@INC contains: 
  lib /home/jm/ftp/spamassassin/lib /etc/perl /usr/local/lib/perl/5.8.3 
  /usr/local/share/perl/5.8.3 /usr/lib/perl5 /usr/share/perl5 
  /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl 
  /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 .) 
  at /home/jm/bin/handlespam line 66.
  BEGIN failed--compilation aborted at /home/jm/bin/handlespam line 66.

To fix this, the calling code needs to be updated to use the new parse() API on the Mail::SpamAssassin object. You should check the web site where you obtained that code, to see if they've released an update to support 3.0.0.

If one isn't already there, and you're comfortable making the change in the perl code yourself, here's what to do:

  1. look for lines like:
  my $mail = Mail::SpamAssassin::NoMailAudit->new( data => \@msgtext );

change that to something like this:

  my $mail = $spamtest->parse( \@msgtext );

$spamtest should be replaced with whatever the reference to the Mail::SpamAssassin object is called, in that code.

2. Remove any lines like

  use Mail::SpamAssassin::NoMailAudit;

at the top of the perl source files.

  • No labels