diff options
Diffstat (limited to '')
-rw-r--r-- | test/functional/lua/get_from.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/lua/get_from.lua b/test/functional/lua/get_from.lua new file mode 100644 index 0000000..9282866 --- /dev/null +++ b/test/functional/lua/get_from.lua @@ -0,0 +1,10 @@ +rspamd_config:register_symbol({ + name = 'GET_FROM', + score = 1.0, + callback = function(task) + local a = task:get_from('mime') + if not a then return end + a = a[1] + return true, (a.name or '') .. ',' .. (a.addr or '') .. ',' .. (a.user or '') .. ',' .. (a.domain or '') + end +}) |