At 16:12 1999-02-19 +0800, Mathias Koerber wrote:
On building an autoreply facility with procmail/formail, I
am wondering how to generate a subject line which
includes the original subject using (was: old subject) or similar?
If you'd be so kind as to include a sample of the recipe structure you're
using for your autoreply, it would help greatly with constructing a proper
filter that will just plug into your condition.
ie, to a mail with
Subject: Hello
I want to reply with:
Subject: Thanks (was: Hello)
There are several ways to do this. I'll give you the most flexible I know of:
#somewhere in your .procmailrc initialization:
:0
* ^Subject:\/.*
{
SUBJECT=$MATCH
}
and then
$FORMAIL -I "Subject: Thanks! (was:$SUBJECT)"
as part of whatever existing reply you have in place.
As a basically operational autoreply doing sort of what you want:
:0
* conditions
| ( formail -rt -I "Subject: Thanks! (was:$SUBJECT)" ;\
cat $AUTOREPLY/thanks.txt ) | $SENDMAIL -t
---
Please DO NOT carbon me on list replies. I'll get my copy from the list.
Sean B. Straw / Professional Software Engineering
Post Box 2395 / San Rafael, CA 94912-2395