Mail::SpamFilter - Provides a convenient interface for several spam filters.


use Mail::SpamFilter ':all';

  ($header, $body) = extract_header($msg);

  # To run all the filters on $msg:
  @filters = @Mail::SpamFilter::FILTER_LIST;
  ($tags, $header, $body) = filter_message($msg, @filters);
  print $$tags{spamassasin};

  # To extract the spam headers from an already filtered message:
  ($tags, $header, $body)
    = extract_spam_headers($filtered_msg, @filters);
  print $$tags{spamassasin};

  # Count the votes and list the voters in a set of extracted tags:
  ($spam_count, $good_count, $spam_voters, $good_voters)
    = count_votes($tags, @filters);

  # If this messsage was a spam, then report it to
  # the good voters for training:
  report_message("spam", $msg, @{$good_voters});

  # If this messsage was a good message, then report it to
  # the spam voters for training:
  report_message("good", $msg, @{$spam_voters});


Provides functions to filter messages using several spam filters and count how many filters consider the message to be spam.


None by default.

SEE ALSO SpamAssassin The CRM114 Discriminator Nuclear Elephant: DSPAM WPBL - Weighted Private Block List SpamProbe Bogofilter Spamhaus ZEN DNSBL


Martin Ward, <<gt>


Copyright (C) 2004 by Martin Ward

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.1 or, at your option, any later version of Perl 5 you may have available.