浏览代码

[Minor] Provide some upgrade path

tags/2.7
Vsevolod Stakhov 3 年前
父节点
当前提交
e95b2fa66a
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16
    0
      lualib/plugins/rbl.lua

+ 16
- 0
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


正在加载...
取消
保存