procmail
[Top] [All Lists]

Re: need help with variable testing

1998-04-23 08:42:04
|Thu 98-04-23 Timothy J Luoma 
<luomat+Lists/procmail(_at_)luomat(_dot_)peak(_dot_)org> list.procmail
| I need a more complex set of rules for determining if a message is sent to  
| me (ie not a list) than I can get in any one recipe or even one set.
| 
| test for this, if found set TOME=yes
| test for that, if found set TOME=yes
| test for another, if found set TOME=no
| 
| and then after all that is done, pick INCLUDERCs based on whether TOME is  
| set to 'yes' or 'no'


| :0
| * $ $TOME=yes
| { INCLUDERC=To_me.rc }
| 
| :0E
| * $ $TOME=no
| { INCLUDERC=Not_to_me.rc }

I'm sure you meant:

RC_TOME = $PMSRC/pm-mytome.rc
RC_XXX  = ... some other subroutine...
...
INCLUDERC = $RC_TOME        # Let it determine if this message is to me

    # This is inside RC_TOME.
    # there are several tests...

    :0
    * conditions
    { TOME = "no" }

    :0
    * conditions_maybe
    { TOME = "yes" }

    ...


After the RC_TOME has run, TOME has been set one way or another

    :0
    * TOME ?? yes
    {
        INCLUDERC = ...
    }
    :0 E            # Else statement
    {
        INCLUDERC = ...
    }

jari

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