return fn
end
-local function apply_content_filter(filter, r)
+local function apply_content_filter(task, filter, r)
if filter == 'body' then
return {task:get_rawbody()}
elseif filter == 'full' then
local function rule_callback(result)
if result then
local res,symbol,score = parse_ret(result)
- if symbol then
+ if symbol and r['symbols_set'] then
if not r['symbols_set'][symbol] then
rspamd_logger.infox(task, 'symbol %s is not registered for map %s, ' ..
'replace it with just %s',
local data = {}
if r['filter'] then
- data = apply_content_filter(r['filter'], r)
+ data = apply_content_filter(task, r['filter'], r)
else
data = {task:get_content()}
end