NAME
Parse::Syslog::Mail - Parse mailer logs from syslog
VERSION
Version 0.01
SYNOPSIS
use Parse::Syslog::Mail;
my $parser = Parse::Syslog::Mail->new();
...
DESCRIPTION
As its names implies, Parse::Syslog::Mail
presents a simple interface to gather mail information from a syslog. It uses Parse::Syslog
for reading the syslog, and offer the same simple interface.
METHODS
- new()
-
Creates and returns a new
Parse::Syslog::Mail
object. Expects a file path or aFile::Tail
object as first argument. Options can follow as a hash.Options
year
-GMT
-repeat
-locale
-allow_future
-
Examples
my $syslog = new Parse::Syslog::Mail '/var/log/syslog', allow_future => 1;
- next()
-
Returns the next line of the syslog as a hashref, undef when there is no more lines. The hashref contains at least the following keys:
timestamp
- Unix timestamp for the event.id
- Local transient mail identifier.
Other keys are the corresponding fields from a Sendmail entry.
Example
while(my $log = $syslog->next) { # do something with $log }
SEE ALSO
AUTHOR
Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
BUGS
Please report any bugs or feature requests to bug-parse-syslog-mail@rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-P0f. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
CAVEATS
Most probably the same as Parse::Syslog
, see "BUGS" in Parse::Syslog
COPYRIGHT & LICENSE
Copyright 2005 Sébastien Aperghis-Tramoni, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.