Bart Schaefer wrote on Saturday, May 26, 2007 7:52 PM:
On 5/26/07, Dallman Ross <dman(_at_)nomotek(_dot_)com> wrote:
Oh: this will only *quote* MIME-encoding of attachments.
It will be very ugly. Obviously, if you really want to
send the entire body back with attachments, you need to
do things a bit differently -- especially if the body is
not plaintext.
http://www.well.com/user/barts/email/mimewrap.txt
Handles automatically increasing LINEBUF and turns the entire
original message into a message/rfc822 attachment.
Interesting. I was just thinking one could simply
rewrite the headers and introduce a blank line and the
message text; then, when the header and body were
reattached, the stuff after the blank line would become
the top of the body. I was thinking one could write
a MIME header similarly to what you did.
Dallman's response-addressing code is good (except maybe for
a missing close-brace?), so the whole thing would look like:
[snip]
INCLUDERC=mimewrap.txt
NEWFROM = "mynewfrom(_at_)address"
:0 fw
| formail -rkp "> " \
-A "Precedence: junk" \
-A "X-Loop: $NEWFROM" \
-i "Reply-To: $NEWFROM" \
-i "Return-Path: $NEWFROM" \
-i "Sender: $NEWFROM" \
-i "From: $NEWFROM" \
-i "Subject: Auto-Reply"
Yes, except my "formail -k" quotes the body, so since
you already have your MESSAGETEXT in the body, it,
too, will now get quoted. I think in this case
we don't want to use any quote char at all, so:
formail -rkp ""
You're right that I left the closing brace off. Thanks.
Dallman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail