aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-19 14:59:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-19 14:59:18 +0000
commit73b82b776b5717c4055999b162bf297ae8e66e6c (patch)
treed22d04a7e5075df31a03f5f415833694e2805c72 /src
parent6c83c787baa12140eba6993760a7baf858c4b4c8 (diff)
downloadrspamd-73b82b776b5717c4055999b162bf297ae8e66e6c.tar.gz
rspamd-73b82b776b5717c4055999b162bf297ae8e66e6c.zip
[Minor] Neural: Some default cfg improvements
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/neural.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index 2d1d33ec5..12dadd8d6 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -1208,8 +1208,8 @@ local function process_rules_settings()
if profile then
-- Use static user defined profile
-- Ensure that we have an array...
- lua_util.debugm(N, rspamd_config, "use static profile for %s (%s)",
- rule.prefix, selt.name)
+ lua_util.debugm(N, rspamd_config, "use static profile for %s (%s): %s",
+ rule.prefix, selt.name, profile)
if not profile[1] then profile = lua_util.keys(profile) end
selt.symbols = profile
else
@@ -1261,7 +1261,7 @@ local function process_rules_settings()
})
end
- for _,rule in pairs(settings.rules) do
+ for k,rule in pairs(settings.rules) do
if not rule.allowed_settings then
rule.allowed_settings = {}
elseif rule.allowed_settings == 'all' then
@@ -1273,7 +1273,7 @@ local function process_rules_settings()
rule.allowed_settings = lua_util.list_to_hash(rule.allowed_settings)
-- Check if we can work without settings
- if type(rule.default) ~= 'boolean' then
+ if k == 'default' or type(rule.default) ~= 'boolean' then
rule.default = true
end