NAME

SpamMonkey - Like SpamAssassin, only not.

SYNOPSIS

  use SpamMonkey;
  my $monkey = SpamMonkey->new();
  $monkey->ready;

  for (@things) {
      my $result = $monkey->test($_);
      if ($result->is_spam) { $result->rewrite }
  }

DESCRIPTION

SpamMonkey is a general purpose spam detection suite. It borrows heavily from SpamAssassin, but it is designed to be used for plain text as well as email.

CONSTRUCTOR

    SpamMonkey->new(
        rule_dir => "/etc/mail/spamassassin/"
    );

SpamMonkey by default loads up rules from /etc/mail/spamassassin and then ~/.spammonkey/user_prefs. To override the rule directory, specify rule_dir in the constructor.

METHODS

ready

This loads up the ruleset and then prunes out rules which have no score attached to them. You must call ready before doing a test, else you'll have no rules to test with.

test

    $self->test(Email::MIME $mime);
    $self->test($text);

This tests an email or a piece of text using the ruleset loaded by ready and returns a SpamMonkey::Result object.

AUTHOR

simon, <simon@> (please don't contact me about this module, unless you wish to take over its maintainance, in which case upload your own version.)

COPYRIGHT AND LICENSE

Copyright (C) 2005 by simon

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.