aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-08-24 11:05:10 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-08-24 11:05:10 +0200
commit86dcbbd9e3e3199b62ae55c5b36d851c6af5af66 (patch)
tree7d3ac82ef339e8eafc5d8dae20b77b812bf9642c /src/plugins
parentab58c4cf42362df91c570afc2fec47917616c36b (diff)
downloadrspamd-86dcbbd9e3e3199b62ae55c5b36d851c6af5af66.tar.gz
rspamd-86dcbbd9e3e3199b62ae55c5b36d851c6af5af66.zip
[Minor] Skip greylisting for local networks as well
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/greylist.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua
index 8f584b76c..05afaeab6 100644
--- a/src/plugins/lua/greylist.lua
+++ b/src/plugins/lua/greylist.lua
@@ -126,7 +126,9 @@ local function check_time(task, tm, type)
end
local function greylist_check(task)
- if task:get_user() ~= nil then
+ local ip_addr = task:get_ip()
+
+ if task:get_user() or (ip_addr and ip_addr:is_local()) then
return
end
@@ -208,7 +210,9 @@ local function greylist_check(task)
end
local function greylist_set(task)
- if task:get_user() ~= nil then
+ local ip_addr = task:get_ip()
+
+ if task:get_user() or (ip_addr and ip_addr:is_local()) then
return
end