commit f2021a1: [Test] SPF external relay map
korgoth1
vladislav.stakhov at gmail.com
Sat Jan 11 14:14:06 UTC 2020
Author: korgoth1
Date: 2020-01-09 22:00:14 +0300
URL: https://github.com/rspamd/rspamd/commit/f2021a1f5138742f70599fc0df54b3b0a1b088c1
[Test] SPF external relay map
---
conf/maps.d/external_ip_spf.inc | 1 +
src/plugins/lua/spf.lua | 5 +++++
test/functional/configs/dmarc.conf | 4 +---
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
More information about the Commits
mailing list