Mail::Decency::LogParser
use Mail::Decency::LogParser; my $syslog_parser = Mail::Decency::LogParser->new( { config => '/etc/decency/log-parser.yml' } ); $syslog_parser->run;
The LogParser server provides tools to tail and parse mail server log files. It can implement different log parser styles. For now it supports only postfix log files via Mail::Decency::LogParser::Core::PostfixParser.
Provide either a hashref or a YAML file.
Example:
--- include: - logging.yml - database.yml - cache.yml syslog: style: Postfix file: /var/log/mail.log parser: - Stats: disable: 0 use_date_interval: 1 intervals: - 10 - 600 - 86400 csv_log: file: /var/spool/decency/logs/csv classes: - total_reject - connections - sent - deferred - Aggregator: disable: 0 interval_formats: - 'year-%Y' - 'week-%Y-%U' - 'month-%Y-%m' - GeoSource: disable: 0 interval_formats: - 'year-%Y' - 'week-%Y-%U' - 'month-%Y-%m' enable_per_recipient: 1
See Mail::Decency::Policy::Core
Path to the syslog file
Path to socket for syslog
Loads LogParser modules, inits config, cache and databases
Starts all POE servers without calling the POE::Kernel->run
Start and run the server via POE::Kernel->run
Handle method, called by the POE::Wheel::FollowTail instance on each tailed line.
Ulrich Kautz <uk@fortrabbit.de>
Copyright (c) 2010 the "AUTHOR" as listed above
This library is free software and may be distributed under the same terms as perl itself.
To install Mail::Decency, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Decency
CPAN shell
perl -MCPAN -e shell install Mail::Decency
For more information on module installation, please visit the detailed CPAN module installation guide.