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