From: korgoth1 Date: Thu, 9 Jan 2020 19:00:14 +0000 (+0300) Subject: [Test] SPF external relay map X-Git-Tag: 2.3~124^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f2021a1f5138742f70599fc0df54b3b0a1b088c1;p=thirdparty%2Frspamd.git [Test] SPF external relay map --- diff --git a/conf/maps.d/external_ip_spf.inc b/conf/maps.d/external_ip_spf.inc new file mode 100644 index 0000000000..3fc5c1775c --- /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 10daa0d2b3..67350c285b 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 08a542c70c..dac106cc22 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