aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/ip_score.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-12 17:22:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-12 17:22:31 +0100
commit437727abc962967796b726814dcdf9d3c713a475 (patch)
tree6e335d94df0ec1de18ea555f86b0711da4ad50ab /src/plugins/lua/ip_score.lua
parenteea4d934355c80febfab60f06d19824c8f921757 (diff)
downloadrspamd-437727abc962967796b726814dcdf9d3c713a475.tar.gz
rspamd-437727abc962967796b726814dcdf9d3c713a475.zip
[Fix] Use new postfilters and prefilters API in the plugins
Diffstat (limited to 'src/plugins/lua/ip_score.lua')
-rw-r--r--src/plugins/lua/ip_score.lua12
1 files changed, 10 insertions, 2 deletions
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