summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-12-22 19:56:15 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2019-12-27 13:44:11 +0000
commit4533e306fc21e0dc3cce32db0e2bfa146a5dd78c (patch)
tree6183c7109082ecdb43a3d18360ef79d3346d8dc2 /test
parente9079bdf87bcc2d224b34cbfb3dac290ca4c96d4 (diff)
SPF: support uppercase in v=spf1, permerror-on-multiple-RRs. Bug 2499
Diffstat (limited to 'test')
-rw-r--r--test/dnszones-src/db.example.com5
-rw-r--r--test/scripts/4600-SPF/460113
-rw-r--r--test/stdout/46013
3 files changed, 14 insertions, 7 deletions
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
+>