Testsuite: fix testcase for SPF empty-mailfrom-use-helo. Bug 467
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 2 Feb 2021 21:30:56 +0000 (21:30 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 2 Feb 2021 21:30:56 +0000 (21:30 +0000)
test/dnszones-src/db.example.com
test/log/4600
test/rejectlog/4600
test/scripts/4600-SPF/4600
test/stdout/4600

index 2d2cca0b7cce6fc2ed99f448b49bfc845de2c2f6..94eb71ccc1462c8a3c136760c305c2f0a7211deb 100644 (file)
@@ -33,6 +33,7 @@ doubleplus    TXT     v=spf1 include:_spf.google.com ~all
                TXT     v=spf1 +a +mx -all
 
 uppercase      TXT     v=sPf1 +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"
 
 
 ; Alias A record for the local host, under the name "server1"
 
index 065cd544ccabfffbe10d866156772d5c95d6a96c..dabeaf19dc77e29b28a482ec32da250fa16729ac 100644 (file)
 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 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_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>
index e989ff7b796f2c28d4c178d8e7413d90d8345aa4..338b674e3a1e1f806c0fa2ce8ad9f68787657b56 100644 (file)
@@ -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>
 ******** 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>
index cb67d19ae21d1bc2e56bb4d8fea526f25c063189..55e2e0aff696beb8c673f170662387864230fa84 100644 (file)
@@ -60,9 +60,14 @@ rcpt to:<fred@test.ex>
 quit
 ****
 #
 quit
 ****
 #
-client 127.0.0.1 PORT_S
+#
+#
+#
+#
+# helo name gets used when mailfrom is null
+client HOSTIPV4 PORT_S
 ??? 220
 ??? 220
-helo example.com
+helo passme.helo.example.com
 ??? 250
 mail from:<>
 ??? 250
 ??? 250
 mail from:<>
 ??? 250
@@ -71,4 +76,16 @@ rcpt to:<fred@test.ex>
 quit
 ****
 #
 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
 killdaemon
index a0d3eed8bb7abfaf29027712f7e30eb05fd59ddc..e686fee12cc923ff43245d5b185716680bc0c18d 100644 (file)
@@ -68,12 +68,12 @@ Connecting to 127.0.0.1 port 1226 ... connected
 <<< 550 Administrative prohibition
 >>> quit
 End of script
 <<< 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
 ??? 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
-<<< 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
 >>> mail from:<>
 ??? 250
 <<< 250 OK
@@ -82,3 +82,17 @@ Connecting to 127.0.0.1 port 1224 ... connected
 <<< 250 Accepted
 >>> quit
 End of script
 <<< 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