procmail
[Top] [All Lists]

Re: Combining two instructions in procmail.rc

1999-07-20 01:48:44
On Mon, 19 Jul 1999 10:32:17 -0600, "Bert Hiddink"
<hiddink(_at_)sipromicro(_dot_)com> wrote:
I have not tried the above, but I supposed that Procmail would get 
confused, getting 2 different instructions for the the same message. 

It doesn't get confused, it is perfectly okay to have several recipes
which potentially overlap. All other things being equal, Procmail
processes the recipes from top to bottom and the first one to match
gets the cake.

Meanwhile, in order to combine things, use a c flag. See the FAQ for
details <http://www.iki.fi/era/procmail/mini-faq.html>. Briefly, you'd
do something like

    :0
    * common conditions you want to match on
    {
        :0c # and possibly some other flags, if warranted
        first action

        :0  # and possibly some other flags, if warranted
        second action
    }

You can add conditions to the recipes inside the braces too, of course.

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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