@@ -198,6 +198,8 @@ local function dmarc_callback(task) | |||
local function maybe_force_action(disposition) | |||
local force_action = dmarc_actions[disposition] | |||
if force_action then | |||
-- Don't do anything if pre-result has been already set | |||
if task:has_pre_result() then return end | |||
task:set_pre_result(force_action, 'Action set by DMARC') | |||
end | |||
end |
@@ -249,6 +249,9 @@ local function greylist_set(task) | |||
local action = task:get_metric_action('default') | |||
local ip = task:get_ip() | |||
-- Don't do anything if pre-result has been already set | |||
if task:has_pre_result() then return end | |||
if settings.greylist_min_score then | |||
local score = task:get_metric_score('default')[1] | |||
if score < settings.greylist_min_score then |
@@ -402,6 +402,9 @@ local function ratelimit_cb(task) | |||
end | |||
end | |||
-- Don't do anything if pre-result has been already set | |||
if task:has_pre_result() then return end | |||
if nprefixes > 0 then | |||
-- Save prefixes to the cache to allow update | |||
task:cache_set('ratelimit_prefixes', prefixes) | |||
@@ -570,7 +573,7 @@ if opts then | |||
local s = { | |||
type = 'prefilter,nostat', | |||
name = 'RATELIMIT_CHECK', | |||
priority = 4, | |||
priority = 7, | |||
callback = ratelimit_cb, | |||
flags = 'empty', | |||
} |