aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-09 16:37:08 +0100
committerGitHub <noreply@github.com>2016-09-09 16:37:08 +0100
commitc029c744d276bc900b1a11132d118f66190b684d (patch)
tree123f9bc3c1521ca4024ee323ba1882fd2bb1a03b /src/plugins
parentd3d7c4e4155119ad26500b1a60e224528d910130 (diff)
parent7a41cf52a3efa23737f8b25a22b4469e7ad73064 (diff)
downloadrspamd-c029c744d276bc900b1a11132d118f66190b684d.tar.gz
rspamd-c029c744d276bc900b1a11132d118f66190b684d.zip
Merge pull request #938 from fatalbanana/rbl
[Feature] Descriptive options for RBL symbols
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/rbl.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 50a49adcd..69d84d771 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -67,24 +67,24 @@ local function rbl_cb (task)
for _,rbl in ipairs(rule.rbls) do
if rbl['returncodes'] == nil and rbl['symbol'] ~= nil then
- task:insert_result(rbl['symbol'], 1)
+ task:insert_result(rbl['symbol'], 1, to_resolve)
return
end
for _,result in pairs(results) do
local ipstr = result:to_string()
- local foundrc = false
+ local foundrc
for s,i in pairs(rbl['returncodes']) do
if type(i) == 'string' then
if string.find(ipstr, '^' .. i .. '$') then
- foundrc = true
- task:insert_result(s, 1)
+ foundrc = i
+ task:insert_result(s, 1, to_resolve .. ' : ' .. foundrc)
break
end
elseif type(i) == 'table' then
for _,v in pairs(i) do
if string.find(ipstr, '^' .. v .. '$') then
- foundrc = true
- task:insert_result(s, 1)
+ foundrc = v
+ task:insert_result(s, 1, to_resolve .. ' : ' .. foundrc)
break
end
end
@@ -92,7 +92,7 @@ local function rbl_cb (task)
end
if not foundrc then
if rbl['unknown'] and rbl['symbol'] then
- task:insert_result(rbl['symbol'], 1)
+ task:insert_result(rbl['symbol'], 1, to_resolve)
else
rspamd_logger.errx(task, 'RBL %1 returned unknown result: %2',
rbl['rbl'], ipstr)