diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/bimi.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/history_redis.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/reputation.lua | 11 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/lua/bimi.lua b/src/plugins/lua/bimi.lua index 5dbb83623..914484543 100644 --- a/src/plugins/lua/bimi.lua +++ b/src/plugins/lua/bimi.lua @@ -34,7 +34,7 @@ local settings = { } local redis_params -local settings_schema = lua_redis.generate_schema({ +local settings_schema = lua_redis.enrich_schema({ helper_url = ts.string, helper_timeout = ts.number + ts.string / lua_util.parse_time_interval, helper_sync = ts.boolean, diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua index 9cbe7caf7..d0aa5aec7 100644 --- a/src/plugins/lua/history_redis.lua +++ b/src/plugins/lua/history_redis.lua @@ -65,7 +65,7 @@ local settings = { subject_privacy_length = 16, -- cut the length of the hash } -local settings_schema = lua_redis.generate_schema({ +local settings_schema = lua_redis.enrich_schema({ key_prefix = ts.string, expire = (ts.number + ts.string / lua_util.parse_time_interval):is_optional(), nrows = ts.number, diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua index fc7001eb1..a3af26c91 100644 --- a/src/plugins/lua/reputation.lua +++ b/src/plugins/lua/reputation.lua @@ -1089,14 +1089,14 @@ end --]] local backends = { redis = { - schema = lua_redis.generate_schema({ - prefix = ts.string, - expiry = ts.number + ts.string / lua_util.parse_time_interval, + schema = lua_redis.enrich_schema({ + prefix = ts.string:is_optional(), + expiry = (ts.number + ts.string / lua_util.parse_time_interval):is_optional(), buckets = ts.array_of(ts.shape { time = ts.number + ts.string / lua_util.parse_time_interval, name = ts.string, mult = ts.number + ts.string / tonumber - }), + }) :is_optional(), }), config = { expiry = default_expiry, @@ -1263,7 +1263,7 @@ local function parse_rule(name, tbl) rspamd_logger.errx(rspamd_config, "cannot parse whitelist map config for %s: (%s)", sel_type, rule.config.whitelist) - return + return false end end @@ -1362,6 +1362,7 @@ local function parse_rule(name, tbl) } end + return true end redis_params = lua_redis.parse_redis_server('reputation') |