SPF: fix result for case of only non-spf TXT RRs. Bug 2499
[exim.git] / test / scripts / 4600-SPF / 4601
index 096b64e2424c61375edb8c17832557810a9ef94b..5e6602ab02926087b407a81cdf508ebb4b16cb20 100644 (file)
@@ -1,15 +1,8 @@
 # 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
+exim -bd -DSERVER=server -oX PORT_D:PORT_S
 ****
-client HOSTIPV4 PORT_D
+client 127.0.0.1 PORT_D
 ??? 220
 helo testclient
 ??? 250
@@ -19,7 +12,7 @@ rcpt to:<fred@test.ex>
 ??? 250
 quit
 ****
-client 127.0.0.1 PORT_D
+client 127.0.0.1 PORT_S
 ??? 220
 helo testclient
 ??? 250
@@ -31,3 +24,14 @@ quit
 ****
 #
 killdaemon
+#
+#
+#
+exim -be
+eDNS_NOMATCH       none      ${lookup {fred@v6.test.ex} spf {HOSTIPV4}}
+eDNS_AGAIN         temperror ${lookup {fred@test.again.dns} spf {HOSTIPV4}}
+multiple rr        permerror ${lookup {fred@double.example.com} spf {8.8.8.8}}
+multi + non-spf    permerror ${lookup {fred@doubleplus.example.com} spf {8.8.8.8}}
+uppercase in v=    pass      ${lookup {fred@uppercase.example.com} spf {HOSTIPV4}}
+only non-spf txt   none      ${lookup {fred@test.ex} spf {HOSTIPV4}}
+****