Return-Path: Delivered-To: apmail-spamassassin-users-archive@www.apache.org Received: (qmail 61743 invoked from network); 23 Mar 2010 02:26:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2010 02:26:51 -0000 Received: (qmail 40068 invoked by uid 500); 23 Mar 2010 02:26:49 -0000 Delivered-To: apmail-spamassassin-users-archive@spamassassin.apache.org Received: (qmail 40036 invoked by uid 500); 23 Mar 2010 02:26:49 -0000 Mailing-List: contact users-help@spamassassin.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@spamassassin.apache.org Received: (qmail 40029 invoked by uid 99); 23 Mar 2010 02:26:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 02:26:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mkettler_sa@verizon.net designates 206.46.173.11 as permitted sender) Received: from [206.46.173.11] (HELO vms173011pub.verizon.net) (206.46.173.11) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 02:26:41 +0000 Received: from [192.168.1.7] ([unknown] [74.107.123.32]) by vms173011.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0KZP00F2NQRVC9S0@vms173011.mailsrvcs.net> for users@spamassassin.apache.org; Mon, 22 Mar 2010 21:26:20 -0500 (CDT) Message-id: <4BA826CF.2040305@verizon.net> Date: Mon, 22 Mar 2010 22:26:23 -0400 From: Matt Kettler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-version: 1.0 To: users@spamassassin.apache.org Subject: Re: Rules correct ? References: <4BA75F68.2090505@unixmail.co.uk> <4BA76008.7090104@unixmail.co.uk> <0A0BF68B3C4D4FF2EB603EA1@sodor.cc.columbia.edu> In-reply-to: <0A0BF68B3C4D4FF2EB603EA1@sodor.cc.columbia.edu> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 3/22/2010 9:11 AM, Joseph Brennan wrote: > > >> header __MY_FILTRAGE_TO_93 To =~ /\@exxent\.net/i > > > This matches if @exxent.net is in the "To:" header line. It doesn't > match all mail sent to recipients at exxent.net-- only mail with their > address in the "To:" header line. > > Of course this may be exactly what you want to do. > True, you could change it to ToCc =~ if you wanted to match both To: and Cc: headers. header __MY_FILTRAGE_TO_93 ToCc =~ /\@exxent\.net/i Not much you can do for BCC'ed mail (or mailing list mail) though. Another thing which might be useful would to be to add the :addr modifier. This will cause it to match the email address part of the header, but not the descriptive text part. However, beware that the :addr modifier limits you to only one address, so it makes ToCc useless. In: "joe@irs.gov", :addr will extract the example.com address, not the irs.gov part. This might be overkill, but there are situations where it is useful. header __MY_FILTRAGE_TO_93 To:addr =~ /\@exxent\.net/i