diff options
author | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2018-09-28 16:49:11 +0200 |
---|---|---|
committer | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2018-09-28 16:49:11 +0200 |
commit | 6c4c2662c2c44222d4205db839d7f2d1566b9a78 (patch) | |
tree | 84c1b9db7be20fbdbdbd3cdad987108b6f114f53 /src | |
parent | 21d9f2d8539c652e0641e114312fbcb70d10a115 (diff) | |
download | rspamd-6c4c2662c2c44222d4205db839d7f2d1566b9a78.tar.gz rspamd-6c4c2662c2c44222d4205db839d7f2d1566b9a78.zip |
[Minor] DCC - add workaround for old host and port settings
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/dcc.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/lua/dcc.lua b/src/plugins/lua/dcc.lua index 30584e1e0..311dc608e 100644 --- a/src/plugins/lua/dcc.lua +++ b/src/plugins/lua/dcc.lua @@ -180,6 +180,20 @@ local function check_dcc (task) end -- Configuration + +-- WORKAROUND for deprecated host and port settings +if opts['host'] ~= nil and opts['port'] ~= nil then + opts['servers'] = opts['host'] .. ':' .. opts['port'] + rspamd_logger.warnx(rspamd_config, 'Using host and port parameters is deprecated. '.. + 'Please use servers = "%s:%s"; instead', opts['host'], opts['port']) +end +if opts['host'] ~= nil and not opts['port'] then + opts['socket'] = opts['host'] + rspamd_logger.warnx(rspamd_config, 'Using host parameters is deprecated. '.. + 'Please use socket = "%s"; instead', opts['host']) +end +-- WORKAROUND for deprecated host and port settings + if opts and ( opts['servers'] or opts['socket'] ) then rspamd_config:register_symbol({ name = symbol_bulk, |