From owner-freebsd-questions@FreeBSD.ORG Sat Jun 13 00:40:11 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 8E0FC3B3 for ; Sat, 13 Jun 2015 00:40:11 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5522FCCF for ; Sat, 13 Jun 2015 00:40:11 +0000 (UTC) (envelope-from jd1008@gmail.com) Received: by igbzc4 with SMTP id zc4so21570240igb.0 for ; Fri, 12 Jun 2015 17:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=JxDUofVX+hO1tPMPPXJRV64dbFWj7CgFRNvLcWeTzgw=; b=KPXOnLeW5EagyCqyVod9/RkgE+xYwyQ6FuNUYCklbbwFRZEzknRl81DVHL/i3wfSGW IcbDvhb6f6jnmzflBN13ljE+ICAOktq7w+4K4a3E1MjGH8LvOe7j4U2p7DmqGw3pgSIf CzBFB/a4IjLqtPnNlKeeU+TayH2aoAvc+2Jf289Jz9I020g22NVITzH+JIzQsjlTWKYG faNatL9NFu7gAZzpvwSSRjGF6++s40Vh9qEddKknjwhINmXD3ilKywc0RzbduZoNYgVL L/L5ELXQi6YpnlVZZkz41cPrS1Bnd5b82xU/qe1ceU+gfTPzFxbihVvzeM8as3J2SaAI ko0A== X-Received: by 10.107.133.9 with SMTP id h9mr21274534iod.47.1434156010734; Fri, 12 Jun 2015 17:40:10 -0700 (PDT) Received: from localhost.localdomain ([50.243.6.59]) by mx.google.com with ESMTPSA id r4sm2300533igh.9.2015.06.12.17.40.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 17:40:10 -0700 (PDT) Message-ID: <557B7BCD.2050908@gmail.com> Date: Fri, 12 Jun 2015 18:39:41 -0600 From: jd1008 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Script question References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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:40:11 -0000 On 06/12/2015 05:53 PM, Lt. Commander wrote: > Am running fbsd-9.3 and sendmail-8.15 plus spamassassin. > > 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=(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= > I hope this has been presented clear enough to gather some help on this task. > > Thanks, > Jason Copy and paste a sample email header in your reply to this list.