Subject: Using a filter to process a series of messages

From: Will Carlton <[email-masked]>
Date: Mon, 3 Apr 1995 20:59:34 -0400 (EDT)

I am using procmail to process a set of messages coming from an
internal LAN gateway to our Unix enviroment.  The mail comes across
with a bunch of uuencoded attachments that I run through a perl
script I wrote that converts them into MIME multipart messages.  I
would like to run any mail coming from a specific address through
this filter and then subsequently route or resend the resulting
message.

Here is the salient part of my .procmailrc:

####################################################################
# Keep last 100 messages
:0 c
backup

:0 ic
|cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`

####################################################################
# WWW-TALK list
:0 :
* ^To:.*www-talk
www-talk

####################################################################
# Incoming 3COM
:0 bhwf
* ^From:.*langw
|$HOME/bin/fix3com 
{
# save in CRES folder if CRES.ARCH or CRES.CORE is anywhere in message
	:0 Bc:
	* CRES.(ARCH|CORE)
	cres/CRES.04

# resend CRES stuff to the cres dist list
	:0 Ac
	| $HOME/bin/rsnd `cat $HOME/Mail/cres.dist.list`

# Other mail from LAN GW goes in 3c folder
	:0 BHbh:
	* ^From:.*langw
	* !CRES.ARCH
	3c
}

For some reason the mail gets copied to my inbox as well as either the
'3c' or 'CRES.04' mailbox.  I also get the following messages from 
procmail:

!  From langw@cmxs004 Mon Apr  3 18:26:07 1995
!   Subject: N.J.Petterson:TEL:GTEGO  SOW COMMITMENTS FOR CRES 
!    Folder: /usr/mail/wcarlton						   1457
!  procmail: Notified comsat: "wcarlton@726556:/usr/mail/wcarlton"
!  procmail: Assigning "LASTFOLDER=backup/msg.xW2"
!  procmail: Opening "backup/msg.xW2"
!  procmail: Acquiring kernel-lock
!  procmail: [3749] Mon Apr  3 20:31:32 1995
!  procmail: Executing "cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`"
!  procmail: [3749] Mon Apr  3 20:31:32 1995
!  procmail: Assigning "LASTFOLDER=cd backup && rm -f dummy `ls -t msg.* | sed -e 1,100d`"
!  procmail: No match on "^To:.*www-talk"
!  procmail: Match on "^From:.*langw"
!  procmail: Executing "/users/wcarlton/bin/fix3com"
!  procmail: [3749] Mon Apr  3 20:31:33 1995
!  procmail: Skipped "{"
!  procmail: Match on "CRES.(ARCH|CORE)"
!  procmail: Locking "cres/CRES.04.lock"
!  procmail: Assigning "LASTFOLDER=cres/CRES.04"
!  procmail: Opening "cres/CRES.04"
!  procmail: Acquiring kernel-lock
!  procmail: [3749] Mon Apr  3 20:31:34 1995
!  procmail: Unlocking "cres/CRES.04.lock"
!  procmail: Executing "cat,/users/wcarlton/Mail/cres.dist.list"
!  procmail: Assigning "LASTFOLDER=/users/wcarlton/bin/rsnd dt10760@cmxb006 g051286@cmxb006 wcarlton@cmxs004"
!  procmail: Match on "^From:.*langw"
!  procmail: No match on ! "CRES.ARCH"
!  procmail: Closing brace unexpected
!  procmail: Locking "/usr/mail/wcarlton.lock"
!  procmail: Executing "/users/wcarlton/bin/rsnd,dt10760@cmxb006,g051286@cmxb006,wcarlton@cmxs004"
!  procmail: Assigning "LASTFOLDER=/usr/mail/wcarlton"
!  procmail: Opening "/usr/mail/wcarlton"
!  procmail: Acquiring kernel-lock
!  procmail: [3749] Mon Apr  3 20:31:35 1995
!  procmail: Unlocking "/usr/mail/wcarlton.lock"

Why is it skipping the braces?  What am I doing wrong?

Will

#include <std.disclaimer.h>
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// Will Carlton                    Internet: [email-masked]
// GTE Data Services               Phone:    (813) 978-7433
// Telecom Park, DC F4-N           Fax:      (813) 978-5274
// Temple Terrace, FL 33687
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"My employer and I have an agreement: I do not speak for them, nor do they 
speak for me.  <strong>Do not interpret anything that I may say as even 
remotely near the official policy of GTE or GTE Data Services.</strong>"