end
end
- local action = task:get_metric_action(options['metric'])
local ip = task:get_from_ip()
+ if task:get_user() or (ip and ip:is_local()) then
+ return
+ end
+ local action = task:get_metric_action(options['metric'])
if not ip or not ip:is_valid() then
return
end
end
local ip = task:get_from_ip()
+ if task:get_user() or (ip and ip:is_local()) then
+ rspamd_logger.infox(task, "skip IP Score for local networks and authorized users")
+ return
+ end
if ip:is_valid() then
-- Check IP whitelist
if whitelist then