aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional/configs
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/configs
parent844e28a7a9126584ff9cba96b62182d7e10ee7fc (diff)
downloadrspamd-37d7bee0fe739c3262e40036309573a41e6f4b0a.tar.gz
rspamd-37d7bee0fe739c3262e40036309573a41e6f4b0a.zip
[Feature] external_relay plugin
Diffstat (limited to 'test/functional/configs')
-rw-r--r--test/functional/configs/maps/external_relay.hostname_map3
-rw-r--r--test/functional/configs/maps/external_relay.user_map2
-rw-r--r--test/functional/configs/merged-local.conf22
-rw-r--r--test/functional/configs/merged.conf3
4 files changed, 30 insertions, 0 deletions
diff --git a/test/functional/configs/maps/external_relay.hostname_map b/test/functional/configs/maps/external_relay.hostname_map
new file mode 100644
index 000000000..fdb4fc07a
--- /dev/null
+++ b/test/functional/configs/maps/external_relay.hostname_map
@@ -0,0 +1,3 @@
+cool.example.org direct
+lame.example.net
+
diff --git a/test/functional/configs/maps/external_relay.user_map b/test/functional/configs/maps/external_relay.user_map
new file mode 100644
index 000000000..bd04568da
--- /dev/null
+++ b/test/functional/configs/maps/external_relay.user_map
@@ -0,0 +1,2 @@
+user@example.net
+
diff --git a/test/functional/configs/merged-local.conf b/test/functional/configs/merged-local.conf
index 84bffe8dd..dd93a7ba3 100644
--- a/test/functional/configs/merged-local.conf
+++ b/test/functional/configs/merged-local.conf
@@ -31,6 +31,28 @@ emails {
}
}
+external_relay {
+ enabled = {= env.EXTERNAL_RELAY_ENABLED =};
+
+ rules {
+ EXTERNAL_RELAY_AUTHENTICATED {
+ strategy = "authenticated";
+ user_map = "{= env.TESTDIR =}/configs/maps/external_relay.user_map";
+ }
+ EXTERNAL_RELAY_COUNT {
+ count = 4;
+ strategy = "count";
+ }
+ EXTERNAL_RELAY_HOSTNAME_MAP {
+ hostname_map = "{= env.TESTDIR =}/configs/maps/external_relay.hostname_map";
+ strategy = "hostname_map";
+ }
+ EXTERNAL_RELAY_LOCAL {
+ strategy = "local";
+ }
+ }
+}
+
greylist {
check_local = true;
timeout = 4;
diff --git a/test/functional/configs/merged.conf b/test/functional/configs/merged.conf
index 8bec67a41..bda7044e1 100644
--- a/test/functional/configs/merged.conf
+++ b/test/functional/configs/merged.conf
@@ -31,5 +31,8 @@ lua = "{= env.TESTDIR =}/lua/udp.lua"
# 350_magic
lua = "{= env.TESTDIR =}/lua/magic.lua"
+# 380_external_relay
+lua = "{= env.TESTDIR =}/lua/external_relay.lua"
+
.include(priority=1,duplicate=merge) "{= env.TESTDIR =}/configs/merged-local.conf"
.include(priority=2,duplicate=replace) "{= env.TESTDIR =}/configs/merged-override.conf"