Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: converted to 1.6 markup

When I use SpamAssassin with Mail::Audit, I get a you cannot use body() error.

Using a version of Mail::Audit later than 2.1 at least, this error will appear when you call the SpamAssassin rewrite_mail method:

No Format
  you cannot use body() to set the encoded contents
  at /usr/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/ line 37

This is caused by an API which changed in Mail::Audit. Either wait for the next release of SpamAssassin for a workaround, or work around it yourself by using the nomime option when constructing the Mail::Audit object:

No Format
  $msg = Mail::Audit->new(nomime => 1);

(Thanks to Jake Edge for the answer).