]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix selective greylisting 1119/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 11 Nov 2016 06:27:18 +0000 (08:27 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 11 Nov 2016 15:17:50 +0000 (17:17 +0200)
src/plugins/lua/greylist.lua

index 9610f81d8e6c1d6f9c07d59b50e976f9304084be..c31e489273c923de6a8d6fe27efe644cef86894b 100644 (file)
@@ -275,8 +275,10 @@ local function greylist_set(task)
   end
 
   local action = task:get_metric_action('default')
-  if action == 'no action' or action == 'reject' then
-    if not do_greylisting_required or do_greylisting_required ~= "1" then return end
+  if do_greylisting_required then
+    if do_greylisting_required ~= "1" then return end
+  else
+    if action == 'no action' or action == 'reject' then return end
   end
   local body_key = data_key(task)
   local meta_key = envelope_key(task)