Robert Allerstorfer followed up,
The system in question (Red Hat's GNU/Linux 6.2)
actually has test residing in /usr/bin ...
and that directory *is* in the path, both in the root's and in the
user's one.
The decision of whether to treat the word "test" as a shellmeta is made
at compile time, not at run time. The question might be whether a test
executable is present in procmail's start-up PATH, or whether it's in
the environmental PATH during compilation, or whether it's in /bin; I
really don't know where the build process looks when it makes that choice.
Anyway, assigning
TEST = /usr/bin/test
in procmailrc and changing my code from
* $ ! ?"test -d $VIRUSDIR/EXE"
to
* $ ! ?"$TEST -d $VIRUSDIR/EXE"
did it:
procmail: Executing "/usr/bin/test,-d,/home/roal/mail/TRASH/viruses/EXE"
Well, yes. The same thing would happen if you wrote out "/usr/bin/test"
instead of using a variable. "/usr/bin/test" is different from "test"
just as "contest" and "attest" and "testify" are.
By the way, you don't need the "$" modifier on "?" conditions unless you
want to simulate an eval and have two evaluation passes on the line.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail