NAME
Mail::Abuse::Processor::Score - Assign a score to an abuse report
SYNOPSIS
use Mail::Abuse::Processor::Score;
use Mail::Abuse::Report;
my $p = new Mail::Abuse::Processor::Score;
my $report = new Mail::Abuse::Report (processors => [ $p ]);
# ... other pieces of code that configure the report ...
DESCRIPTION
This class allows for the computation of a score value, that can be stored in the Mail::Abuse::Report
object itself. The score can be used by other processes for different purposes, such as priorizing incident handling, noise rejection and filtering, etc.
The way in which the score is calculated is controlled by the following configuration entries:
- score report text: <value> <regexp> ...
-
Can accept multiple (value, regexp) pairs, where value is a numeric constant that will be added to the "current" score of a report and regexp is a Perl regular expression that contains no whitespace. Spaces in the regular expression must be written in terms of
\s
.Each regexp will be matched in sequence over the unprocessed text of the report, and if it matches, the corresponding value will be added to the report's score. Negative values cause the score to decrease, as expected.
- score incident type: <value> <regexp> ...
-
Can accept multiple (score, regexp) pairs just as in score report text, but what will be matched is the type of each incident already in the report.
- score minimum value: <value>
-
Enforce this value as the minimum score for a report.
- score maximum value: <value>
-
Enforce this value as the maximum score for a report.
- debug score
-
When set to a true value, debug information will be issued using
warn()
.
In the case where no configuration entry matches or is specified, the score will be set to zero.
The following functions are implemented.
process($report)
-
Takes a
Mail::Abuse::Report
object as an argument and performs the processing action required.
EXPORT
None by default.
HISTORY
$Log: Score.pm,v $ Revision 1.3 2005/03/22 16:07:31 lem Implemented minimum and maximum scores
Revision 1.2 2005/03/16 22:24:42 lem Add m to regexps.
Revision 1.1 2005/03/16 22:13:23 lem Added Mail::Abuse::Processor::Score to calculate scores for the abuse reports
LICENSE AND WARRANTY
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk.
This code and all accompanying software can be used freely under the same terms as Perl itself.
AUTHOR
Luis E. Muñoz <luismunoz@cpan.org>
SEE ALSO
perl(1).
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 224:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming CP1252