procmail
[Top] [All Lists]

Re: * ! ? $TEST -d "$some_directory" may not work

2004-03-27 16:45:24
So the subject is wrong: it did work, it just worked by using a shell.

Robert wrote,

Nevertheless, I have now returned to my original form

* $ ! ?"$TEST -d \"$av_REQUIRED_DIR\""

which does work as expected on all cases, expanding the variable names
on the procmail layer and not invoking an extra shell.

Wait a moment.

1. Are you saying that if

a. [ $TEST = test ] and
b. /bin/test did not exist when procmail was compiled,

then for

 * ? $TEST parameters

procmail spots "test" and invokes a shell, but for

 * $ ? "$TEST parameters"

where there are no shell metacharacters on the line, procmail will search $PATH for an executable named test? (I don't have access to a system without /bin/test, so I cannot try it out for myself.) Then you've uncovered quite a quirk.

3. What determines in the first place whether $TEST is a full path or just the word "test"?

However, I am keeping the form you suggested on commands where test
is not involved, like

* ? mimencode -u "$av_BASE64FILE" -o "$av_VIRUSFILE"

OK.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail