aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-11-25 12:48:19 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-11-25 21:20:28 +0200
commitc22f1ab8bb3cf373d515ae79888a6f5de87eca7b (patch)
treeacc0e5bea8c3772d175d83a6b54399ddf75f7bfa /src/plugins
parent1370bc0b24ab10c43b1a15877f70ae7488d851c2 (diff)
downloadrspamd-c22f1ab8bb3cf373d515ae79888a6f5de87eca7b.tar.gz
rspamd-c22f1ab8bb3cf373d515ae79888a6f5de87eca7b.zip
[Minor] Some debug logging for RBL module
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/rbl.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 74eb5e64b..6199f21b1 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -65,7 +65,12 @@ local function rbl_cb (task)
if err and (err ~= 'requested record is not found' and err ~= 'no records with this name') then
rspamd_logger.errx(task, 'error looking up %s: %s', to_resolve, err)
end
- if not results then return end
+ if not results then
+ rspamd_logger.debugx(task, 'DNS RESPONSE: label=%1 results=%2 error=%3 rbl=%4', to_resolve, false, err, rule['rbls'][1]['symbol'])
+ return
+ else
+ rspamd_logger.debugx(task, 'DNS RESPONSE: label=%1 results=%2 error=%3 rbl=%4', to_resolve, true, err, rule['rbls'][1]['symbol'])
+ end
for _,rbl in ipairs(rule.rbls) do
if rbl['returncodes'] == nil and rbl['symbol'] ~= nil then
@@ -75,6 +80,7 @@ local function rbl_cb (task)
for _,result in pairs(results) do
local ipstr = result:to_string()
local foundrc
+ rspamd_logger.debugx(task, '%s DNS result %s', to_resolve, ipstr)
for s,i in pairs(rbl['returncodes']) do
if type(i) == 'string' then
if string.find(ipstr, '^' .. i .. '$') then
@@ -110,6 +116,7 @@ local function rbl_cb (task)
local params = {} -- indexed by rbl name
local function gen_rbl_rule(to_resolve, rbl)
+ rspamd_logger.debugx(task, 'DNS REQUEST: label=%1 rbl=%2', to_resolve, rbl['symbol'])
if not params[to_resolve] then
local nrule = {
to_resolve = to_resolve,