Re: ASK Reports?

Reijo Korhonen <[email protected]> Sun, 28 Mar 2004 23:10:05 +0300
Newsgroups gmane.mail.spam.active-spam-killer.general
Organization Reijo.local
Message-ID <[email protected]>
Michael Nadler wrote:
> Is it possible to make this script generally available?

Yes, here it comes. It analyses logs generated by ask. I rotate 5 logs,
one log for one day, so I get status for last 5 days. This script is not
perfect. It ties to find typical output of different kind of mail ask
prosesses. To get this work, you must change some srings to seach.
"delivering to a pipe" must be something else, if you are delivering
mail into local MTA, not external MTA as I do. Note that some long lines 
are wrapped in the listing.


------------
$ cat analyse-ask
#!/bin/sh
#

logfiles="ask.log ask.log1 ask.log2 ask.log3 ask.log4 ask.log5"
WHOLE_MAILS=`cat $logfiles |grep "ASK v2.5.0 Started"|wc -l`
echo "whole mails "$WHOLE_MAILS
DELIVERED_MAILS=`cat $logfiles |grep "delivering to a pipe"|wc -l`
echo "delivered mails "$DELIVERED_MAILS
JUNK_MAILS=`cat $logfiles |grep "Delivering to Junk"|wc -l`
echo "junk mails "$JUNK_MAILS
SENT_CONFIRMATIONS=`cat $logfiles |grep "send_confirmation(): Sending 
confirmation to"|wc -l`
echo "sent confirmations "$SENT_CONFIRMATIONS
BOUNCED_CONFIRMATIONS=`cat $logfiles |grep "Sender is mailer_daemon"|wc -l`
echo "bounced confirmations "$BOUNCED_CONFIRMATIONS
let FAKE_RETMAIL_SPAM=100*BOUNCED_CONFIRMATIONS/SENT_CONFIRMATIONS
echo "spam with faked email address "$FAKE_RETMAIL_SPAM"%"
-----------------

-- 
Reijo Korhonen



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click