Grep Patterns for MailScanner Statistics

Mark Nienberg gmane at tippingmar.com
Wed Nov 29 22:58:46 GMT 2006


Daniel Straka wrote:
> I've been trying to find a grep pattern to use with the mail log file to
> get an accurate count of:
> 1. Total Incoming Messages: (I'm using sendmail), been using (grep -c
> "daemon=MTA" mail)
> 2. Total Outgoing Messages: been using (grep -c "to=<" mail)
> 3. Messages identified as spam by MailScanner: been using (grep -c
> "actions are delete" mail)
> 4. Total number of messages sent and received: help!
> Does anyone have a list of grep patterns they use and would like to
> share?

Easiest thing would be to download the latest version of logwatch and look at the 
patterns in there.  It is written in perl, so easy to understand.  Or maybe you would 
be satisfied with the logwatch report for MailScanner and wouldn't even have to write 
your own.

Mark Nienberg



More information about the MailScanner mailing list