diff --git a/src/lib-sieve/sieve.c b/src/lib-sieve/sieve.c index 9328ab15ae0973c79304e0d0cf829cca6b611ed0..93e8bfb703dd63a53bbf6242511bd4340785053a 100644 --- a/src/lib-sieve/sieve.c +++ b/src/lib-sieve/sieve.c @@ -453,7 +453,6 @@ struct sieve_multiscript { int status; bool active; - bool ended; bool keep; struct ostream *teststream; @@ -508,8 +507,6 @@ static void sieve_multiscript_test } else { if ( keep != NULL ) *keep = TRUE; } - - mscript->active = ( mscript->active && *keep ); sieve_result_mark_executed(mscript->result); } @@ -528,8 +525,6 @@ static void sieve_multiscript_execute else if ( keep != NULL ) *keep = TRUE; } - - mscript->active = ( mscript->active && *keep ); } bool sieve_multiscript_run @@ -553,7 +548,8 @@ bool sieve_multiscript_run else sieve_multiscript_execute(mscript, ehandler, &mscript->keep); - if ( final ) mscript->active = FALSE; + mscript->active = + ( mscript->active && mscript->keep && !final && mscript->status > 0 ); } if ( mscript->status <= 0 )