a perhaps useful script for parsing maillogs
Jacob Friis Larsen
jfl at webcom.dk
Wed Jun 25 20:44:42 CEST 2003
#! /bin/bash
# This script will use lire to create a report for all maillogs
# by Jacob Friis Larsen / jfl at webalogic.com / www.webalogic.com
# Configuration:
input="/var/log/maillog";
output="/var/www/html/lire-maillog.html";
output_format="html_page";
mta="sendmail";
# The script
logfiles="";
n=1;
for logfile in $input*; do
echo "Parsing $logfile and creating /tmp/$n.xml";
lr_run lr_log2report -o xml $mta < $logfile > /tmp/$n.xml;
logfiles="$logfiles /tmp/$n.xml";
n=`expr $n + 1`;
done
echo "Parsing $logfiles and creating $output";
lr_run lr_xml2report -o $output_format -U email $logfiles > $output;
# remove tmp log files
rm -vf $logfiles;
--
To UNSUBSCRIBE, email to development-request at logreport.org with a subject of
"unsubscribe". Trouble? Send an email with subject "help" to
development-request at logreport.org
More information about the Development
mailing list