> On Mon, 14 Oct 1996, Alan K. Stebbens wrote:
>
> > If A is a nested block or a complex action, then this recipe is really
> > unwieldy, and the following pattern is better:
> >
> > :0
> > * !P
> > * !Q
> > * !R
> > * !S
> > {}
BTW, I wrote the lines above, and the syntax "{}" is *NOT* recognized by
procmail as being an empty condition block. The correct syntax is "{ }".
Thanks to David Tamkin for pointing this out.
> > :0 E
> > A
>
> what if I want to match against a list of
> names say:
>
>
> :0
> * ^from.*aaa
> * ^from.*bbb
> * ^from.*ccc
> * ^from.*ddd
> * ^from.*eee
> * ^from.*fff
> * ^from.* and so on...
> {}
>
> :0 E
> # bounce
If you wish to keep a file of addresses (not regular expressions, but
literal strings), call it "accept", then the following recipe should do
what I think you are attempting:
:0
* ! ? fgrep -s -f accept
BOUNCE-ACTION
If you wish to use regular expressions instead of strings, then use
"egrep" instead (but be sure to use regular expressions):
:0
* ! ? egrep -s -f accept
BOUNCE-ACTION
Alan