In addition, if indeed which does use the parent's path (most do), it will
find fgrep. Well, procmail is that parent, so it too would have found
fgrep. So you have done absolutely nothing but use valuable cycles.
On Mon, 12 Aug 2002, Philip Guenther wrote:
"Dr. David Kirkby" <davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk> writes:
Mike Jackson wrote:
Mike: using full paths for programs is premature optimization. The time
taken to find fgrep in PATH is trivial compared to the time taken by
fgrep itself. Secondly, 'which' is a user-presentation tool and may
output something other than a full path; some versions don't even use
the PATH value they got from their parent. If you want to run fgrep,
just type "fgrep". Really, it's the best choice.
* ? (echo "$FROM" | $FGREP -i -f $HOME/ok)
The parens aren't needed and you probably want to put a newline at the
end of the logged text:
* ? ( echo "$FROM" | fgrep -i -f $HOME/ok
LOG = "OK
That almost worked. The only two problems are:
1) It keeps giving the message 'wordlist too large' whenever the list of
in the file exceeds 315 or so. Putting WORDLIST= 8000, 16000 or 200000 does
seem to change this behaviour at all. This seems to be a procmail problem, as
fgrep has no problems with a file of this length.
"wordlist too large" is not an error that procmail generates. Ergo,
it's not a procmail problem. I would bet it's an fgrep limitation; try
strings `which fgrep` | grep wordlist
Oh, and do that on the machine where your mail is received, if that's
not your normal machine.
I just checked a Solaris 2.7 box and its fgrep will generate that error
Solutions include breaking up the word list into multiple files and
invocations of fgrep (blech) or installing GNU grep on the mail server.
2) It does match on people with longer email addresses, than those in
white.list. Hence if fred(_at_)sun(_dot_)com is in my white.list, so
would be accepted too. This is not such a hassle.
I think you mean that if fred(_at_)sun(_dot_)com is in your white.list, then
anotherfred(_at_)sun(_dot_)com will also be accepted because it also contains
"fred(_at_)sun(_dot_)com". The solution for that is to give fgrep the -x
so that it has to (effectively) match the entire input.
procmail mailing list
procmail mailing list