procmail
[Top] [All Lists]

Re: PATH - correction

2004-03-08 16:25:33
After assigning

TEST = test

procmail invoked the shell:

procmail: Executing "test -d /home/roal/mail/TRASH/viruses/EXE"

You hadn't recompiled procmail, so procmail was still behaving according to what autoconf saw at compilation time.

while changing the assignment to

TEST = test2

resulted in avoiding the shell call:

procmail: Executing "test2,-d,/home/roal/mail/TRASH/viruses/EXE"

Right. There's nothing special about test2; it's just another program as far as procmail is concerned.

When I executed 'which test' on the shell, it gave no result, while
'which test2' pointed to /bin/test2.

Perhaps because the shell recognized "test" as one of its own built-ins.

So I guess 'procmail' just does the same as 'which' would do and then
decides if it invokes the shell or not.

Er, no.  Two different reasons.

When procmail was compiled, autoconf did not see /bin/test in existence, so it hard-coded procmail to consider "test" a shellmeta. If you've created a /bin/test since then, it won't affect procmail's behavior. If you recompile procmail now that /bin/test exists, though, that will change it.

But, then would remain the question for me why 'which test' did not
return anything (that was just on RH Linux 6.2, but not on RH EL 3,
nor on BSD/OS 4.2).

That may be shell-specific rather than OS-specific. Is "which" itself a built-in in the shell you were using?



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

<Prev in Thread] Current Thread [Next in Thread>