return cmd, args
end
- if task:get_user() or (ip and ip:is_local()) then
- rspamd_logger.infox(task, "skip IP Score for local networks and authorized users")
+ if task:get_user() and not check_authed then
+ rspamd_logger.infox(task, "skip IP Score for authorized users")
+ return
+ end
+ if ip and ip:is_local() and not check_local then
+ rspamd_logger.infox(task, "skip IP Score for local networks")
return
end
if ip:is_valid() then
-- Configuration options
local configure_ip_score_module = function()
- local opts = rspamd_config:get_all_opt('options')
+ local opts = rspamd_config:get_all_opt(N)
if type(opts) == 'table' then
if type(opts['check_authed']) == 'boolean' then
check_authed = opts['check_authed']
check_local = opts['check_local']
end
end
- opts = rspamd_config:get_all_opt('ip_score')
if not opts then return end
for k,v in pairs(opts) do
options[k] = v