Date: Fri, 26 Dec 2003 09:24:45 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Gautam Gopalakrishnan <ggop@madras.dyndns.org> Cc: Bryan Cassidy <b_cassidy@bellsouth.net> Subject: Re: Procmail + Mutt Message-ID: <20031226092445.GA31810@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20031225205755.GA89456@madras.dyndns.org> References: <20031225214301.GA92600@bellsouth.net> <20031225205755.GA89456@madras.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
> >
> > :0: * ^TO_freebsd-questions@freebsd.org FreeBSD_Questions :0: *
> > ^TO_questions FreeBSD_Questions
> >
>
> That must read:
>
> :0:
> * ^(To|C[Cc]):.*questions@freebsd.org
> freebsd-questions
>
> 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
--
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)
iD8DBQE/6/5ddtESqEQa7a0RAvEoAJ4lm5F6ynFN8505aUGIBI0eTJ9wbwCcCyh9
rro22dEbInNzk7sGBP27Low=
=pVVG
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031226092445.GA31810>
