summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2021-02-02 21:30:56 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2021-02-02 21:30:56 +0000
commit3bb1e9f161fd22707bc7cfcd77772422ac0fdd8e (patch)
treedcc908974c276cb4dd2afe41e5387c1c572e7f1b /test
parent0f773e4df59a9d35929d5839f89c15487a1dd0be (diff)
Testsuite: fix testcase for SPF empty-mailfrom-use-helo. Bug 467
Diffstat (limited to 'test')
-rw-r--r--test/dnszones-src/db.example.com1
-rw-r--r--test/log/460012
-rw-r--r--test/rejectlog/46001
-rw-r--r--test/scripts/4600-SPF/460021
-rw-r--r--test/stdout/460020
5 files changed, 47 insertions, 8 deletions
diff --git a/test/dnszones-src/db.example.com b/test/dnszones-src/db.example.com
index 2d2cca0b7..94eb71ccc 100644
--- a/test/dnszones-src/db.example.com
+++ b/test/dnszones-src/db.example.com
@@ -33,6 +33,7 @@ doubleplus TXT v=spf1 include:_spf.google.com ~all
TXT v=spf1 +a +mx -all
uppercase TXT v=sPf1 +all
+passme.helo TXT v=spf1 +all
; Alias A record for the local host, under the name "server1"
diff --git a/test/log/4600 b/test/log/4600
index 065cd544c..dabeaf19d 100644
--- a/test/log/4600
+++ b/test/log/4600
@@ -29,7 +29,13 @@
1999-03-02 09:44:33 Authentication-Results: myhost.test.ex
1999-03-02 09:44:33 H=(testclient) [127.0.0.1] F=<c@example.com> rejected RCPT <fred@test.ex>
1999-03-02 09:44:33 spf_result pass
-1999-03-02 09:44:33 spf_header_comment myhost.test.ex: localhost is always allowed.
+1999-03-02 09:44:33 spf_header_comment myhost.test.ex: domain of passme.helo.example.com designates ip4.ip4.ip4.ip4 as permitted sender
1999-03-02 09:44:33 spf_smtp_comment
-1999-03-02 09:44:33 spf_received Received-SPF: pass (myhost.test.ex: localhost is always allowed.) client-ip=127.0.0.1; envelope-from=postmaster@example.com; helo=example.com;
-1999-03-02 09:44:33 Authentication-Results: myhost.test.ex;\n spf=pass smtp.helo=example.com
+1999-03-02 09:44:33 spf_received Received-SPF: pass (myhost.test.ex: domain of passme.helo.example.com designates ip4.ip4.ip4.ip4 as permitted sender) client-ip=ip4.ip4.ip4.ip4; envelope-from=postmaster@passme.helo.example.com; helo=passme.helo.example.com;
+1999-03-02 09:44:33 Authentication-Results: myhost.test.ex;\n spf=pass smtp.helo=passme.helo.example.com
+1999-03-02 09:44:33 spf_result fail (guess <no>)
+1999-03-02 09:44:33 spf_header_comment myhost.test.ex: domain of example.com does not designate ip4.ip4.ip4.ip4 as permitted sender
+1999-03-02 09:44:33 spf_smtp_comment Please see http://www.open-spf.org/Why : Reason: mechanism
+1999-03-02 09:44:33 spf_received Received-SPF: fail (myhost.test.ex: domain of example.com does not designate ip4.ip4.ip4.ip4 as permitted sender) client-ip=ip4.ip4.ip4.ip4; envelope-from=failme@example.com; helo=passme.helo.example.com;
+1999-03-02 09:44:33 Authentication-Results: myhost.test.ex;\n spf=fail smtp.mailfrom=example.com
+1999-03-02 09:44:33 H=(passme.helo.example.com) [ip4.ip4.ip4.ip4] F=<failme@example.com> rejected RCPT <fred@test.ex>
diff --git a/test/rejectlog/4600 b/test/rejectlog/4600
index e989ff7b7..338b674e3 100644
--- a/test/rejectlog/4600
+++ b/test/rejectlog/4600
@@ -2,3 +2,4 @@
******** SERVER ********
1999-03-02 09:44:33 H=(testclient) [ip4.ip4.ip4.ip4] F=<b@test.example.com> rejected RCPT <fred@test.ex>
1999-03-02 09:44:33 H=(testclient) [127.0.0.1] F=<c@example.com> rejected RCPT <fred@test.ex>
+1999-03-02 09:44:33 H=(passme.helo.example.com) [ip4.ip4.ip4.ip4] F=<failme@example.com> rejected RCPT <fred@test.ex>
diff --git a/test/scripts/4600-SPF/4600 b/test/scripts/4600-SPF/4600
index cb67d19ae..55e2e0aff 100644
--- a/test/scripts/4600-SPF/4600
+++ b/test/scripts/4600-SPF/4600
@@ -60,9 +60,14 @@ rcpt to:<fred@test.ex>
quit
****
#
-client 127.0.0.1 PORT_S
+#
+#
+#
+#
+# helo name gets used when mailfrom is null
+client HOSTIPV4 PORT_S
??? 220
-helo example.com
+helo passme.helo.example.com
??? 250
mail from:<>
??? 250
@@ -71,4 +76,16 @@ rcpt to:<fred@test.ex>
quit
****
#
+# helo name is overridden when a mailfrom is set
+client HOSTIPV4 PORT_S
+??? 220
+helo passme.helo.example.com
+??? 250
+mail from:<failme@example.com>
+??? 250
+rcpt to:<fred@test.ex>
+??? 550
+quit
+****
+#
killdaemon
diff --git a/test/stdout/4600 b/test/stdout/4600
index a0d3eed8b..e686fee12 100644
--- a/test/stdout/4600
+++ b/test/stdout/4600
@@ -68,12 +68,12 @@ Connecting to 127.0.0.1 port 1226 ... connected
<<< 550 Administrative prohibition
>>> quit
End of script
-Connecting to 127.0.0.1 port 1224 ... connected
+Connecting to ip4.ip4.ip4.ip4 port 1224 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> helo example.com
+>>> helo passme.helo.example.com
??? 250
-<<< 250 myhost.test.ex Hello example.com [127.0.0.1]
+<<< 250 myhost.test.ex Hello passme.helo.example.com [ip4.ip4.ip4.ip4]
>>> mail from:<>
??? 250
<<< 250 OK
@@ -82,3 +82,17 @@ Connecting to 127.0.0.1 port 1224 ... connected
<<< 250 Accepted
>>> quit
End of script
+Connecting to ip4.ip4.ip4.ip4 port 1224 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> helo passme.helo.example.com
+??? 250
+<<< 250 myhost.test.ex Hello passme.helo.example.com [ip4.ip4.ip4.ip4]
+>>> mail from:<failme@example.com>
+??? 250
+<<< 250 OK
+>>> rcpt to:<fred@test.ex>
+??? 550
+<<< 550 Administrative prohibition
+>>> quit
+End of script