diff --git a/src/lib-sieve/cmd-keep.c b/src/lib-sieve/cmd-keep.c index 765ebad25105b7dd4ec1d3376316f95bbf6d84da..99838fb74b0c6401474e61e1e3f883b843bbd7b2 100644 --- a/src/lib-sieve/cmd-keep.c +++ b/src/lib-sieve/cmd-keep.c @@ -43,6 +43,19 @@ const struct sieve_opcode cmd_keep_opcode = { opc_keep_execute }; +/* Keep action */ + +static int act_keep_execute + (const struct sieve_action *action, const struct sieve_action_exec_env *aenv, + void *context); + +const struct sieve_action act_keep = { + "keep", + NULL, + act_keep_execute +}; + + /* * Generation */ @@ -67,7 +80,22 @@ static bool opc_keep_execute { printf(">> KEEP\n"); + sieve_result_add_action(renv->result, &act_keep, NULL); + return TRUE; } +/* + * Action + */ + +static int act_keep_execute +(const struct sieve_action *action ATTR_UNUSED, + const struct sieve_action_exec_env *aenv, void *context) +{ + return 0; +} + + + diff --git a/src/lib-sieve/cmd-redirect.c b/src/lib-sieve/cmd-redirect.c index 7b9da9eb5e2b8669a554d0c1c91cc15bc9617ff1..31de529ac410e35840e2db5ae5a549bc0d12c79c 100644 --- a/src/lib-sieve/cmd-redirect.c +++ b/src/lib-sieve/cmd-redirect.c @@ -134,6 +134,7 @@ static bool cmd_redirect_opcode_execute printf(">> REDIRECT \"%s\"\n", str_c(redirect)); + /* Add redirect action to the result */ pool = sieve_result_pool(renv->result); act = p_new(pool, struct act_redirect_context, 1); act->to_address = p_strdup(pool, str_c(redirect));