procmail
[Top] [All Lists]

Re: Request for syntax assistance

2003-12-14 13:07:17
At 12:31 2003-12-14 -0600, David W. Tamkin wrote:
When Sean advised Nick,

Please just remember the conditions under which I advised him - he wasn't using what I originally advised him.

OK then:

 :0
 * conditions
 {
   DROPPRIVS=yes
   SWITCHRC
 }

will prevent that. But doesn't unsetting SWITCHRC (or setting it to nothing, or setting it to /dev/null) inside /etc/procmailrc automatically make procmail drop privileges? If it doesn't, it ought to.

It should. Someone interested in fudging with their configuration is welcome to experiment. Having gotten up for 4 hours at around 0330 this morning to respond to a pager call for the ISP I do work for, I can't say I have it in me to do someone else's legwork when what they need to do should be well defined.


BTW, while we're on the topic of SWITCHRC, here's how you'd deal with bailing from procmail if SWITCHRC fails (rather than just continuing within the rcfile, which is procmail's error mode):

:0
* condition
{
        # DROPPRIVS=YES depending on your intent
        SWITCHRC=file_that_may_not_exist

        EXITCODE=some_value
        HOST
}

Which would cause procmail to BAIL in the event that the switched RCFILE was unavailable. Remember, SWITCHRC isn't like INCLUDERC - invocation isn't expected to return to this point in our rcfile if it's successful.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


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