diff options
author | Andrew Lewis <nerf@judo.za.org> | 2023-11-09 13:30:29 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2023-11-09 13:30:29 +0200 |
commit | 73ade9ea2a6a8cd9c05d94e522e1d0d4b95a9f8e (patch) | |
tree | e74e2959e2b24e8b49b3436be8561793f9b77d39 /src | |
parent | 9c7a000e95753246d36b53ba723a603e52df643e (diff) | |
download | rspamd-73ade9ea2a6a8cd9c05d94e522e1d0d4b95a9f8e.tar.gz rspamd-73ade9ea2a6a8cd9c05d94e522e1d0d4b95a9f8e.zip |
[Fix] known_senders: fix config handling
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/known_senders.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/known_senders.lua b/src/plugins/lua/known_senders.lua index 588a180fc..d26a1df3b 100644 --- a/src/plugins/lua/known_senders.lua +++ b/src/plugins/lua/known_senders.lua @@ -57,6 +57,7 @@ local settings = { local settings_schema = lua_redis.enrich_schema({ domains = lua_maps.map_schema, + enabled = ts.boolean:is_optional(), max_senders = (ts.integer + ts.string / tonumber):is_optional(), max_ttl = (ts.integer + ts.string / tonumber):is_optional(), use_bloom = ts.boolean:is_optional(), @@ -199,7 +200,7 @@ end local opts = rspamd_config:get_all_opt('known_senders') if opts then settings = lua_util.override_defaults(settings, opts) - local res, err = settings_schema:transform(opts) + local res, err = settings_schema:transform(settings) if not res then rspamd_logger.errx(rspamd_config, 'cannot parse known_senders options: %1', err) else @@ -241,4 +242,4 @@ if opts then else lua_util.disable_module(N, "redis") end -end
\ No newline at end of file +end |