[wplug] Procmail recipe help
Jonathan S. Billings
billings at negate.org
Tue Sep 26 11:38:44 EDT 2006
WARNING: I believe these examples will work, test it first though. I
just wrote them off the cuff without testing them first.
On 09/25/2006 06:40 PM, Gentgeen wrote:
> (1) how do I check for things like "fwd: " or "re: "
* ^Subject: (re:|fwd:|) *$
> (2) how could I then add in a subject as noted above.
This can get a little complicated.
You can use procmail's filter with 'formail -i' to add a subject,
however first you need to extract the information from the message.
Maybe something like this:
:0:
* ^Subject: (re:|fwd:|) *$
{
# add a new subject. The "rabbit ears" \/ mean
# put everything after them into $MATCH
:0f
* ^From: \/.*$
| formail -i "Subject: From $MATCH"
}
There are probably a couple other ways of doing this, I can think of
others too, but I won't bore by being overly pedantic. Grabbing just
the name, and not the email address would also be complex, and I'll
leave that to the ingenuity of the reader.
--
Jonathan Billings <billings at negate.org>
Friction is a drag.
More information about the wplug
mailing list