On Saturday 28 March 2009, Martin Gregorie wrote: >On Sat, 2009-03-28 at 10:36 -0400, Gene Heskett wrote: >> On Saturday 28 March 2009, Martin Gregorie wrote: > >[snippage] > >> >Total mail 2968 messages >> >Spam 198 messages >> >MG_LIVESP 91 hits >> >MG_LIVESF 22 hits >> >> How did you generate this report? > >I used grep and wc to produce individual rule usage from the spamd log >messages: > >grep MG_LIVESP /var/log/maillog* | wc >grep MG_LIVESF /var/log/maillog* | wc > I see. I thought maybe you had a magic incantation you got from Marie Labeau (old Bobby Bare song) or something. :)
>The totals come from a Perl script I wrote to analyse local rule usage >as an aid to weeding out any that become redundant. It analyses mail >logs and produces three types of output: > >- totals (all/spam/ham) by looking at log messages output by a custom > spamkiller that's immediately downstream of spamc, though it could > equally well work off the Y/N flag logged by spamd I use procmail as the mta, it looks at SA's output & /dev/nulls anything over *****. >- local rules hit counts (all rules or just the top 10) > >- local rules that didn't fire > >I also run it as part of logwatch to produce daily totals and the daily >top 10 hits. If it would be useful to you, say so and I'll be happy to >tar it up for release under the GPL along with the shell scripts, >spamkiller and even (gasp!) write a bit of documentation. It does sound rather useful at that. Post a link when you do that please. > >Martin Thanks. -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) What PROGRAM are they watching?