MailWatch is a program to analyze mail moving through a mailing list. It keeps an index of post date, received date, length of message, number of included lines, poster, and subject. This index can be parsed (again by mw) into a nicely formatted report.

Mailwatch can be installed as an alias to a mailing list on a local system by using a piped alias, like this: mail-list: "!/usr/local/bin/mw.pl"

Or can be driven by Procmail. I used procmail for my setup, which requires a rule like this:

:c
^(To|Cc): .*elbows.*
| /usr/local/bin/formail -a "Status: O" >> /u/shevett/Mail/elbows

:
^(To|Cc): .*elbows.*
| bin/mw.pl
Note that for this mail (mail from the 'elbows' mailing list), i already had a rule in place for it, so I needed to add the 'c' (continue) flag on the original rule, and add another rule.

Mailwatch can be invoked two ways. Without any command line arguments, it reads from STDIN, and adds whatever comes in over STDIN to the log file (defined by '$logfile' in the code). The second form tells mw to generate a summary report, and is invoked using an 's' on the command line

bin/mw.pl s
The code is ever-evolving. The latest version is here, and requires Perl5 to run.