Преглед изворни кода

[Feature] Ratelimit: allow full addresses in whitelisted_rcpts

tags/1.7.0
Alexander Moisseev пре 6 година
родитељ
комит
4daa55f075
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3
    1
      src/plugins/lua/ratelimit.lua

+ 3
- 1
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

Loading…
Откажи
Сачувај