procmail
[Top] [All Lists]

Re: Saving Headers

1997-06-14 21:06:00
bts8(_at_)netcom(_dot_)com wrote,

| I have a reply recipe that includes the original message sent to me from 
| the user.  I'd also like to include the original mail's headers.  I can 
| do this by using a $TEMP file but I'd like to avoid this if possible.  Am 
| I missing an obvious solution?  Thanks!

The easiest way I know is to give the message two copies of its headers; then
the body will consist of the second copy of the headers plus the original
body.  You can then invert the (first set of) headers for reply and the sec-
ond set, now in the body, will be unaffected.  For an example,

   # makes the headers appear twice; second set will be deemed part of the body
   :0fhw
   | sed -e H -e '$ G'

   :0
   | formail -rtk -I"Subject: You Sent Me This?  Why?" | $SENDMAIL -oi -t

If you want the incoming From_ line to be returned unescaped, make it -rtkb.

<Prev in Thread] Current Thread [Next in Thread>