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:
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 the script in question is part of the SpamAssassin distribution, such as 'spamassassin' or 'spamd', it's very likely that you're not running the 3.0.0 version of that tool, and instead the older 2.x version is still installed on your system, and still in the PATH.
Making the change yourself
If one isn't already there, and you're comfortable making the change in the perl code yourself, here are some quick changes to head in the right direction:
- look for lines like:
change that to something like this:
also, calls to
$spamtest->rewrite_mail(); and then outputing the header/body can just be replaced by
print $spamtest->rewrite_mail();, which will spit out the full message, rewritten.
$spamtest should be replaced with whatever the reference to the
Mail::SpamAssassin object is called, in that code.
2. Remove any lines like
at the top of the perl source files.