procmail
[Top] [All Lists]

Re: subject processing

1997-07-04 00:40:00
On Thu, 03 Jul 1997 17:52:17 -0700, Michael Helm 
<helm(_at_)fionn(_dot_)es(_dot_)net>
wrote:
:0 fh
* ^Subject: *((re\-+)|(sv\:+)) *\/.*
| formail -I "Subject: Re: $MATCH"
:0 fh
* ^Subject: *fw\:+ *\/.*
| formail -I "Subject: $MATCH"

How's this:

    :0fhw
    * ^\/Subject:[      ]*((re|fw|sv|betr|antw)( ?[[][0-9]+])?[-:>][    ]*)+
    | ... some suitable program which does essentially \
      sed "s/^$MATCH/Subject: /"

I like Perl too, but I would probably get strangled by my admin if I
routinely invoked it on every single mail message. If you can come up
with a sed script which ignores or appropriately quotes metacharacters
in the search pattern, more power to you. The right answer is probably
awk.

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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