aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-11 15:43:00 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-11 15:43:00 +0000
commit9501c2fe4f643f55a55a8d2c33b18203213b46f3 (patch)
treef358e64623b30d89b1edc3d3f40ccef3979753da /src
parent4920885f286546ad2fbe225098a3aedeeaddedc1 (diff)
downloadrspamd-9501c2fe4f643f55a55a8d2c33b18203213b46f3.tar.gz
rspamd-9501c2fe4f643f55a55a8d2c33b18203213b46f3.zip
[Fix] Fix priorities in rspamd_update, disable rules execution
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/rspamd_update.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/lua/rspamd_update.lua b/src/plugins/lua/rspamd_update.lua
index 4eadc027a..51cb5db02 100644
--- a/src/plugins/lua/rspamd_update.lua
+++ b/src/plugins/lua/rspamd_update.lua
@@ -29,6 +29,8 @@ local lua_util = require "lua_util"
local N = "rspamd_update"
local rspamd_version = rspamd_version
local maps = {}
+local allow_rules = false -- Deny for now
+local global_priority = 1 -- Default for local rules
local function process_symbols(obj, priority)
fun.each(function(sym, score)
@@ -102,12 +104,12 @@ local function gen_callback()
if check_version(obj) then
if obj['symbols'] then
- process_symbols(obj['symbols'])
+ process_symbols(obj['symbols'], global_priority)
end
if obj['actions'] then
- process_actions(obj['actions'])
+ process_actions(obj['actions'], global_priority)
end
- if obj['rules'] then
+ if allow_rules and obj['rules'] then
process_rules(obj['rules'])
end