procmail
[Top] [All Lists]

Re: stopping execution of main script

2002-08-25 23:37:09
Curtis asked,

|  I'd like to set up some rules that stop the processing of
| /etc/procmailrc and then execute the user's .procmailrc.
| What would a recipe look like to accomplish that.

If you're using a recent enough version of procmail to grok the SWITCHRC
special variable, unsetting SWITCHRC (or setting it to a null string, or
setting it to /dev/null) will make procmail break out of /etc/procmailrc and
go to the user's ~/.procmailrc.  (Doing that will also make procmail break out
of an INCLUDERC and go back to the rcfile from which it had gone to the
INCLUDERC.)

So to skip the rest of /etc/procmailrc,

 :0
 * conditions
 { SWITCHRC } # naming a variable with no equal sign unsets it

If you're using an older version of procmail, you pretty much have to do it
this way:

 :0
 * ! condition
 {
  entire rest of /etc/procmailrc one level deeper in braces
 }

or if the conditions are not that easy to invert properly,

 :0
 * conditions
 { } # the procmail no-op
 :0E
 {
  entire rest of /etc/procmailrc
 }

| Curtsi

"Curtsi"?





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