summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-08-01 09:01:10 +0100
committerAndrew Lewis <nerf@judo.za.org>2016-08-01 09:01:10 +0100
commit9a92616d69c5fc4d9e839866ea04bb0236887127 (patch)
tree36e0f5981b51e6691b069d1dd8385d9ef7eacfde /src/plugins/lua
parent4d3658246c855f6a7aa7679911ef3fb94cb05f66 (diff)
downloadrspamd-9a92616d69c5fc4d9e839866ea04bb0236887127.tar.gz
rspamd-9a92616d69c5fc4d9e839866ea04bb0236887127.zip
[Minor] Disable greylisting for authenticated users
Diffstat (limited to 'src/plugins/lua')
-rw-r--r--src/plugins/lua/greylist.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua
index a3905ddec..8f584b76c 100644
--- a/src/plugins/lua/greylist.lua
+++ b/src/plugins/lua/greylist.lua
@@ -126,6 +126,10 @@ local function check_time(task, tm, type)
end
local function greylist_check(task)
+ if task:get_user() ~= nil then
+ return
+ end
+
local body_key = data_key(task)
local meta_key = envelope_key(task)
local hash_key = body_key .. meta_key
@@ -204,6 +208,10 @@ local function greylist_check(task)
end
local function greylist_set(task)
+ if task:get_user() ~= nil then
+ return
+ end
+
local is_whitelisted = task:get_mempool():get_variable("grey_whitelisted")
local do_greylisting = task:get_mempool():get_variable("grey_greylisted")