sorry i didn't include too much more information about this.
it's use is as follows:
./rblstats.sh log.file
(where log.file is where you have daemon logs (for rblsmtpd) going).

as for the awk problem, this was tested on a FreeBSD and Linux box, both
of which are using GNUawk (gawk). try replacing 'awk' with 'gawk' (if u
have it installed.) and try again. as for the ~ problem, try replacing the
~/ with a directory you can write to.

please excuse my ignorace, it's my first open source program attempt.

-xs

ps: anyone is welcome to hack this program as they feel needed, credit to
me or not, someone even sugested taht it use grep -c instead of wc -l, so
try that too. =)

end 
-------------------------------------------------
Greg Albrecht                     Safari Internet
System Administrator          Fort Lauderdale, FL
[EMAIL PROTECTED]                      www.safari.net              
              +1[888|954]537-9550
-------------------------------------------------

On Wed, 24 Mar 1999, Scott D. Yelich wrote:

>> hey all, here is a quickie little program i wrote to see exactly what
>> rblsmtp is doing for you, here is an example of the output:
>
>> #!/bin/sh
>> echo "RBL-Stats v1.0 by xs <[EMAIL PROTECTED]>"
>> echo ""
>> echo "checking your logfile, this'll take a few."
>> cat $1|grep rblsmtp > ~/.rbltmp.bak
>> echo "Since `head -1 ~/.rbltmp.bak|awk '{print $1" "$2" "$3}`"
>> echo "RBL has blocked `grep "com/cgi" ~/.rbltmp.bak|wc -l` connections."
>> echo "DUL has blocked `grep "com/dul" ~/.rbltmp.bak|wc -l` connections."
>> echo "DSSL has blocked `grep dssl ~/.rbltmp.bak|wc -l` connections."
>> echo "ORBS has blocked `grep orbs.org ~/.rbltmp.bak|wc -l` connections."
>> echo ""
>> echo "For a total of `grep rblsmtp ~/.rbltmp.bak|wc -l` connections
>> blocked."
>> echo "Great Hunt."
>> rm ~/.rbltmp.bak
>> #EOF
>
>Has anyone managed to get this to run?
>My /bin/sh doesn't do ~ expansion
>and the awk line appears tohave syntax errors with either the "
>or the ` or both.
>
>Scott
>
>
>
>
>

Reply via email to