From owner-freebsd-questions@FreeBSD.ORG Sat Jun 13 12:59:28 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 010A434D for ; Sat, 13 Jun 2015 12:59:27 +0000 (UTC) (envelope-from listmgr@antennex.com) Received: from BAY004-OMC4S22.hotmail.com (bay004-omc4s22.hotmail.com [65.54.190.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E100EA16 for ; Sat, 13 Jun 2015 12:59:27 +0000 (UTC) (envelope-from listmgr@antennex.com) Received: from BAY182-W64 ([65.54.190.200]) by BAY004-OMC4S22.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Sat, 13 Jun 2015 05:58:21 -0700 X-TMN: [TXpLeANEov6whZ1i1ARECGNwa+TCeiHYuFmGBj+7cyM=] X-Originating-Email: [listmgr@antennex.com] Message-ID: From: "Lt. Commander" To: "freebsd-questions@freebsd.org" Subject: RE: Script question Date: Sat, 13 Jun 2015 07:58:21 -0500 Importance: Normal In-Reply-To: <557B8484.9060405@gmail.com> References: , , , <557B8484.9060405@gmail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 13 Jun 2015 12:58:21.0812 (UTC) FILETIME=[A081BB40:01D0A5D8] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2015 12:59:28 -0000 > 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 =