NAME
Mail::Abuse::Processor::Table - Match incidents to users using a static table
SYNOPSIS
use Mail::Abuse::Processor::Table;
use Mail::Abuse::Report;
my $p = new Mail::Abuse::Processor::Table;
my $report = new Mail::Abuse::Report (processors => [ $p ]);
# ... other pieces of code that configure the report ...
DESCRIPTION
This class matches incidents to
- debug table
-
If set to a true value, causes this module to emit debugging info using
warn()
. - table location
-
The path of a file where the information table is to be found. The file consists on columns separated by whitespace and should have the following format:
IP-range var=value;var=value;... IP-range var=value;var=value;... IP-range var1.var2=value;var=value;...
IP-range should be an IP subnet in any format that can be understood by
NetAddr::IP
. Tipically, this should be CIDR location, for readability. The following example:10.0.0.0 foo=bar;baz=camel;fumble.foo=pivot
Would yield the following structure as result when a match occurs:
{ foo => 'bar', baz = 'camel', fumble => { foo = 'pivot' }}
These values should not be changed, as currently they are references to the actual data read.
On the last column, a number of variables and its values can be specified. Multiple tuples can be separated by a ';' character. The dot in the name can be used in place of the
->
operator, to easily create hashrefs. These hashrefs are stored in theMail::Abuse::Incident
object that is passed to theprocess()
method.Comments are delimited by a '#' character, which causes the text up to the end of line to be ignored.
The following functions are implemented.
process($report)
-
Takes a
Mail::Abuse::Report
object as an argument and, for eachMail::Abuse::Incident
collected, perform a lookup in the given table, attempting to match it by IP address.If a match is found, all the supplied hashrefs are introduced in the
Mail::Abuse::Incident
under the keytable
.
EXPORT
None by default.
HISTORY
$Log: Table.pm,v $ Revision 1.2 2005/11/05 23:20:37 lem Replaced IO::Zlib with PerlIO::gzip.
Revision 1.1 2004/02/05 22:41:50 lem Added Mail::Abuse::Processor::Table, which requires Tie::NetAddr::IP. This module will allow for matching 'fixed' address ranges against the incidents. This can be easily used to map customer data for relatively static connections, such as Frame-Relay or similar.
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 230:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8