From: Andrew Lewis Date: Fri, 9 Sep 2016 12:23:57 +0000 (+0200) Subject: [Minor] Mostly disable Hfilter for local networks as well X-Git-Tag: 1.4.0~447^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F939%2Fhead;p=thirdparty%2Frspamd.git [Minor] Mostly disable Hfilter for local networks as well --- diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index 34a6796415..c1d0e22b2a 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -294,14 +294,14 @@ local function hfilter(task) end end - --No more checks for auth user - if task:get_user() ~= nil then + --No more checks for auth user or local network + local rip = task:get_from_ip() + if task:get_user() or (rip and rip:is_local()) then return false end --local message = task:get_message() local ip = false - local rip = task:get_from_ip() if rip and rip:is_valid() then ip = rip:to_string() end