diff options
-rw-r--r-- | src/plugins/lua/greylist.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index 6e068e1d5..81d4604a0 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -208,8 +208,9 @@ local function greylist_check(task) end if addr then - if not rspamd_redis.make_request(task, addr, redis_get_cb, 'MGET', - {body_key, meta_key}) then + local ret = rspamd_redis.make_request(task, addr, redis_get_cb, 'MGET', + {body_key, meta_key}) + if not ret then rspamd_logger.errx(task, 'cannot make redis request to check results') end end @@ -268,9 +269,16 @@ local function greylist_set(task) if grey_res then task:insert_result(settings['symbol'], 0.0, grey_res, 'meta') rspamd_logger.infox(task, 'greylisting delayed till "%s": meta', grey_res) + --[[ + -- We got some redis error, but we don't know what, so we just ignore it + -- for now else task:insert_result(settings['symbol'], 0.0, 'unknown') rspamd_logger.infox(task, 'greylisting delayed: unknown, internal error') + --]] + else + task:insert_result(settings['symbol'], 0.0, 'greylisted', 'redis fail') + return end end task:set_metric_action('default', 'soft reject') |