Mail::Toaster::Logs
Perl modules related to mail logging. These modules are used primarily in maillogs but will be used in ttoaster-watcher.pl and toaster_setup.pl as well.
use Mail::Toaster::Logs; CheckSetup($conf);
use Mail::Toaster::Logs; CheckForFlags($conf, $prot, $debug);
$conf is a hashref of configuration values, assumed to be pulled from toaster-watcher.conf.$prot is the protocol we're supposed to work on. Do the appropriate things based on what argument is passed on the command line.
use Mail::Toaster::Logs; CountRBL($conf, $debug);
Count the number of connections we've blocked (via rblsmtpd) for each RBL that we use.
use Mail::Toaster::Logs; CountSMTP($conf, $syslog, $debug);
Count the number of times users authenticate via SMTP-AUTH to our qmail-smtpd daemon.
use Mail::Toaster::Logs; CountSend($conf, $debug);
Count the number of messages we deliver, and a whole mess of stats from qmail-send.
use Mail::Toaster::Logs; CountIMAP($conf, $syslog, $debug);
Count the number of connections and successful authentications via IMAP and IMAP-SSL.
use Mail::Toaster::Logs; CountPOP3($conf, $syslog, $debug);
Count the number of connections and successful authentications via POP3 and POP3-SSL.
use Mail::Toaster::Logs; CountWebMail($conf, $syslog, $debug);
Count the number of webmail authentications.
use Mail::Toaster::Logs; CountSpamA($conf, $syslog, $debug);
Count statistics logged by SpamAssassin.
use Mail::Toaster::Logs; CountQMS($conf, $syslog, $debug);
Count statistics logged by qmail scanner.
use Mail::Toaster::Logs; RollSendLogs($conf, $debug);
Roll the qmail-send multilog logs. Update the maillogs counter.
use Mail::Toaster::Logs; RollRblLogs($conf, $debug);
Roll the qmail-smtpd logs (without 2>&1 output generated by rblsmtpd).
use Mail::Toaster::Logs; RollPOP3Logs($conf);
These logs will only exist if tcpserver debugging is enabled. Rolling them is not likely to be necessary but the code is here should it ever prove necessary.
use Mail::Toaster::Logs; CompressYesterdaysLogfile($conf, $file, $debug);
You'll have to guess what this does. ;)
use Mail::Toaster::Logs; PurgeLastMonthLogs($conf, $protdir, $debug);
Keep guessing...
use Mail::Toaster::Logs; RotateMailLogs(@dirs);
Tell multilog to rotate the maillogs for the array of dirs supplied.
use Mail::Toaster::Logs; SetupDateVariables($offset);
use Mail::Toaster::Logs; CheckLogFiles(@check);
use Mail::Toster::Logs; ReadCounters($file, $debug);
$file is the file to read from. $debug is optional, it prints out verbose messages during the process. The sub returns a hashref full of key value pairs.
use Mail::Toster::Logs; WriteCounters($file, %values);
$file is the logfile to write to.
%values is a hash of value=count style pairs.
use Mail::Toaster::Logs; WhatAmI(;$debug)
Determine what the filename of this program is. This is used in maillogs, as maillogs gets renamed in order to function as a log post-processor for multilog.
use Mail::Toaster::Logs; SetSyslog();
Determine where syslog.mail is logged to. Right now we just test based on the OS you're running on and assume you've left it in the default location. This is easy to expand later.
Counters will be polled via SNMP. Script must be able to return counts instantly, even when dealing with HUGE logs.
Must work with multilog and syslog logging formats
Outputs data in a format suitable for polling via SNMP
Simple configuration
Fail safe, errors must be noticed and reported but not fatal
Matt Simerson <matt@tnpi.biz>
None known. Report any to author.
http://www.tnpi.biz/internet/mail/toaster/
Mail::Toaster::CGI, Mail::Toaster::DNS, Mail::Toaster::Logs, Mail::Toaster::Qmail, Mail::Toaster::Setup
Copyright 2003, The Network People, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mail::Toaster, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Toaster
CPAN shell
perl -MCPAN -e shell install Mail::Toaster
For more information on module installation, please visit the detailed CPAN module installation guide.