procmail
[Top] [All Lists]

Re: Thanks - How to subvert global procmailrc

2004-11-19 01:53:03
On Thu, Nov 18, 2004 at 08:36:52PM -0600, David W. Tamkin wrote:
Dallman Ross wrote:
 | /usr/local/cyrus/bin/procmail-cyrus-delivery.sh $LOGNAME

I gather that at this point Dallman intended to type

    :0

which was missing.

Whoops.  Yeah, thanks.

The second problem there is that, if the SWITCHRC is nonexistent, 
unreadable, or not a plain file, procmail will log an error.  I brought 
that up in one of my responses, and Tuc said no, the error message would 
be a problem and it wasn't worth avoiding the test.

Okay.  I even mentioned the "unreadable" thing with the OP who was
testing with "test -e" -- suggesting that he use -r instead.

Btw, he could avoid the error by temporarily redirecting the
logfile if he wished.


 LOGFILE = /dev/null
 SWITCHRC = foo
 LOGFILE = what_it_was


Also, in testing this I just solved an old problem for procmailers
running test harnesses (a.k.a. "sandboxes") with logging to the screen.
The received wisdom is that if you set the logfile to a file,
you can't go back and have it again sent to the screen.
Even 

  LOGFILE = /dev/stderr
or
  LOGFILE = /dev/stdout

doesn't work to turn it back "on" to the screen once it's
been redirected away from there.  But I just found that this
does work!

  LOGFILE = /dev/tty

Which is pretty neat!

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail