[lug] mail reports based on /var/log/maillog?
Neal McBurnett
neal at bcn.boulder.co.us
Thu Jan 10 12:42:22 MST 2002
Thanks - I dug out
http://www.wizzu.com/mutt/
procmailcount.pl
Procmail log parser. Displays into which folders and how many
messages have been delivered. Also supports "aliasing" so you can do:
procmailcount -d "$MAIL=INBOX" To make your /var/spool/whatever
folder appear as "INBOX", etc. Available options are documented in
the top of the file, no other documentation. The link above links to
my live copy of the script. I personally use this command:
procmailcount -t -n -d $MAIL=INBOX procmail.log (The -d argument is
shortened, it's very long actually...)
I'm guessing that I would also need to set procmail as my mail
filterer, e.g. via a $HOME/.forward file or a system-wide config file
somewhere. If I do it in $HOME, I assume it will only catch *incoming*
mail *to me*, but I'm also looking for statistics on outgoing mail and
how well it was delivered, etc (all stuff described in maillog). Can
procmail track all mail activity on my system, including errors and
delays while resending, etc?
On Thu, Jan 10, 2002 at 12:04:18PM -0700, dan radom wrote:
> to define a procmail log file add the following to ~/.procmailrc
>
> LOGFILE=$PMDIR/log
>
> the tool i use most is procmailcount.pl. i'm sure a google search would find it. if not let me know and i'll send it to you.
>
> dan
>
> * Neal McBurnett (neal at bcn.boulder.co.us) wrote:
> > I'm looking for a tool that can parse /var/log/maillog (the
> > place where redhat puts sendmail syslog logging) and produce
> > useful reports to help me spot problems, discover how much
> > mail I get and send, etc.
> >
> > A google search yielded a pointer to
> > http://tit.irk.ru/networking/sendmail/ch26_02.htm
> >
> > which told me that I needed to
> > # grep -i statusfile /etc/sendmail.cf
> > O StatusFile=/var/log/sendmail.st
> >
> > # touch /var/log/sendmail.st
> >
> > in order to start collecting some crude statistics that
> > /usr/sbin/mailstats can report on. But they seem pretty crude.
> >
> > Much better data is already in my many weeks of rotated
> > /var/log/maillog files, as described at
> >
> > http://tit.irk.ru/networking/sendmail/ch26_01.htm
> >
> > but that page only provides a very crude shell script to print
> > a count of bytes of traffic.
> >
> > Surely others have better reporting tools....
> >
> > For the future, I see that dan radom <dradom at redback.com> said back on
> > Aug 21
> >
> > i prefer the procmail log format over the traditional maillog...plus
> > i've got some procmail perl scripts that do nifty things with my
> > procmail log.
> >
> > Copies of those scripts and hints on how to get procmail collecting
> > logs for them would also be handy.
> >
> > TIA,
> >
> > Neal McBurnett <neal at bcn.boulder.co.us>
> > http://bcn.boulder.co.us/~neal/
> > GPG/PGP signed and/or sealed mail encouraged. Keyid: 2C9EBA60
> > _______________________________________________
> > Web Page: http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list