procmail
[Top] [All Lists]

Re: flow control in /etc/procmailrc

1998-02-12 20:38:39
On Thu, 12 Feb 1998, Sherwood Botsford wrote:

I'd like to insert another recipe above the shout recipe to
watch for the MIME headers, and if it sees them, just skip
the rest of hte processing.  Not clear to me how to do that.

Procmail allows for recipies to be applied depending on the sucess of the
match of the previous recipe. From procmailrc man page:

     A    This recipe will not be executed unless the  conditions
          on  the  last  preceding  recipe (on the current block-
          nesting level) without the `A' or `a' flag  matched  as
          well.   This allows you to chain actions that depend on
          a common condition.

     a    Has the same meaning as the `A' flag,  with  the  addi-
          tional  condition that the immediately preceding recipe
          must  have  been  successfully  completed  before  this
          recipe is executed.

With this you could write your mime detecting recipe and invert the
sucessfullness and stick this in the flags of your shout recipe. Therefore
the shout recipe would only be applied if mime wasn't detected.

Good Luck,
Eric

Eric Oosting   (eco(_at_)nersp(_dot_)nerdc(_dot_)ufl(_dot_)edu)   UNIX group 
SysAdmin Asst.
             University of Florida, Gainesville, Fl.
                North East Regional Data Center

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