diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-28 13:33:24 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-28 13:33:24 +0100 |
commit | caa85eb1ec3cae941795dea727e794625b9c8bf3 (patch) | |
tree | 66407baf24e1c773d4787dc2d2ec69e5fc5a60bb /src/plugins/lua/replies.lua | |
parent | f7d54ff789833242766d565c79ea2e0d174dde45 (diff) | |
download | rspamd-caa85eb1ec3cae941795dea727e794625b9c8bf3.tar.gz rspamd-caa85eb1ec3cae941795dea727e794625b9c8bf3.zip |
[Feature] Use universal redis definitions in rspamd plugins
Diffstat (limited to 'src/plugins/lua/replies.lua')
-rw-r--r-- | src/plugins/lua/replies.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index 70228f0dc..98a48bb1f 100644 --- a/src/plugins/lua/replies.lua +++ b/src/plugins/lua/replies.lua @@ -18,7 +18,6 @@ limitations under the License. -- A plugin that implements replies check using redis -- Default port for redis upstreams -local default_port = 6379 local upstreams local whitelisted_ip local settings = { @@ -102,17 +101,13 @@ end local opts = rspamd_config:get_all_opt('replies') if opts then - if not opts['servers'] then - rspamd_logger.infox(rspamd_config, 'no servers are specified, disabling module') - else - upstreams = upstream_list.create(rspamd_config, opts['servers'], default_port) + upstreams = rspamd_parse_redis_server('replies') if not upstreams then rspamd_logger.infox(rspamd_config, 'no servers are specified, disabling module') else rspamd_config:register_pre_filter(replies_check) rspamd_config:register_post_filter(replies_set, 10) end - end for k,v in pairs(opts) do settings[k] = v |