summaryrefslogtreecommitdiffstats
path: root/test/functional/lua
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2021-06-07 18:36:58 +0200
committerAndrew Lewis <nerf@judo.za.org>2021-06-07 18:36:58 +0200
commit37d7bee0fe739c3262e40036309573a41e6f4b0a (patch)
tree168ea4f3b10ad5582a3b4c4523f2d092981738b4 /test/functional/lua
parent844e28a7a9126584ff9cba96b62182d7e10ee7fc (diff)
downloadrspamd-37d7bee0fe739c3262e40036309573a41e6f4b0a.tar.gz
rspamd-37d7bee0fe739c3262e40036309573a41e6f4b0a.zip
[Feature] external_relay plugin
Diffstat (limited to 'test/functional/lua')
-rw-r--r--test/functional/lua/external_relay.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/lua/external_relay.lua b/test/functional/lua/external_relay.lua
new file mode 100644
index 000000000..6aa3a292c
--- /dev/null
+++ b/test/functional/lua/external_relay.lua
@@ -0,0 +1,10 @@
+rspamd_config:register_symbol({
+ name = 'EXTERNAL_RELAY_TEST',
+ score = 0.0,
+ callback = function(task)
+ local from_ip = string.format('IP=%s', task:get_from_ip() or 'NIL')
+ local hostname = string.format('HOSTNAME=%s', task:get_hostname() or 'NIL')
+ local helo = string.format('HELO=%s', task:get_helo() or 'NIL')
+ return true, from_ip, hostname, helo
+ end
+})