summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-01-28 17:05:24 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-01-28 17:05:24 +0200
commitd316aa718a9d78b941f98e5ab0e25cf136727eff (patch)
treef3d97063f1491b5e733008ff6f1e3af49b248bc5
parent951ec7bae4ff0336012c9a6dfc596a730032e3ba (diff)
downloadrspamd-d316aa718a9d78b941f98e5ab0e25cf136727eff.tar.gz
rspamd-d316aa718a9d78b941f98e5ab0e25cf136727eff.zip
[Minor] Fix warnings
- Also yield symbol when key in Redis was used
-rw-r--r--src/plugins/lua/dkim_signing.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/lua/dkim_signing.lua b/src/plugins/lua/dkim_signing.lua
index 5a6dcfdc0..345c91fcb 100644
--- a/src/plugins/lua/dkim_signing.lua
+++ b/src/plugins/lua/dkim_signing.lua
@@ -126,7 +126,6 @@ local function dkim_signing_cb(task)
if settings.use_redis then
p.key = nil
local rk = string.format('%s.%s', p.selector, p.domain)
- local ret, upstream
local function redis_key_cb(err, data)
if err or type(data) ~= 'string' then
@@ -134,11 +133,13 @@ local function dkim_signing_cb(task)
rk, err)
else
p.rawkey = data
- rspamd_plugins.dkim.sign(task, p)
+ if rspamd_plugins.dkim.sign(task, p) then
+ task:insert_result(settings.symbol, 1.0)
+ end
end
end
- ret,_,upstream = rspamd_redis_make_request(task,
+ local ret = rspamd_redis_make_request(task,
redis_params, -- connect params
rk, -- hash key
true, -- is write