diff options
Diffstat (limited to 'src/plugins/lua/bimi.lua')
-rw-r--r-- | src/plugins/lua/bimi.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/lua/bimi.lua b/src/plugins/lua/bimi.lua index 914484543..5053cc941 100644 --- a/src/plugins/lua/bimi.lua +++ b/src/plugins/lua/bimi.lua @@ -263,7 +263,14 @@ local function check_bimi_vmc(task, domain, record) if redis_params.db then db = string.format('/%s', redis_params.db) end - if redis_params.password then + if redis_params.username then + if redis_params.password then + password = string.format( '%s:%s@', redis_params.username, redis_params.password) + else + rspamd_logger.errx(task, "Redis requires a password when username is supplied") + return + end + elseif redis_params.password then password = string.format(':%s@', redis_params.password) end local redis_server = string.format('redis://%s%s:%s%s', |