From: Andrew Lewis Date: Tue, 26 Jul 2016 15:29:47 +0000 (+0200) Subject: [Fix] Fix greylist plugin (#755) X-Git-Tag: 1.3.1~55^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F757%2Fhead;p=rspamd.git [Fix] Fix greylist plugin (#755) --- diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index 226d3eef2..1f62e6bda 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -216,19 +216,17 @@ local function greylist_check(task) end end - if addr then - local ret - ret,_,upstream = rspamd_redis_make_request(task, - redis_params, -- connect params - hash_key, -- hash key - false, -- is write - redis_get_cb, --callback - 'MGET', -- command - {body_key, meta_key} -- arguments - ) - if not ret then - rspamd_logger.errx(task, 'cannot make redis request to check results') - end + local ret + ret,_,upstream = rspamd_redis_make_request(task, + redis_params, -- connect params + hash_key, -- hash key + false, -- is write + redis_get_cb, --callback + 'MGET', -- command + {body_key, meta_key} -- arguments + ) + if not ret then + rspamd_logger.errx(task, 'cannot make redis request to check results') end end @@ -330,7 +328,7 @@ if opts then priority = 10 }) rspamd_config:register_symbol({ - name = 'GREYLIST_SAVE', + name = 'GREYLIST_CHECK', type = 'prefilter', callback = greylist_check, })