procmail
[Top] [All Lists]

Conditional filtering of the body (and something else interesting)

2000-12-04 11:44:28
I want to perform filtering on the body of a message, depending on who
it's from.  Here's an example (that doesn't work) but demonstrates my
intentions:

CHUMS=(alice(_at_)domain\(_dot_)com|bob(_at_)domain2\(_dot_)com)

:0
* ^From:[       ]+.*$CHUMS
{
  :0 fbw
  | sed 's/bob/bumface/'
}

In reality the CHUMS line will be much longer (and of course I'll be
changing the filter :)).

Now for the interesting part:

I've been told that grep'ing for

(remove|removeme|removal) 

is slower than something that looks more like 

remov(e(|me)|al)

Is this really the case?  If so, has anyone written a script to
generate regexps like this, given a list of conditions?

take care,

Cory

Attachment: pgpLsV8gwf10m.pgp
Description: PGP signature

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