]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Mostly disable Hfilter for local networks as well 939/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 9 Sep 2016 12:23:57 +0000 (14:23 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 9 Sep 2016 12:23:57 +0000 (14:23 +0200)
src/plugins/lua/hfilter.lua

index 34a679641581a42d9a1dceee8cd04758548f61d9..c1d0e22b2a7dfbea380562f9de387247c0b4226e 100644 (file)
@@ -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