From 437727abc962967796b726814dcdf9d3c713a475 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 12 Jul 2016 17:22:31 +0100 Subject: [Fix] Use new postfilters and prefilters API in the plugins --- src/plugins/lua/ip_score.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/plugins/lua/ip_score.lua') diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua index 1541038fe..f3f4800b2 100644 --- a/src/plugins/lua/ip_score.lua +++ b/src/plugins/lua/ip_score.lua @@ -365,11 +365,19 @@ configure_ip_score_module() if redis_params then -- Register ip_score module if options['asn_provider'] then - rspamd_config:register_pre_filter(asn_check) + rspamd_config:register_symbol({ + name = 'ASN_CHECK', + type = 'prefilter', + callback = asn_check, + }) end + rspamd_config:register_symbol({ + name = 'IPSCORE_SAVE', + type = 'postfilter', + callback = ip_score_set, + }) rspamd_config:register_symbol({ name = options['symbol'], callback = ip_score_check }) - rspamd_config:register_post_filter(ip_score_set) end -- cgit v1.2.3