aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-08-05 11:09:03 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-08-05 11:09:03 +0300
commit4daa55f0752193c17aa29b8e79a31028c4eaaac3 (patch)
treee14741e740e77d22bd06bbce326aa4ba07e91d99 /src
parent2d4a07cf3b36bd5e6c66e8d3847d387352f136a7 (diff)
downloadrspamd-4daa55f0752193c17aa29b8e79a31028c4eaaac3.tar.gz
rspamd-4daa55f0752193c17aa29b8e79a31028c4eaaac3.zip
[Feature] Ratelimit: allow full addresses in whitelisted_rcpts
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/ratelimit.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua
index afa9aba75..52df88ed0 100644
--- a/src/plugins/lua/ratelimit.lua
+++ b/src/plugins/lua/ratelimit.lua
@@ -481,7 +481,9 @@ local function rate_test_set(task, func)
local rcpts = task:get_recipients()
local rcpts_user = {}
if rcpts then
- fun.each(function(r) table.insert(rcpts_user, r['user']) end, rcpts)
+ fun.each(function(r)
+ fun.each(function(type) table.insert(rcpts_user, r[type]) end, {'user', 'addr'})
+ end, rcpts)
if fun.any(
function(r)
if fun.any(function(w) return r == w end, whitelisted_rcpts) then return true end