procmail
[Top] [All Lists]

He's Baaaaaackkk... [COPY] Inserting a word into a subject name

1996-01-26 01:36:18
Thank you all for your replies to my question about my recipe.
The replies were a big help - and got me going with this. The 
recipe now works - to a point <g>.

Here's the result that works:
-----------------------
# recipe sends the original to the inbox
# recipe formats the message by appending the word
#       [COPY] onto the front of the subject
# recipe sends the formatted mail to the first person
# recipe sends the formatted mail to the second person

:0 c:
/var/spool/mail/billing
 
:0fhw
| formail -I "Subject: [COPY] $SUBJECT"

:0 c
! billingperson(_at_)ourcompany(_dot_)com

:0
! billingsupervisor(_at_)ourcompany(_dot_)com
-----------------------

The problem is that the formail line does a Replace rather than
just inserting the word. Is this all I can do? I'd like to put the string
[COPY] at the beginning (or even the end) of the subject line, but
all it does is replace the whole line.

Any further help will be [gulp! are you bothering them again?]
appreciated!

Thank you!
Dave

p.s., I have read the procmailex and other man files, but could find
no leads on this. I've searched the web for formail and saw many
helpful procmail web sites. I've read about 1/4 through the "best of
the procmail mailing list" file - but it was tough and it's almost too big
to find anything. Thanks all for all of these resources. I did also see
and save the previous message on this list called "Chaining subject 
on forwarded message". That was a help too.

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