Subject: Re: procmail forwarding question

From: [email-masked] (David W. Tamkin)
Date: Sat, 25 Feb 1995 14:56:30 -0600 (CST)

Jerry Berkman asked,

| We would like to split up mail coming into our consult account and
| immediately forward it to the proper party based on content.  I've got
| that working pretty well, but the mail is not easily distinguished from
| the person's normal mail, and may get lost in the shuffle.
| 
| To prevent that, I'd like to add "REFERRAL" in the subject line
| of the forwarded mail, e.g. changing a subject such as:
| 
| 	Subject: Where can I get help with Eudora?
| 
| To:
| 
| 	Subject: *REFERRAL* Where can I get help with Eudora?
| 
| How do I do that?

With procmail 3.10:

   :0fwh
   * ^TOconsult
   * ^Subject: *\/[^ ].*
   | formail -I "Subject: *REFERRAL* $MATCH"

With older versions of procmail,

   :0h
   * ^TOconsult
   subject=| formail -x Subject:
    :0Afwh
    | formail -I "Subject: *REFERRAL*$subject"

though we're overlooking the question of why the proper parties aren't using
procmail themselves (or some other thrower) and either this procmail recipe
or its equivalent:

   :0:
   * ^TOconsult
   referrals

David W. Tamkin  Box 3284  Skokie, Illinois  60076-6284
[email-masked]    MCI Mail: 426-1818   +1 312 714 5610

---

From: Jerome M Berkman <[email-masked]>
Date: Thu, 16 Mar 1995 06:49:54 -0800 (PST)

Thanks for the tips.  The use of "formail" and matches does what
I asked.  In addition,  I was using an old version of procmail,
so I upgraded to the current version.  This allowed me to use
weigths in conditions which will make our automatic routing
work better.  E.g. if someone uses "PC" twice and "Mac" once
in the letter, weighting allows me to guarantee it goes to the
PC team irregardless of order of rules.

	- Jerry Berkman, UC Berkeley

> With older versions of procmail,

	...