From owner-freebsd-questions@FreeBSD.ORG Sat Jun 13 00:31:05 2015 Return-Path: Delivered-To: freebsd-questions@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11AF9267 for ; Sat, 13 Jun 2015 00:31:05 +0000 (UTC) (envelope-from listmgr@antennex.com) Received: from BAY004-OMC4S4.hotmail.com (bay004-omc4s4.hotmail.com [65.54.190.206]) (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 EF3D5BB7 for ; Sat, 13 Jun 2015 00:31:04 +0000 (UTC) (envelope-from listmgr@antennex.com) Received: from BAY404-EAS263 ([65.54.190.201]) by BAY004-OMC4S4.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Fri, 12 Jun 2015 17:29:59 -0700 X-TMN: [nVDUBdT89XHGJaVWtKMIRotF0wuOn7BSC8Gc4zxuvyg=] X-Originating-Email: [listmgr@antennex.com] Message-ID: From: "Lt. Commander" To: "'Olivier Nicole'" CC: References: In-Reply-To: Subject: RE: Script question Date: Fri, 12 Jun 2015 19:29:56 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 15.0 thread-index: AQABAgME0X1Dm5rl1ITbGRHvuqm5ZwDmqqb4AMy6ez2hOz/2YA== Content-Language: en-us X-OriginalArrivalTime: 13 Jun 2015 00:29:59.0146 (UTC) FILETIME=[146EA4A0:01D0A570] X-Mailman-Approved-At: Sat, 13 Jun 2015 01:06:14 +0000 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 00:31:05 -0000 -----Original Message----- From: olivier2553@gmail.com [mailto:olivier2553@gmail.com] On Behalf Of = Olivier Nicole Sent: Friday, June 12, 2015 7:19 PM To: Lt. Commander Cc: freebsd-questions@freebsd.org Subject: Re: Script question Jason, > I would like to be able to scan the daily maillog with a script at = midnight to extract a list by selecting spam recognized and contained = using the constant "score=3D(greater than x) and from that a list of = just the IPs which will be placed in a spam file as part of a spam = system here. Am tired of some getting past spamass even though it = exceeds a reasonable tag level. > > I do know how to extract just the IP from a line in the log, but not = sure what the syntax should be to first ID the "score=3D > I hope this has been presented clear enough to gather some help on = this task. > > Thanks, > Jason Oliver: This is a typical line in the log. You see it has the info needed: -------------------------------------------------------------------------= ---------------------- un 12 08:56:42 myhost.com milter-spamc[58732]: 01937 t5CDueuM006830: = spam=3DYES score=3D110.90 required=3D6.00 client_addr=3D117.62.50.137 = client_name=3D[117.62.50.137] subject=3D'Re: I won't tell this secrect = to anyone else...' mail=3D rcpts=3D -------------------------------------------------------------------------= ---------------------- Thanks, Jason