procmail
[Top] [All Lists]

Re: INCLUDERC

2004-03-12 18:06:19
On Sat, Mar 13, 2004 at 12:31:59AM +0100, Robert Allerstorfer wrote:

On Sat, 13 Mar 2004, 00:00 GMT+01 Dallman Ross wrote:

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?

No, it simply occludes the error message the questioner objects
to seeing in his logs.  A missing or nonexistent file called
as an INCLUDERC simply doesn't get run, of course; but it
doesn't cause problems with what follows in the rc (as long
as what follows is not dependent on what was expected to be
found in the missing INCLUDERC).

I often rename INCLUDERCs temporarily when I'm testing things
and don't want to change my rc itself, but want to skip the
INCLUDERCs for the time being.


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.

Question: what shell do you run your .procmailrc under, and does
that shell have a built-in test routine?

-- 
dman

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