symbol_bad_mx = 'MX_INVALID',
symbol_no_mx = 'MX_MISSING',
symbol_good_mx = 'MX_GOOD',
+ symbol_white_mx = 'MX_WHITE',
expire = 86400, -- 1 day by default
expire_novalid = 7200, -- 2 hours by default for no valid mxes
greylist_invalid = true, -- Greylist first message with invalid MX (require greylist plugin)
if exclude_domains then
if exclude_domains:get_key(mx_domain) then
rspamd_logger.infox(task, 'skip mx check for %s, excluded', mx_domain)
-
+ task:insert_result(settings.symbol_white_mx, 1.0, mx_domain)
return
end
end
type = 'virtual',
parent = id
})
+ rspamd_config:register_symbol({
+ name = settings.symbol_white_mx,
+ type = 'virtual',
+ parent = id
+ })
rspamd_config:set_metric_symbol({
name = settings.symbol_bad_mx,
one_shot = true,
one_param = true,
})
+ rspamd_config:set_metric_symbol({
+ name = settings.symbol_white_mx,
+ score = -0.00,
+ description = 'Domain has whitelist MX',
+ group = 'MX',
+ one_shot = true,
+ one_param = true,
+ })
rspamd_config:set_metric_symbol({
name = settings.symbol_no_mx,
score = 3.5,
url = settings.exclude_domains,
}
end
-end
\ No newline at end of file
+end