summaryrefslogtreecommitdiffstats
path: root/test/functional/lua/recipients.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/recipients.lua')
-rw-r--r--test/functional/lua/recipients.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/lua/recipients.lua b/test/functional/lua/recipients.lua
new file mode 100644
index 0000000..f11c1a8
--- /dev/null
+++ b/test/functional/lua/recipients.lua
@@ -0,0 +1,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
+})