On Wed, 13 Jan 1999 00:27:50 +0200,
Pasi Ahtola <a157066(_at_)cc(_dot_)tut(_dot_)fi> said:
P> I have a mailing list, working through a huge .forward file. The members
P> of our club have requested two features, Procmail seems to be the right
P> tool to implement them. It should automatically add a Reply-To: field
P> into a header, so that the people would be easier to answer to a whole
P> list, not only to the original author.
Date: Tue, 16 Dec 1997 14:29:20 -0800 (PST)
To: "Michael C. Tiernan" <mtiernan(_at_)bbn(_dot_)com>
Message-ID:
<Pine(_dot_)GSO(_dot_)3(_dot_)95(_dot_)971216134656(_dot_)2849C-100000(_at_)acme(_dot_)sb(_dot_)west(_dot_)net>
From: david hunt <dh(_at_)west(_dot_)net>
On Tue, 16 Dec 1997, Michael C. Tiernan wrote:
> I want to take the "From:" address off a piece of mail and
> then do a replacement of "Reply-To:" with it.
if you want the "From:" name and address:
FROM=`formail -zx'From:'`
if you want the "From:" address only (mind case of -X option):
FROM=`formail -X'From:'|formail -zrxto`
if you want want formail to take it's best shot at picking the
address to use among different possible sender fields:
FROM=`formail -zrtxto`
Then change the header using the var FROM:
:0 f
| formail -a "Reply-To: $FROM"
The -a option adds the field if one doesn't already exist.
Use -I to wipe out any preexisting reply-to and insert your's.
Use -i to insert your reply-to, and move the original reply-to to
"Old-Reply-To:"
Alternatively, you can skip putting the From: into a var, and
just use one call of formail to change the "From:" field to a
"Reply-To:". But you'd lose the "From:", which you probably
don't want to do.
:0 f
| formail -R "Reply-To:" "From:"
--
Karl Vogel
ASC/YCOA, Wright-Patterson AFB, OH 45433, USA
vogelke(_at_)c17mis(_dot_)region2(_dot_)wpafb(_dot_)af(_dot_)mil
I went down the street to the 24-hour grocery. When I got there, the
guy was locking the front door. I said, "Hey, the sign says you're open
24-hours." He said, "Yea, but not in a row." --Steven Wright