From owner-freebsd-questions@FreeBSD.ORG Fri Dec 26 01:24:57 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E7AE16A4CE for ; Fri, 26 Dec 2003 01:24:55 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id DABBF43D31 for ; Fri, 26 Dec 2003 01:24:52 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hBQ9Okca031949 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Dec 2003 09:24:46 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hBQ9Oj6x031948; Fri, 26 Dec 2003 09:24:45 GMT (envelope-from matthew) Date: Fri, 26 Dec 2003 09:24:45 +0000 From: Matthew Seaman To: Gautam Gopalakrishnan Message-ID: <20031226092445.GA31810@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Gautam Gopalakrishnan , FreeBSD Questions , Bryan Cassidy References: <20031225214301.GA92600@bellsouth.net> <20031225205755.GA89456@madras.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20031225205755.GA89456@madras.dyndns.org> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on happy-idiot-talk.infracaninophile.co.uk cc: FreeBSD Questions cc: Bryan Cassidy Subject: Re: Procmail + Mutt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2003 09:24:57 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 26, 2003 at 07:57:55AM +1100, Gautam Gopalakrishnan wrote: > On Thu, Dec 25, 2003 at 03:43:01PM -0600, Bryan Cassidy wrote: > > I am using FreeBSD 4.8 with Mutt 1.5 and Procmail 3.22 and have setup > > some filters. In my .procmailrc I have the following > >=20 > > :0: * ^TO_freebsd-questions@freebsd.org FreeBSD_Questions :0: * > > ^TO_questions FreeBSD_Questions > >=20 >=20 > That must read: >=20 > :0: > * ^(To|C[Cc]):.*questions@freebsd.org > freebsd-questions >=20 > because sometimes people CC freebsd-questions Except that '^TO_' in procmail recipies is a variable that expands into a regular expression that matches pretty much all of the possible header lines that can contain the delivery address. From procmailrc(1): If the regular expression contains `^TO_' it will be substituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope |Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)', which should catch all destination specifications containing a specific address. There's another very similar pre-defined expression ^TO which I use -- I also match on the List-ID header, which is the most effective way of catching messages delivered by through list: the ^TO stuff is to catch messages CC'd to me as well as to the list: # FreeBSD Questions :0: * (^TO|^List-ID:.*)(freebsd-)?questions(\.|@)FreeBSD\.ORG | ${FORMAIL} -A"X-Folder: FreeBSD/Questions" >> FreeBSD/Questions Note too that '.' in these REs is a wildcard, matching every single character. You need to escape it '\.' to match it literally. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQE/6/5ddtESqEQa7a0RAvEoAJ4lm5F6ynFN8505aUGIBI0eTJ9wbwCcCyh9 rro22dEbInNzk7sGBP27Low= =pVVG -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--