procmail
[Top] [All Lists]

Re: auto-responder that quotes message header & body

2000-10-11 13:30:12
Collin Park <collin(_at_)cup(_dot_)hp(_dot_)com> writes:
...
Here's how I'd start.  This is UNTESTED, YMMV, etc...
...
       # Don't modify original header, just put a few fields in $RH

       :0hi
       RH=|formail -rt "-IPrecedence: junk" \
                   "-AX-Loop: lewst(_at_)corp(_dot_)com" "-IFrom: 
postmaster(_at_)corp(_dot_)com"
...

This is exactly the way I would attack this problem.  Anything else ends
up messier.

However...

Regarding why "formail -rt" rather than just "-r"...

http://www.procmail.org/jari/pm-tips-body.html#always_use_formails_rt_switch 

Jari needs to update that page for 3.14 and later.  I fixed the header
field precedences used by formail -r with and without the -t flag in
version 3.14 such that you should now usually leave out the -t.  To
quote the formail manpage:

       By default, when generating an auto-reply header  procmail
       selects  the envelope sender from the input message.  This
       is correct  for  vacation  messages  and  other  automatic
       replies  regarding the routing or delivery of the original
       message.  If the sender is expecting a reply or the  reply
       is  being  generated  in  response  to the contents of the
       original message then the -t option should be used.

Hmm, I suppose question 12.7 should be updated as well to use the method
in your message rather than that sed command.


Philip Guenther

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