From 9a92616d69c5fc4d9e839866ea04bb0236887127 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 1 Aug 2016 09:01:10 +0100 Subject: [PATCH] [Minor] Disable greylisting for authenticated users --- src/plugins/lua/greylist.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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") -- 2.39.5