diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-20 14:43:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-10-20 14:43:03 +0100 |
commit | e95b2fa66a8d130c9f7260cf71178df5762f7746 (patch) | |
tree | 2cf41f6e6fffea3f376645c090acd1a620cd7639 /lualib/plugins | |
parent | 3541f5d1fcde67b9ece721cb0b9474ed8c692754 (diff) | |
download | rspamd-e95b2fa66a8d130c9f7260cf71178df5762f7746.tar.gz rspamd-e95b2fa66a8d130c9f7260cf71178df5762f7746.zip |
[Minor] Provide some upgrade path
Diffstat (limited to 'lualib/plugins')
-rw-r--r-- | lualib/plugins/rbl.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lualib/plugins/rbl.lua b/lualib/plugins/rbl.lua index 12c795e00..7105d73a4 100644 --- a/lualib/plugins/rbl.lua +++ b/lualib/plugins/rbl.lua @@ -158,6 +158,22 @@ local function convert_checks(rule) rule.connfilter = all_connfilter end + -- Now check if we have any check enabled at all + local check_found = false + for k,_ in pairs(check_types) do + if type(rule[k]) ~= 'nil' then + check_found = true + break + end + end + + if not check_found then + -- Enable implicit `from` check to allow upgrade + rspamd_logger.warnx(rspamd_config, 'rbl rule %s has no check enabled, enable default `from` check', + rule.symbol) + rule.from = true + end + return rule end |