aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-09 16:37:27 +0100
committerGitHub <noreply@github.com>2016-09-09 16:37:27 +0100
commit04abba6b321214191d9f3d1e87695d14405af196 (patch)
tree26e1974f7b6583504eea4f9eba7ba4411ea40c6b /src
parentc029c744d276bc900b1a11132d118f66190b684d (diff)
parente3a75b43e5d59de7bccc1795757f648c5598ff8a (diff)
downloadrspamd-04abba6b321214191d9f3d1e87695d14405af196.tar.gz
rspamd-04abba6b321214191d9f3d1e87695d14405af196.zip
Merge pull request #939 from fatalbanana/hfilter
[Minor] Mostly disable Hfilter for local networks as well
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/hfilter.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua
index 34a679641..c1d0e22b2 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