From 4533e306fc21e0dc3cce32db0e2bfa146a5dd78c Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 22 Dec 2019 19:56:15 +0000 Subject: SPF: support uppercase in v=spf1, permerror-on-multiple-RRs. Bug 2499 --- test/dnszones-src/db.example.com | 5 +++++ test/scripts/4600-SPF/4601 | 13 ++++++------- test/stdout/4601 | 3 +++ 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/dnszones-src/db.example.com b/test/dnszones-src/db.example.com index 683772f77..6b35113e2 100644 --- a/test/dnszones-src/db.example.com +++ b/test/dnszones-src/db.example.com @@ -25,6 +25,11 @@ example.com. NS exim.example.com. example.com. TXT v=spf1 -all +double TXT v=spf1 include:_spf.google.com ~all + TXT v=spf1 +a +mx -all + +uppercase TXT v=sPf1 +all + ; Alias A record for the local host, under the name "server1" server1 A HOSTIPV4 diff --git a/test/scripts/4600-SPF/4601 b/test/scripts/4600-SPF/4601 index ab434611c..6012cfdeb 100644 --- a/test/scripts/4600-SPF/4601 +++ b/test/scripts/4600-SPF/4601 @@ -1,12 +1,5 @@ # lookup string-expansion # -# It is rather difficult to properly test spf. We use libspf2 to do the work, and it -# does the DNS lookups, so we cannot intercept them in the testsuite's usual fashion -# to provide values for testcases. -# -# For now just check that what should be working syntax does not cause us to fall over. -# Be careful with envelope-domains used for testcases, as real DNS lookups will be done. -# exim -bd -DSERVER=server -oX PORT_D:PORT_S **** client 127.0.0.1 PORT_D @@ -31,3 +24,9 @@ quit **** # killdaemon +# +# A multiple spf-RR return should get permerror +exim -be +${lookup {fred@double.example.com} spf {8.8.8.8}} +${lookup {fred@uppercase.example.com} spf {HOSTIPV4}} +**** diff --git a/test/stdout/4601 b/test/stdout/4601 index 66746a470..9f69eb29c 100644 --- a/test/stdout/4601 +++ b/test/stdout/4601 @@ -26,3 +26,6 @@ Connecting to 127.0.0.1 port 1224 ... connected <<< 250 Accepted >>> quit End of script +> permerror +> pass +> -- cgit v1.2.3