Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 2015 07:58:21 -0500
From:      "Lt. Commander" <listmgr@antennex.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   RE: Script question
Message-ID:  <BAY182-W64842DB24FDD6D0F3A1854CCBA0@phx.gbl>
In-Reply-To: <557B8484.9060405@gmail.com>
References:  <BAY182-W89C2924F4BDF0D2BD3810DF4BB0@phx.gbl>, <CA%2Bg%2BBvjNv0PBOfmnWkzE26Tgqj6qZ-VKbHXMpuB8gak69G_T2g@mail.gmail.com>, <BAY404-EAS263BBC0728E6171BD47A4AECCBA0@phx.gbl>, <557B8484.9060405@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Fri=2C 12 Jun 2015 19:16:52 -0600=0A=
> From: jd1008@gmail.com=0A=
> To: freebsd-questions@freebsd.org=0A=
> Subject: Re: Script question=0A=
=0A=
Here is a short shell script: =0A=
=0A=
#!/bin/sh =0A=
=0A=
while read line=3B do =0A=
score=3D`echo $line | grep ' score=3D.. '` =0A=
scoreValue=3D`echo $score | sed -e 's/score=3D//' -e 's/ *//'` =0A=
address=3D`echo $line | grep 'client_addr=3D[0-9]*\.[0-9]*\.[0-9]*.[0-9]* '=
` =0A=
IP=3D`echo $address | sed 's/client_addr=3D//'` =0A=
=0A=
if [ $scoreValue -ge 12 ]=3B then =0A=
=A0=A0=A0=A0=A0=A0=A0 echo $score =0A=
=A0=A0=A0=A0=A0=A0=A0 echo $IP =0A=
=A0=A0=A0=A0=A0=A0=A0 echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D =0A=
fi =0A=
done < your-log-file-name> some-file-to-use-to-construct-the-spamassasin fi=
lter=A0=0A=
=0A=
----------------------------------------=0A=
> Date: Fri=2C 12 Jun 2015 19:16:52 -0600=0A=
> From: jd1008@gmail.com=0A=
> To: freebsd-questions@freebsd.org=0A=
> Subject: Re: Script question=0A=
>=0A=
=0A=
That's a very interesting shell script and will give it a try.=0A=
=0A=
But=2C does the script only pickup spam with a "12" tag level or does it pi=
ck up 12 and above which is what I need? (sorry=2C my scripting is not stro=
ng).=0A=
=0A=
Jason 		 	   		  =



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY182-W64842DB24FDD6D0F3A1854CCBA0>