procmail
[Top] [All Lists]

[COPY] Inserting a word into a subject name

1996-01-21 22:06:35
Our billing person receives subscriptions processed by a perl script
that specifies the subject according to the type of subscription ordered.
The message is sent to 

        billing(_at_)ourcompany(_dot_)com

I'd like to 

        1. keep the original of the subscription email in the inbox
        2. forward 2 copies of the sub with the word [COPY] inserted
                at the beginning of the subject to two separate addresses.

Here's my rc.normal file:

-----------------------
# recipe sends the original to the inbox
:0 c
$MAIL

# recipe formats the original by appending the word
# [COPY] onto the front of the subject
:0fhw
| formail -A "Subject: [COPY] $SUBJECT"

# recipe sends the formatted mail to the first person
:0 c
! billingperson(_at_)ourcompany(_dot_)com

# recipe sends the formatted mail to the second person
:0 c
! billingsupervisor(_at_)ourcompany(_dot_)com
-----------------------

Apparently formail won't do this... I realize that I could change the perl
script
to do all of this but I'd sure like to learn more about procmail and formail!

If anyone can help, I'd sure appreciate it!
If not, I appreciate the list anyway!
Thanks,
Dave

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