| Mail::Log::Parse::Postfix - Parse and return info in Postfix maillogs |
use Mail::Log::Parse::Postfix;
(See the Mail::Log::Parse manpage for more info.)
This is a subclass of the Mail::Log::Parse manpage, which handles parsing for Postfix mail logs.
Sets the year, for the log timestamps. If not set, the log is assumed to
be for the current year. (Can also be passed in new, with the key 'year'.)
Returns a hash of the next line of postfix log data.
Hash keys are:
delay_before_queue, delay_connect_setup, delay_in_queue,
delay_message_transmission, from, host, id, msgid, pid, program,
relay, size, status, text, timestamp, to, delay, connect,
disconnect
All keys are garunteed to be present. 'program', 'pid', 'host', 'timestamp', 'id' and 'text' are garunteed to have a value. 'connect' and 'disconnect' are boolean: true if the line is the relevant type of line, false otherwise.
The 'text' key will have all of the log text after the standard Postfix header. (All of which is in the other keys that are required to have a value.)
None known at the moment.
the Scalar::Util manpage, the Time::Local manpage, the Mail::Log::Parse manpage, the Mail::Log::Exceptions manpage, Memoize
Daniel T. Staal
the Mail::Log::Parse manpage, for the main documentation on this module set.
Dec 23, 2008 (1.4.11) - Further speedups. Now requires Mail::Log::Parse of at least version 1.3.0.
Dec 09, 2008 (1.4.10) - Profiled code, did some speedups. Added dependency on Memoize: For large logs this is a massive speedup. For extremely sparse logs it may not be, but sparce logs are likely to be small.
Nov 28, 2008 - Switched 'total_delay' to slightly more universal 'delay'. Sped up some regrexes.
Nov 11, 2008 - Switched to using the bufferable _parse_next_line instead of
the unbuffered next.
Nov 6, 2008 - Added set_year and alternate year handling, in case we aren't
dealing with this year's logs. (From the todo list.)
Oct 24, 2008 - Added 'connect' and 'disconnect' members to the return hash.
Oct 6, 2008 - Inital version.
Copyright (c) 2008 Daniel T. Staal. All rights reserved. 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 5 years after the author's death, whichever is longer.
| Mail::Log::Parse::Postfix - Parse and return info in Postfix maillogs |