procmail
[Top] [All Lists]

Re: INCLUDERC

2004-03-12 16:39:54
On Sat, 13 Mar 2004, 00:00 GMT+01 Dallman Ross wrote:

That's not bad.  Here's a way to approach this that doesn't fork a
shell.

You could temporarily change the logfile.  You won't see an error
message in your logs, but you will see the assignment statement.


  OLDLOG = $LOGFILE
  LOGFILE  # unset

  INCLUDERC = /path/to/includefile.rc

  LOGFILE = $OLDLOG

Hm, I see you have unset logging temporary. This would cause the
INCLUDERC assignment to only apply when the file to be included does
actually exist and is readable?

Moreover, while I read the exchange Robert had about test and understand
his reasons for setting the var, most installs of procmail under most
people's setups shouldn't require it.

It seems that such procmail binaries come with all versions of RedHat
Linux. That was the case on RHL 6.2 and their latest disribution, RHEL
3. And RedHat is used on a lot of server machines.

I can't remember the exact thing that was behaving oddly with Robert's
test invocation before he explicitly defined it; but I suspect, even
with that weirdness, that the test he has by default under his procmail
would be able to identify whether a certain file exists and is readable.

yes, only executing 'test' did work also, but it invoked an extra
shell layer. David clearified that 'test' may be treated as a
SHELLMETAS "character" *if* /bin/test was not present on the machine
*while compiling procmail*. The default location of RedHat's test
binary is /usr/bin/test and specifying it explicitly avoided the cost
of the extra layer.

rob.




_______________________________________________
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>