diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-08-16 12:45:05 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-08-16 12:45:05 +0100 |
commit | 973beec4a62b941aa9d225eb48e095c41e484de3 (patch) | |
tree | 6f52e579e84e422354cbeb3167e234e2be7fa7a7 /lualib | |
parent | 73ece1cec8f24bc2f2cd0eac1082ee0956b2ebc6 (diff) | |
download | rspamd-973beec4a62b941aa9d225eb48e095c41e484de3.tar.gz rspamd-973beec4a62b941aa9d225eb48e095c41e484de3.zip |
[Minor] Restore back one more legacy conversion
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_cfg_transform.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index d07ac352d..265ca34c0 100644 --- a/lualib/lua_cfg_transform.lua +++ b/lualib/lua_cfg_transform.lua @@ -399,6 +399,29 @@ return function(cfg) end end + -- Deal with dkim settings + if not cfg.dkim then + cfg.dkim = {} + else + if cfg.dkim.sign_condition then + -- We have an obsoleted sign condition, so we need to either add dkim_signing and move it + -- there or just move sign condition there... + if not cfg.dkim_signing then + logger.warnx('obsoleted DKIM signing method used, converting it to "dkim_signing" module') + cfg.dkim_signing = { + sign_condition = cfg.dkim.sign_condition + } + else + if not cfg.dkim_signing.sign_condition then + logger.warnx('obsoleted DKIM signing method used, move it to "dkim_signing" module') + cfg.dkim_signing.sign_condition = cfg.dkim.sign_condition + else + logger.warnx('obsoleted DKIM signing method used, ignore it as "dkim_signing" also defines condition!') + end + end + end + end + -- Try to find some obvious issues with configuration for k, v in cfg:pairs() do if v:type() == 'object' and v:at(k) and v:at(k):type() == 'object' then |