Skip to content

Commit

Permalink
lda-sieve plugin: Do not execute the sieve_discard script when an err…
Browse files Browse the repository at this point in the history
…or occurs.
  • Loading branch information
stephanbosch committed Apr 10, 2018
1 parent f5cef47 commit 8f78497
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/lda-sieve/lda-sieve-plugin.c
Expand Up @@ -424,6 +424,8 @@ lda_sieve_execute_script(struct lda_sieve_run_context *srctx,
bool debug = srctx->mdctx->dest_user->mail_debug;
bool user_script, more;

*error_r = SIEVE_ERROR_NONE;

user_script = ( script == srctx->user_script );

if ( user_script ) {
Expand Down Expand Up @@ -569,6 +571,8 @@ static int lda_sieve_execute_scripts
/* End of normal script sequence */
break;
}
} else if ( error != SIEVE_ERROR_NONE ) {
break;
} else if ( sieve_multiscript_will_discard(mscript) &&
srctx->discard_script != NULL ) {
/* Mail is set to be discarded, but we have a discard script. */
Expand Down

0 comments on commit 8f78497

Please sign in to comment.