The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mail::Abuse::Incident - Parses a Mail::Abuse::Report to extract incidents

SYNOPSIS

  package Mail::Abuse::Incident::MyIncident;
  use Mail::Abuse::Incident;

  use base 'Mail::Abuse::Incident';
  sub ip { ... };
  sub time { ... };
  sub type { ... };
  sub data { ... };
  sub parse { ... }
  package main;

  use Mail::Abuse::Report;
  my $i = new Mail::Abuse::Incident::MyIncident;
  my $report = new Mail::Abuse::Report (incidents => [$i] );

DESCRIPTION

This class implements the reception of an abuse report and its conversion to a Mail::Abuse::Report object.

An object must respond to all the methods in the synopsis, returning the required information about the incident (after it has been parsed).

The following items of information have been defined:

ip

A NetAddr::IP object encoding the origin of the particular incident.

time

A timestamp of the incident, extracted from the report. It must be a a timestamp in the UTC timezone, for consistency.

type

A string identifying the type of incident. Normally of the form spam/SpamCom or virus/Nimda, if such filters exist.

data

Any additional data that the class might want to keep regarding the incident.

Although specific incident parsers are free to define further class methodsor information items.

The following functions are provided for the customization of the behavior of the class.

items()

Enumerates the defined information items that have been defined for this object. Essentially, returns a list of the accessor methods. The object is overloaded so that this method is invoked automatically when serialization is required. This means that

    print $incident, "\n";

Will produce human-readable information.

serialize()

Produces a print()able representation of the Incident object, suitable for showing it to a human being.

parse($report)

Pushes incidents into the given report, based on parsing of the text in the report itself.

It must return a list of objects of the same class, with the incident data (IP address, timestamp and other information) filled.

EXPORT

None by default.

HISTORY

0.01

Original version; created by h2xs 1.2 with options

  -ACOXcfkn
        Mail::Abuse
        -v
        0.01

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 263:

Non-ASCII character seen before =encoding in 'Muñoz'. Assuming CP1252