From: Andrew Lewis Date: Thu, 8 Sep 2016 16:50:42 +0000 (+0200) Subject: [Fix] Don't force action in replies module for authenticated users/local networks X-Git-Tag: 1.4.0~457^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F937%2Fhead;p=thirdparty%2Frspamd.git [Fix] Don't force action in replies module for authenticated users/local networks --- diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index 9916dc3cf6..4a3c5646f3 100644 --- a/src/plugins/lua/replies.lua +++ b/src/plugins/lua/replies.lua @@ -51,7 +51,11 @@ local function replies_check(task) -- Hash was found task:insert_result(settings['symbol'], 0.0) if settings['action'] ~= nil then - task:set_pre_result(settings['action'], settings['message']) + if task:get_user() or (ip_addr and ip_addr:is_local()) then + rspamd_logger.infox(task, "not forcing action for local network or authorized user"); + else + task:set_pre_result(settings['action'], settings['message']) + end end end end