procmail
[Top] [All Lists]

Re: Rejecting multiple names/subjects at once?

1996-07-08 09:04:27
Mike Rose <mrose(_at_)stsci(_dot_)edu> wrote:
The problem I'm trying to solve is how to have one regexp per
line, with an unlimited number of lines in the file.

Your egrep should be able to handle it, if it doesn't, either
get a different egrep (try GNU egrep), or, depending on what
it is exactly what you want to do, abuse procmail for the job.

To get procmail to do it, increase LINEBUF to be higher than the length of
your file with the expressions (maybe in a separate invocation).
Make sure that all expressions are contatenated into one
giant recipe condition (attach |\ at the end of each line except the
last one, and prepend and attach the necessary recipe glue; this could
be done using a sed invocation).

Then start procmail with that rcfile.  Chances are good that procmail
will actually be faster than any of the egrep implementations.
Procmails regular expression engine doesn't impose any artificial
limits on expression complexity, it's just that procmail's rcfile parser
has this LINEBUF limit.
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).

Are they twins?  Yes.  Are they *both* yours?