procmail
[Top] [All Lists]

Re: how do I have procmail cat a file and match from it?

1997-09-12 10:39:43
Joel Bremson asked,

| I'd like to have procmail cat an external file and match from it.
| 
| Something like this:
| 
| :0:
| * (cat file and step through)
| spam

I'm not sure what you mean by "match from it" or "step through it"; there are
dozens of ways to interpret each of those.

If you mean that the file contains patterns or strings, and you want to mark
the incoming message as spam if any of those patterns or strings shows up in
it, try something like this (use fgrep instead of egrep for fixed strings
instead of patterns) -- and set the H and B flags as you need to:

  :0:
  * ? egrep -f file
  spam