NAME
Mail::Log::Trace::Postfix - Trace an email through Postfix logs.
SYNOPSIS
use Mail::Log::Trace::Postfix;
my $tracer = Mail::Log::Trace::Postfix->new({log_file => 'path/to/log'});
$tracer->set_message_id('message_id');
$tracer->find_message();
my $from_address = $tracer->get_from_address();
etc.
DESCRIPTION
A subclass for Mail::Log::Trace that handles Postfix logs. See the documentation for the root class for more. This doc will just deal with the additions to the base class.
USAGE
An object-oriented module: See the base class for most of the meathods.
Additions are:
SETTERS
set_connection_id
Sets the connection id of the message we are looking for.
set_process_id
Sets the process id of the message we are looking for. (Note that pids are often reused, and Postfix will use several processes for a specific message.)
set_status
Sets the status id of the message we are looking for.
Currently this is the full status, not just the numeric code.
set_year
Sets the year the logfile was written in, since Postfix doesn't log that.
Assumes the current year if not set. (See Mail::Log::Parse::Postfix.)
GETTERS
get_connection_id
Returns the connection id of the message we are looking for/have found.
get_process_id
Returns the process id of the message we are looking for/have found.
This will be the process id of the first part of the message found, which may or may not be the first entry of the message in the log.
get_status
Returns the status of the message we are looking for/have found.
Currently this is the full status, not just the numeric code.
BUGS
Tracing a message works, but is slow. The statuses should probably be smart about what they take/return, so we can say 'find all rejected messages' or something of the sort...
REQUIRES
Scalar::Util, Mail::Log::Exceptions, Mail::Log::Trace
Something that can pretend it is Mail::Log::Parse::Postfix. (The actual class not required, but it is the default. Another parser class can be set at runtime. However, it is assumed to behave exactly like Mail::Log::Parse::Postfix.)
HISTORY
1.0.1 Dec 5, 2008 - Licence clarification.
1.0 Nov 28, 2008. - original version.
AUTHOR
Daniel T. Staal
CPAN ID: DSTAAL
dstaal@usa.net
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This copyright will expire in 30 years, or five years after the author's death, whichever occurs last, at which time the code will be released to the public domain.