aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-13 13:06:51 +0000
committerGitHub <noreply@github.com>2016-11-13 13:06:51 +0000
commitd965059f8d5428d33bf3d23d674c5aafa99f8e49 (patch)
tree61da85cc205110f2987d26da42c24b9f3471ee7a /src
parent768dce24d41f51691d13328f21e52240257d4185 (diff)
parent4cfb22716f09aa901aaa046fffa5d8c202edf9c1 (diff)
downloadrspamd-d965059f8d5428d33bf3d23d674c5aafa99f8e49.tar.gz
rspamd-d965059f8d5428d33bf3d23d674c5aafa99f8e49.zip
Merge pull request #1123 from AlexeySa/patch-7
[Fix] No greylist rejected messages
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/greylist.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua
index c31e48927..35c30b806 100644
--- a/src/plugins/lua/greylist.lua
+++ b/src/plugins/lua/greylist.lua
@@ -275,10 +275,11 @@ local function greylist_set(task)
end
local action = task:get_metric_action('default')
- if do_greylisting_required then
- if do_greylisting_required ~= "1" then return end
+ if action == 'reject' then return end
+ if do_greylisting_required and do_greylisting_required ~= "1" then
+ return
else
- if action == 'no action' or action == 'reject' then return end
+ if action == 'no action' then return end
end
local body_key = data_key(task)
local meta_key = envelope_key(task)
@@ -322,7 +323,7 @@ local function greylist_set(task)
rspamd_logger.infox(task, 'got error while connecting to redis: %1', upstream:get_addr())
upstream:fail()
end
- elseif do_greylisting or do_greylisting_required then
+ elseif do_greylisting or (do_greylisting_required and do_greylisting_required == "1") then
local t = tostring(math.floor(rspamd_util.get_time()))
local end_time = rspamd_util.time_to_string(t + settings['timeout'])
rspamd_logger.infox(task, 'greylisted until "%s", new record', end_time)