Mail::SpamAssassin - Mail::Audit spam detector plugin
my $mail = Mail::Audit->new();
my $spamtest = Mail::SpamAssassin->new(); my $status = $spamtest->check ($mail);
if ($status->is_spam ()) { $status->rewrite_mail (); $mail->accept("spamfolder");
} else { $mail->accept(); # to default incoming mailbox } ...
Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text analysis and several internet-based realtime blacklists.
Using its rule base, it uses a wide range of heuristic tests on mail headers and body text to identify ``spam'', also known as unsolicited commercial email.
Once identified, the mail can then be optionally tagged as spam for later filtering using the user's own mail user-agent application.
This module implements a Mail::Audit plugin, allowing SpamAssassin to be used
in a Mail::Audit filter. If you wish to use a command-line filter tool,
try the spamassassin
or spamd
tools provided.
SpamAssassin also includes support for reporting spam messages to collaborative filtering databases, such as Vipul's Razor ( http://razor.sourceforge.net/ ).
Mail::SpamAssassin
object. You may pass the
following attribute-value pairs to the constructor.
rules_filename
and userprefs_filename
.
If none of rules_filename
, userprefs_filename
, or config_text
is set,
the Mail::SpamAssassin
module will search for the configuration files in the
usual installed locations.
Mail::Audit
object, to determine if
it is spam or not.
Returns a Mail::SpamAssassin::PerMsgStatus
object which can be
used to test or manipulate the mail message.
Note that the Mail::SpamAssassin
object can be re-used for further messages
without affecting this check; in OO terminology, the Mail::SpamAssassin
object is a ``factory''. However, if you do this, be sure to call the
finish()
method on the status objects when you're done with them.
Mail::Audit
object, as human-verified spam.
This will submit the mail message to live, collaborative, spam-blocker
databases, allowing other users to block this message.
Mail::Audit
object,
explaining that their message has been added to spam-tracking databases
and deleted. To be used in conjunction with report_as_spam
. The
$replysender
argument should contain an email address to use as the
sender of the reply message.
Mail::Audit
Mail::Internet
Net::DNS
See also http://spamassassin.taint.org/ for more information.
Mail::SpamAssassin::PerMsgStatus
spamassassin
Justin Mason <jm /at/ jmason.org>
SpamAssassin is distributed under Perl's Artistic license.
The latest version of this library is likely to be available from CPAN as well as:
http://spamassassin.taint.org/