Debian Codegraph @

test/functional/lua/recipients.lua

raw
1 rspamd_config:register_symbol({
2 name = 'TEST_RCPT',
3 score = 1.0,
4 callback = function(task)
5 local l = {}
6 local rcpts = task:get_recipients(1)
7 for _, r in ipairs(rcpts) do
8 table.insert(l, r['addr'])
9 end
10 table.sort(l)
11 local t = table.concat(l, ",")
12 return true, t
13 end
14 })