diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-07-26 17:29:47 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-07-26 17:29:47 +0200 |
commit | b783c4f8eb920ac6e4a0182d0739e5eadb809062 (patch) | |
tree | 854bd3167859eaa9f4c9d52eda074fbc21037ce9 /src | |
parent | a3a2f3e1e222bbb6c113246ed00aeedc8298b45e (diff) | |
download | rspamd-b783c4f8eb920ac6e4a0182d0739e5eadb809062.tar.gz rspamd-b783c4f8eb920ac6e4a0182d0739e5eadb809062.zip |
[Fix] Fix greylist plugin (#755)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/greylist.lua | 26 |
1 files changed, 12 insertions, 14 deletions
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, }) |