procmail
[Top] [All Lists]

Re: Filter Order in Procmailrc

1997-09-19 06:07:56
On Fri, 19 Sep 1997 8:25:41 -0400, "Ed James 410-792-6000 x8733
ed(_dot_)james(_at_)jhuapl(_dot_)edu" 
<JAMESVE1(_at_)s1pvxe(_dot_)jhuapl(_dot_)edu> wrote:
Philip, you wrote on: Thu, 18 Sep 1997 17:02:00 -0500
If a assignment to the "HOST" variable occurs where the
assigned value doesn't equal the hostname of the machine on which
procmail is running, procmail will stop reading the procmailrc, and if
there are other procmailrcs specified on the command line, it will
start reading them.
Would you  please post an example to demonstrate this?

Would you like to know what it's useful for, or just what he means? 
The following isn't directly useful, but might perhaps work as an
explanation: 

 $ cat >rc1
 LOG="Now in rc1
 "
 HOST
 # This will never be printed
 LOG="Still in rc1
 "
 ^D
 $ cat >rc2
 LOG="Now in rc2
 "
 ^D
 $ procmail ./rc1 ./rc2 </dev/null
 Now in rc1
 Now in rc2
 $ 

See, it never prints "Still in rc1" because the HOST (or HOST="" which
is what it means) makes it drop out of rc1 there and then. (Try
running this with VERBOSE=yes -- you can add that to the command line
if you wish -- to see all the boring details. When LOGFILE is not set,
the log information will be sent to standard error.)

Hope this helps,

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>

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