rspamd_logger.infox(task, '%s: "%s" is in whitelist', rule.log_prefix, tm)
else
all_whitelisted = false
- task:insert_result(symname, symscore, tm)
rspamd_logger.infox(task, '%s: result - %s: "%s - score: %s"',
rule.log_prefix, threat_info, tm, symscore)
+ task:insert_result(symname, symscore, tm)
end
end
task:get_mempool():set_variable('os_fingerprint', os_string, link_type,
uptime_min, distance)
- common.yield_result(task, rule, {
- os_string, link_type, 'distance:' .. distance }, 0.0)
+ if link_type and #link_type > 0 then
+ common.yield_result(task, rule, string.format('%s, link=%s, distance: %s',
+ os_string, link_type, distance), 0.0)
+ else
+ common.yield_result(task, rule, string.format('%s, distance: %s',
+ os_string, distance), 0.0)
+ end
return data
end
end
end
+ if err then
+ rspamd_logger.errx(task, 'p0f received an error: %s', err)
+ return
+ end
+
data = parse_p0f_response(data)
if rule.redis_params and data then
local key = rule.prefix .. ip:to_string()
local ret = lua_redis.redis_make_request(task,
- rule.redis_params,
- key,
- true,
- redis_set_cb,
- 'SETEX',
- { key, tostring(rule.expire), data }
+ rule.redis_params,
+ key,
+ true,
+ redis_set_cb,
+ 'SETEX',
+ { key, tostring(rule.expire), data }
)
if not ret then