SpamMonkey - Like SpamAssassin, only not.


SpamMonkey documentation  | view source Contained in the SpamMonkey distribution.

Index


NAME

Top

SpamMonkey - Like SpamAssassin, only not.

SYNOPSIS

Top

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

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

DESCRIPTION

Top

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

Top

    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

Top

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

Top

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

Top


SpamMonkey documentation  | view source Contained in the SpamMonkey distribution.