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: * [EMAIL PROTECTED] FreeBSD_Questions :0: *
> > ^TO_questions FreeBSD_Questions
> >
>
> That must read:
>
> :0:
> * ^(To|C[Cc]):[EMAIL PROTECTED]
> 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
pgp0.pgp
Description: PGP signature