procmail
[Top] [All Lists]

Re: novice question

1997-08-13 11:29:00
On Wed, 13 Aug 1997 13:45:55 -0400 (EDT), Niketan Pandit
<darshika(_at_)omicron(_dot_)pair(_dot_)com> wrote:
I would like to use INCLUDERC=rc.abcxyz with
five different recipies if let us say 'abcxyz'
was present in head,
and use INCLUDERC=rc.thistext with another set
of recipies if 'thistext' was present in body
- and so on.

How are the five different recipes related? Something like this: 

    :0B
    * abcxyz
    { INCLUDERC=rc.abcxyz }

    :0B
    * thistext
    { INCLUDERC=rc.thistext }

Add an E after the second B if you want it only if the first didn't
match.

Here's an interesting generalization which will read either of the two
rc files, but only one of them, that is, the one that matches first
(Procmail scans the body top to bottom, left to right): 

    :0B
    * \/(abcxyz|thistext)
    { INCLUDERC=$MATCH }

Hope this helps,

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

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