procmail
[Top] [All Lists]

Re: Unidentified subject!

1996-06-28 07:14:04
Henrik Tilly <tilly(_at_)kd(_dot_)qd(_dot_)se> writes:
I know that this is a silly question, but plz.. I just
nedd procmail to do 1 thing!

I need procmail to forward a mail, AND change the Subject !

Right now I have:

:2 c
^From.*
^Subject:.*
! henrik(_at_)tilly(_dot_)se

and that is working just fine.. but how do I change the subject ?!
I want the reciver (henrik(_at_)tilly(_dot_)se) to always get the Subject: 
0705224345


Just feed the message through formail to change the subject and thence
into sendmail:

:0c
| formail -I"Subject: 0705224345" | $SENDMAIL -oi henrik(_at_)tilly(_dot_)se


You'll note that I've deleted the two conditions you show, as they do
nothing: every message MUST have a From: line and a Subject: line, so
those regexps always match.  Of course, if you trimmed some other text
off of them then you'll want to reinstate them in the recipe.

Philip Guenther

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