Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Linux

Journal mennucc1's Journal: procmail statistics

if you use procmail, you may like this snippet of shell script:
LOG=~/var/log/procmail.log
first_time=`head $LOG | grep '^From' | \
head -1 | cut -d' ' -f3-`
first_ctime=`date -d"$first_time" '+%s'`
last_ctime=`date '+%s'`
echo EMAIL Statistics, average messages per day
egrep '^ *Folder' $LOG | awk '{print $2}' |\
sort | uniq -c | \
awk '{ print $1 * 86400 / ( '$last_ctime' - '$first_ctime' ) " " $2 }'

I had set the procmail rule
:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*
/dev/null
and I found out that spamassassin dunks ~130 messages a day into /dev/null WOW that is a lot more than I would think.
I have put the above script in ~/etc/cron.weekly (see previous post).

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...