]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: auth_request_finished event - policy_result=delayed didn't work
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Apr 2020 14:17:46 +0000 (17:17 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Tue, 12 May 2020 09:55:45 +0000 (09:55 +0000)
It was returned as "ok" instead of "delayed".

src/auth/auth-request.c

index 3571e4ccf39e2e85e4a77803755a1ba985c4ae9f..9acdc93301406c00a271837cb744c33d2270dc01 100644 (file)
@@ -1266,6 +1266,9 @@ void auth_request_policy_check_callback(int result, void *context)
        struct auth_policy_check_ctx *ctx = context;
 
        ctx->request->policy_processed = TRUE;
+       /* It's possible that multiple policy lookups return a penalty.
+          Sum them all up to the event. */
+       ctx->request->policy_penalty += result < 0 ? 0 : result;
 
        if (ctx->request->set->policy_log_only && result != 0) {
                auth_request_policy_penalty_finish(context);