procmail
[Top] [All Lists]

Re: Automatic Stopping Variable

1995-10-17 04:15:39
I find out that whenever I am testing a new recipe and procmail runs into 
a loop it will then start sending me mail messages on the average of 
about 5 per second. I then have to quickly run over to my .procmailrc and 
start disabling my individual "control" recipe files (I have everything 
compartmentalized to allow me to turn off any single recipe file or whole 
auto system). 

Yet I figure, in situations like this where every second is important, 
there must be a better way. How about creating a variable that I could 
put at the top of the .procmailrc file titled EMERGENCYSTOP or something 
of the sort. If it was equal to YES then procmail wouldn't run and 
anything else would let it run. Then, at the end of my .procmailrc BEFORE 
the INCLUDERC there would be a test for this variable and it would either 
stop everything or let it continue. 

Is this possible? Can anybody come up with a solution? Thanks,

This is quite easy already; put this at the top of your .procmailrc:

    :0
    * test -f .procmailrc.stop
    {   EXITCODE=75 
        HOST=_stop_now }

Then, when testing your procmailrc, you can simply do:

    touch .procmailrc.stop

to disable your procmailrc filtering.


    

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