aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-16 12:13:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-16 12:13:14 +0100
commitb45c0b5360ac0c77a49bdef30740da5902391416 (patch)
treeadd75a434e6a318c84f2365708f3faf986e54f46
parent456880ef0ab91d3cea8d83d1be9a670a8968ec67 (diff)
downloadrspamd-b45c0b5360ac0c77a49bdef30740da5902391416.tar.gz
rspamd-b45c0b5360ac0c77a49bdef30740da5902391416.zip
[Minor] Add sanity check
-rw-r--r--lualib/lua_cfg_transform.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index ac328f86f..af9ae6cc2 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -369,6 +369,8 @@ return function(cfg)
}
end
+ if not cfg.reputation.rules then cfg.reputation.rules = {} end
+
if not fun.any(function(_, v) return v.selector and v.selector.ip end,
cfg.reputation.rules) then
logger.infox(rspamd_config, 'attach ip reputation element to use it')