Mail::Message::Wrapper::SpamAssassin(3pm)

Mail::Message::Wrapper::SpamAssassin3pm

Connect a mail::message with mail::spamassassin

Usage

 # WARNING: requires OLD SpamAssassion 2.x, not the new 3.x
 # See Mail::Box::Search::SpamAssassin for the preferred interface
 # However, it is possible to do:
 my $msg    = ...;   # some Mail::Message object
 my $sa     = Mail::Message::Wrapper::SpamAssassin->new($msg);
 my $spam   = Mail::SpamAssassin->new;
 my $status = $spam->check($sa);
 $msg->label(spam => 1) if $status->is_spam;
 $status->rewrite_mail;  # Adds spam lines to header

Inheritance

 Mail::Message::Wrapper::SpamAssassin
   is a Mail::SpamAssassin::Message

Overview

WARNING: This module only works with the old version of SpamAssassin: version 2.x. The newer 3.x releases have changed the way that messages are kept. Please contribute improved code.

The "Mail::Message::Wrapper::SpamAssassin" class --sorry for the long package name-- is a wrapper around Mail::SpamAssassin::Message, which is an interface to the spam checking software of Mail::SpamAssassin.

Methods

Mail::Message::Wrapper::SpamAssassin->new($message, %options)

Creates a wrapper around the $message. The already present fields from a previous run of Spam::Assassin (or probably fake lines) are removed first.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 9 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11–12
  10. 13

License

Copyrights 2001-2025 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/

From libmail-box-perl 3.011-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.