Testsuite: SPF testcases. Bug 1789
[exim.git] / test / scripts / 4600-SPF / 4600
diff --git a/test/scripts/4600-SPF/4600 b/test/scripts/4600-SPF/4600
new file mode 100644 (file)
index 0000000..3907f68
--- /dev/null
@@ -0,0 +1,33 @@
+# acl condition and variables
+#
+# 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
+****
+client HOSTIPV4 PORT_D
+??? 220
+helo testclient
+??? 250
+mail from:<a@example.com>
+??? 250
+rcpt to:<fred@test.ex>
+??? 550
+quit
+****
+client 127.0.0.1 PORT_D
+??? 220
+helo testclient
+??? 250
+mail from:<b@example.com>
+??? 250
+rcpt to:<fred@test.ex>
+??? 250
+quit
+****
+#
+killdaemon