]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] SPF external relay map
authorkorgoth1 <vladislav.stakhov@gmail.com>
Thu, 9 Jan 2020 19:00:14 +0000 (22:00 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Thu, 9 Jan 2020 19:00:14 +0000 (22:00 +0300)
conf/maps.d/external_ip_spf.inc [new file with mode: 0644]
src/plugins/lua/spf.lua
test/functional/configs/dmarc.conf

diff --git a/conf/maps.d/external_ip_spf.inc b/conf/maps.d/external_ip_spf.inc
new file mode 100644 (file)
index 0000000..3fc5c17
--- /dev/null
@@ -0,0 +1 @@
+192.168.1.1
\ No newline at end of file
index 10daa0d2b3e53771e702cc794315796d291ebea3..67350c285bd3b860f9de378fbf3c280ba6693f72 100644 (file)
@@ -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,
index 08a542c70c9a4ea8827e129531a1005524812ef0..dac106cc220624f7a1736eab45729876e4245c59 100644 (file)
@@ -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