Deprecated lua function replaced, better tag handling when spam

master
andryyy 2017-03-16 13:42:56 +01:00
parent 72a58b8c28
commit 509a804acd
1 changed files with 45 additions and 40 deletions

View File

@ -23,7 +23,10 @@ auth_domain_map = rspamd_config:add_map({
description = 'Map of domains we are authoritative for' description = 'Map of domains we are authoritative for'
}) })
rspamd_config:register_post_filter(function(task) rspamd_config:register_symbol({
name = 'TAG_MOO',
type = 'postfilter',
callback = function(task)
local util = require("rspamd_util") local util = require("rspamd_util")
local rspamd_logger = require "rspamd_logger" local rspamd_logger = require "rspamd_logger"
@ -41,7 +44,7 @@ rspamd_config:register_post_filter(function(task)
if action ~= 'no action' and action ~= 'greylist' then if action ~= 'no action' and action ~= 'greylist' then
rspamd_logger.infox("skipping tag handler for action: %s", action) rspamd_logger.infox("skipping tag handler for action: %s", action)
return false task:set_metric_action('default', action)
end end
if authdomain then if authdomain then
@ -67,7 +70,9 @@ rspamd_config:register_post_filter(function(task)
end end
return false return false
end end
end) end,
priority = 10
})
rspamd_config.MRAPTOR = { rspamd_config.MRAPTOR = {
callback = function(task) callback = function(task)