procmail
[Top] [All Lists]

Re: procmail problem

1997-06-24 11:38:00
Marcel Strittmatter spaketh thusly at dman:

Hi folks

I have a problem: I like to "forward" all mails with a special Subject 
(e.g. move) to a special mail-address (e.g. my(_at_)xx(_dot_)ch), but I only 
want to 
forward the body part of the message, so the new recipient 
(my(_at_)xx(_dot_)ch) 
cannot see where the message came from. I also want to have the senders 
address set to mstrittm(_at_)stud(_dot_)ee(_dot_)ethz(_dot_)ch(_dot_)

Please help me!!

Ok, we match on the "Subject:" of "move" (you may want to refine this) and
we use `formail` to generate an autoreply throwing away all the headers
except "X-Loop:", but preserving the (quoted) body.  Now we set the
sender's ("From:" ?) address, a new "Subject:" (probably) and the "To:"
address.  We then have `sendmail` do its thing.  Any questions?

        :0
        * ^Subject: move
        | ($FORMAIL -rk -I"From: 
<mstrittm(_at_)stud(_dot_)ee(_dot_)ethz(_dot_)ch>" \
           -I"Subject: Forwarded Email" -I"To: <my(_at_)xx(_dot_)ch>") |\
           $SENDMAIL -oi -t

Lates!
---------------------------------------------------------------------------
Tim <bodysurf(_at_)pobox(_dot_)com>                          
mailto:bodysurf(_at_)pobox(_dot_)com
Finger bodysurf(_at_)pobox(_dot_)com for my PGP public key (Bits 1024/KeyID 
09DA5C49).
PGP Key FPrint (09/03/94): 4C 97 F1 FA 70 55 68 91  49 D1 AD F2 DD 63 0C 15
---------------------> Please PGP encrypt your email <---------------------

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