procmail
[Top] [All Lists]

Re: auto-responder that quotes message headers & body

2000-10-10 16:09:48
lewst(_at_)yahoo(_dot_)com asked,

| Yeah, I guess this works, but I'm surprised there isn't a simpler
| way to do this since procmail has access to the entire message initially.

Sorry, what was the question, to include the entire message, headers and
body, in the autoreply body, with "> " citations, without using a temporary
file that needs to be removed afterward?

# Some seds need the second "\\" line; remove if it makes two blank lines
# between the error message and the second head.
# Add \ before each ! if you use csh or *csh.

 :0fwh # two heads are better than one
 | sed -e1h -e'1 !H' -e'$ !b' -ep -e"i\\
\\
We don't want your message because it smells funny.\\
\\
" -ex

# The second copy of the head is now part of the body.

 :0
 | formail -rkb | "$SENDMAIL" $SENDMAIFLAGS -t

If you also want to store a copy of the original, presumably you'll have
saved it earlier in your rcfile or you'll be doing all of this within a
clone's braces.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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