"Michael C. Tiernan" <mtiernan(_at_)bbn(_dot_)com> writes:
I'm sure that this comes off as an easy answer but I thought
I'd ask to see what other people see as solutions.
Here's a dummied up sample of a piece of mail that I get:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From {sender} Tue Sep 24 10:46:08 1996
Received: from {machine} by {machine} with SMTP id xxxxxxxx;
Tue, 24 Sep 1996 10:45:50 -0400
Message-Id: <xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: {list of comma separated names}
Subject: {subject}
Date: Tue, 24 Sep 1996 10:45:39 -0400
From: {sender}
The relevant information is . . .
Entry-number: nnn
Subject: {different subject from above}
Description: {multi-line description}
Applies-to: {keyword}
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
There's this psudo-header "Applies-to:" that I'd like to key a
response from but I'm a little unsure of some of the dangers of
trying this so I thought I'd ask the list. I can do perl, shell,
or procmail/formail itself as processors of this and I'm
wondering what people would suggest as a solution.
Is there anything wrong with just matching it in the body using the
"B ??" leader on the condition?
:0:
* ^From.*whoever sends you these things
* B ?? ^Applies-to: *some_keyword
some_keywords_folder
Of if you have more extensive processing in mind, and have procmail
v3.10 or later:
:0
* ^From.*whoever sends you these things
* B ?? ^Applies-to: *\/[^ ].*
{ APPLIES = $MATCH }
# Now you can do whatever by matching against the APPLIES variable
:0:
* APPLIES ?? ^some_keyword$
some_keywords_folder
Philip Guenther