aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-13 17:46:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-13 17:46:41 +0100
commit444c70ff896dcd07f1569e394b528cf1f61dec54 (patch)
treeb45fbc48b857e0ec5715a878145757db77b83f5c /src/plugins
parentb7b184bb90808c8db580488cb5169ae5f53d0fd7 (diff)
downloadrspamd-444c70ff896dcd07f1569e394b528cf1f61dec54.tar.gz
rspamd-444c70ff896dcd07f1569e394b528cf1f61dec54.zip
Remove legacy checks.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/ip_score.lua34
1 files changed, 15 insertions, 19 deletions
diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua
index 907c6773d..9b32a3408 100644
--- a/src/plugins/lua/ip_score.lua
+++ b/src/plugins/lua/ip_score.lua
@@ -186,24 +186,20 @@ local configure_ip_score_module = function()
end
-- Registration
-if rspamd_config:get_api_version() >= 9 then
- rspamd_config:register_module_option('ip_score', 'keystorage_host', 'string')
- rspamd_config:register_module_option('ip_score', 'keystorage_port', 'uint')
- rspamd_config:register_module_option('ip_score', 'metric', 'string')
- rspamd_config:register_module_option('ip_score', 'reject_score', 'int')
- rspamd_config:register_module_option('ip_score', 'add_header_score', 'int')
- rspamd_config:register_module_option('ip_score', 'no_action_score', 'int')
- rspamd_config:register_module_option('ip_score', 'symbol', 'string')
- rspamd_config:register_module_option('ip_score', 'normalize_score', 'uint')
- rspamd_config:register_module_option('ip_score', 'whitelist', 'map')
- rspamd_config:register_module_option('ip_score', 'expire', 'uint')
+rspamd_config:register_module_option('ip_score', 'keystorage_host', 'string')
+rspamd_config:register_module_option('ip_score', 'keystorage_port', 'uint')
+rspamd_config:register_module_option('ip_score', 'metric', 'string')
+rspamd_config:register_module_option('ip_score', 'reject_score', 'int')
+rspamd_config:register_module_option('ip_score', 'add_header_score', 'int')
+rspamd_config:register_module_option('ip_score', 'no_action_score', 'int')
+rspamd_config:register_module_option('ip_score', 'symbol', 'string')
+rspamd_config:register_module_option('ip_score', 'normalize_score', 'uint')
+rspamd_config:register_module_option('ip_score', 'whitelist', 'map')
+rspamd_config:register_module_option('ip_score', 'expire', 'uint')
- configure_ip_score_module()
- if upstreams and normalize_score > 0 then
- -- Register ip_score module
- rspamd_config:register_symbol(symbol, 1.0, ip_score_check)
- rspamd_config:register_post_filter(ip_score_set)
- end
-else
- rspamd_logger.err('cannot register module ip_score as it requires at least 9 version of lua API and rspamd >= 0.4.6')
+configure_ip_score_module()
+if upstreams and normalize_score > 0 then
+ -- Register ip_score module
+ rspamd_config:register_symbol(symbol, 1.0, ip_score_check)
+ rspamd_config:register_post_filter(ip_score_set)
end