Script question

Lt. Commander listmgr at antennex.com
Sat Jun 13 12:59:28 UTC 2015


> Date: Fri, 12 Jun 2015 19:16:52 -0600
> From: jd1008 at gmail.com
> To: freebsd-questions at freebsd.org
> Subject: Re: Script question

Here is a short shell script: 

#!/bin/sh 

while read line; do 
score=`echo $line | grep ' score=.. '` 
scoreValue=`echo $score | sed -e 's/score=//' -e 's/ *//'` 
address=`echo $line | grep 'client_addr=[0-9]*\.[0-9]*\.[0-9]*.[0-9]* '` 
IP=`echo $address | sed 's/client_addr=//'` 

if [ $scoreValue -ge 12 ]; then 
        echo $score 
        echo $IP 
        echo ==================== 
fi 
done < your-log-file-name> some-file-to-use-to-construct-the-spamassasin filter 

----------------------------------------
> Date: Fri, 12 Jun 2015 19:16:52 -0600
> From: jd1008 at gmail.com
> To: freebsd-questions at freebsd.org
> Subject: Re: Script question
>

That's a very interesting shell script and will give it a try.

But, does the script only pickup spam with a "12" tag level or does it pick up 12 and above which is what I need? (sorry, my scripting is not strong).

Jason 		 	   		  


More information about the freebsd-questions mailing list