At 10:57 PM 1/30/97 -0800, Alan K. Stebbens wrote:
[snip]
It is possible to allow the "Approved:" line to appear as the first
non-blank line of the message body. A simple procmail recipe might
look like the one in "rc.local.r00" from my smartlist library:
:0 HB
* H ?? !^Approve:
* B ?? ^\/Approve:.*[^ ]
* $!^X-Loop: $\listaddr
{
# Remove the Approve from the body, and insert it in the header
:0 fw
| grep -v "^Approve:" | formail -I"$MATCH"
}
Pardon me, but don't you just want to remove *one* line (the first)
starting with "Approve:" from the body, in case the poster happens
to have that string in the message? grep -v removes them all.
This could be done by (for example) replacing the "| grep -v" line with:
| awk 'n==0&&/^Approve:/{n=1;next}{print}' | formail -I"$MATCH"
(Perhaps there's a way to do this in sed, but I'm more familiar with
the awk syntax.)
Cheers,
Stan
PS:
Granted, I can reply to all recipients, but then you get two copies.
Nope. I use "dupcheck.rc" :^). Besides, that's my concern, not yours.
Probably a good thing, too, since you'll be getting four copies of this
(two lists, plus your name in the headers two different ways) :-)