Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Mail::Abuse::Incident::Log
Parses generic logs into Mail::Abuse::Reports

Mail::Abuse::Incident::Log - Parses generic logs into Mail::Abuse::Reports



NAME

Mail::Abuse::Incident::Log - Parses generic logs into Mail::Abuse::Reports


SYNOPSIS


  use Mail::Abuse::Report;

  use Mail::Abuse::Incident::Log;

  my $i = new Mail::Abuse::Incident::Log;

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


DESCRIPTION

This class parses generic logs that include a timestamp and an IP address in the same group of lines. Various configuration keys can influence the way this module works, as follows:

log lines
Controls how many consecutive lines to attempt a match on. More lines generally means more incidents parsed, but might lead to false matches. Its default value is 5 lines, which seems to work well enough. This should vary widely by site.

debug log
When set to a true value, produces some debugging information sent through warn().

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

parse($report)
Pushes all instances of log incidents into the given report, based on parsing of the text in the report itself.

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

The IP address and timestamp searching is done in a consecutive number of lines. This number can be set with the log lines variable, and defaults to 5 lines.

This module tends to get a significant number of, potentially false, incidents out of reports. Adjust the number of lines carefully based on the types of complaints that your site receives.

EXPORT

None by default.


HISTORY

  1. 01
  2. 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).

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy