summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2020-01-09 22:00:14 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2020-01-09 22:00:14 +0300
commitf2021a1f5138742f70599fc0df54b3b0a1b088c1 (patch)
tree9600e5a3dbf618488d43c57d2d704cc3556b1de5
parent6b8466002ff771897b780111e3b33fdd2bddf4e4 (diff)
downloadrspamd-f2021a1f5138742f70599fc0df54b3b0a1b088c1.tar.gz
rspamd-f2021a1f5138742f70599fc0df54b3b0a1b088c1.zip
[Test] SPF external relay map
-rw-r--r--conf/maps.d/external_ip_spf.inc1
-rw-r--r--src/plugins/lua/spf.lua5
-rw-r--r--test/functional/configs/dmarc.conf4
3 files changed, 7 insertions, 3 deletions
diff --git a/conf/maps.d/external_ip_spf.inc b/conf/maps.d/external_ip_spf.inc
new file mode 100644
index 000000000..3fc5c1775
--- /dev/null
+++ b/conf/maps.d/external_ip_spf.inc
@@ -0,0 +1 @@
+192.168.1.1 \ No newline at end of file
diff --git a/src/plugins/lua/spf.lua b/src/plugins/lua/spf.lua
index 10daa0d2b..67350c285 100644
--- a/src/plugins/lua/spf.lua
+++ b/src/plugins/lua/spf.lua
@@ -231,6 +231,11 @@ if local_config.external_relay then
end
end
+if external_ip_spf.map then
+ local lua_maps = require "lua_maps"
+ external_ip_spf.map = lua_maps.map_add_from_ucl(external_ip_spf.map, "radix", "External IP SPF map")
+end
+
for _,sym in pairs(local_config.symbols) do
rspamd_config:register_symbol{
name = sym,
diff --git a/test/functional/configs/dmarc.conf b/test/functional/configs/dmarc.conf
index 08a542c70..dac106cc2 100644
--- a/test/functional/configs/dmarc.conf
+++ b/test/functional/configs/dmarc.conf
@@ -1,4 +1,2 @@
dmarc { }
-spf {
- external_relay = 192.168.1.1;
-} \ No newline at end of file
+spf { } \ No newline at end of file