summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/dmarc.lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-11-01 10:34:24 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-11-01 13:33:56 +0200
commit36d11e2e6fe28672904bf91f6e5eaeca87103705 (patch)
tree3097d3e3c4b8b29fd84612ae53ba96acc9058d3b /src/plugins/lua/dmarc.lua
parente2f599d7477081f0b58437b9218d72657883ab01 (diff)
downloadrspamd-36d11e2e6fe28672904bf91f6e5eaeca87103705.tar.gz
rspamd-36d11e2e6fe28672904bf91f6e5eaeca87103705.zip
[Minor] Get rid of some global variables
- Also fix some bugs along the way
Diffstat (limited to 'src/plugins/lua/dmarc.lua')
-rw-r--r--src/plugins/lua/dmarc.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index 3b380c38b..42f8d5ae3 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -96,7 +96,7 @@ local function dmarc_callback(task)
local dmarc_domain
local ip_addr = task:get_ip()
- if ((not check_user and task:get_user()) or
+ if ((not check_authed and task:get_user()) or
(not check_local and ip_addr and ip_addr:is_local())) then
rspamd_logger.infox(task, "skip DMARC checks for local networks and authorized users");
return
@@ -145,6 +145,7 @@ local function dmarc_callback(task)
return maybe_force_action('na')
end
+ local pct
local reason = {}
local strict_spf = false
local strict_dkim = false
@@ -221,7 +222,7 @@ local function dmarc_callback(task)
end
end
- local pct = elts['pct']
+ pct = elts['pct']
if pct then
pct = tonumber(pct)
end