Skip to content

Commit

Permalink
[Fix] known_senders: fix config handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fatalbanana committed Nov 9, 2023
1 parent 9c7a000 commit 73ade9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/lua/known_senders.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -241,4 +242,4 @@ if opts then
else
lua_util.disable_module(N, "redis")
end
end
end

0 comments on commit 73ade9e

Please sign in to comment.