procmail
[Top] [All Lists]

Re: Ideas for keeping statistics of incoming mail?

1997-11-08 21:09:12
"ms" == Michael Stone <mstone(_at_)itri(_dot_)loyola(_dot_)edu> writes:

ms> Quoting jari(_dot_)aalto(_at_)poboxes(_dot_)com 
(jari(_dot_)aalto(_at_)poboxes(_dot_)com):
I have noticed that my mail traffic is quite huge nowadays
when I have subsribed to few mailing lists and I'd like to have
some simple per day/per mailing list/ summary. What would be
the simplest way to keep the daily log?

ms> If you're already sorting your incoming mail to different boxes and
ms> keeping a log (the LOGFILE specified in your procmailrc), try 
ms>   mailstat -k logname

ms> Rotate the logfile daily and run mailstat, and you've got a daily log...

I wrote a little Perl script that runs as a cron job and moves the daily log
to a filename based on the date.  For example, tonight at midnight
~/.procmail/logs/daily will be written to ~/.procmail/logs/97/11/08.  This
way, not only can I go back and summarize any given day, its quite easy to
summarize a set of dates and even an entire month by just catting whatever
files together and piping it in to mailstat -k.

JcL

-- 
Justin C. Lloyd               Harris Corporation, ISD     Voice  407/984-5558
jlloyd(_at_)harris(_dot_)com             505 John Rodes Blvd.        Fax    
407/984-6323
Unix System Administrator     Melbourne, FL  32935        Office  W3/1806

                Only 13 days left until Amy Grant in Orlando!
             Only 37 days left until Sarah McLachlan in Orlando!
         Only 38 days left until Sarah McLachlan in West Palm Beach!

<Prev in Thread] Current Thread [Next in Thread>