Skip to content

Commit

Permalink
plugins: imap-filter-sieve: Ignore secondary scripts that failed to c…
Browse files Browse the repository at this point in the history
…ompile.

The IMAP FILTER=SIEVE capability does not execute more than a single script yet,
but once it does, it should not assert fail on secondary scripts that failed to
compile.
  • Loading branch information
stephanbosch authored and villesavolainen committed Nov 14, 2018
1 parent 8efeb6a commit 803055b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/plugins/imap-filter-sieve/imap-filter-sieve.c
Expand Up @@ -687,6 +687,15 @@ imap_sieve_filter_run_scripts(struct imap_filter_sieve_context *sctx,
struct sieve_script *script = scripts[i].script;
struct sieve_binary *sbin = scripts[i].binary;

if (sbin == NULL) {
if (debug) {
sieve_sys_debug(svinst,
"Skipping script from `%s'",
sieve_get_source(sbin));
}
continue;
}

cpflags = 0;
exflags = SIEVE_EXECUTE_FLAG_SKIP_RESPONSES;

Expand All @@ -701,9 +710,6 @@ imap_sieve_filter_run_scripts(struct imap_filter_sieve_context *sctx,
ehandler = ifsuser->master_ehandler;
}

/* Open */
i_assert(sbin != NULL);

/* Execute */
if (debug) {
sieve_sys_debug(svinst,
Expand Down

0 comments on commit 803055b

Please sign in to comment.