summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-03-22 13:26:58 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-03-22 13:26:58 +0000
commit87e9d061c94e3fdd721b7b04ccbdba7a061f6ca3 (patch)
treee6a241c455a7995d4160eed6ab172f175dbd7e42 /test
parente01d111e5565ac1962804750bd14a16efc7226d6 (diff)
SPF: additional variable $spf_result_guessed; tweak authresults string indicating guess
Diffstat (limited to 'test')
-rw-r--r--test/confs/46004
-rw-r--r--test/log/460010
-rw-r--r--test/rejectlog/46001
-rw-r--r--test/scripts/4600-SPF/460012
-rw-r--r--test/stdout/460016
5 files changed, 37 insertions, 6 deletions
diff --git a/test/confs/4600 b/test/confs/4600
index 2934bf160..cce583909 100644
--- a/test/confs/4600
+++ b/test/confs/4600
@@ -13,7 +13,7 @@ begin acl
check_rcpt:
accept hosts = HOSTIPV4
spf_guess = pass
- logwrite = spf_result $spf_result
+ logwrite = spf_result $spf_result (guess <$spf_result_guessed>)
logwrite = spf_header_comment $spf_header_comment
logwrite = spf_smtp_comment $spf_smtp_comment
logwrite = spf_received $spf_received
@@ -28,7 +28,7 @@ check_rcpt:
logwrite = ${authresults {$primary_hostname}}
deny
- logwrite = spf_result $spf_result
+ logwrite = spf_result $spf_result (guess <$spf_result_guessed>)
logwrite = spf_header_comment $spf_header_comment
logwrite = spf_smtp_comment $spf_smtp_comment
logwrite = spf_received $spf_received
diff --git a/test/log/4600 b/test/log/4600
index 4a5e6e3e3..c59607edb 100644
--- a/test/log/4600
+++ b/test/log/4600
@@ -1,14 +1,20 @@
******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
-1999-03-02 09:44:33 spf_result fail
+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.openspf.org/Why?id=a%40example.com&ip=ip4.ip4.ip4.ip4&receiver=myhost.test.ex : 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=a@example.com; helo=testclient;
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=(testclient) [ip4.ip4.ip4.ip4] F=<a@example.com> rejected RCPT <fred@test.ex>
+1999-03-02 09:44:33 spf_result neutral (guess <yes>)
+1999-03-02 09:44:33 spf_header_comment myhost.test.ex: ip4.ip4.ip4.ip4 is neither permitted nor denied by domain of test.example.com
+1999-03-02 09:44:33 spf_smtp_comment Please see http://www.openspf.org/Why?id=b%40test.example.com&ip=ip4.ip4.ip4.ip4&receiver=myhost.test.ex : Reason: mechanism
+1999-03-02 09:44:33 spf_received Received-SPF: neutral (myhost.test.ex: ip4.ip4.ip4.ip4 is neither permitted nor denied by domain of test.example.com) client-ip=ip4.ip4.ip4.ip4; envelope-from=b@test.example.com; helo=testclient;
+1999-03-02 09:44:33 Authentication-Results: myhost.test.ex;\n spf=neutral (best guess record for domain) smtp.mailfrom=test.example.com
+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 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_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=b@example.com; helo=testclient;
+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=c@example.com; helo=testclient;
1999-03-02 09:44:33 Authentication-Results: myhost.test.ex;\n spf=pass smtp.mailfrom=example.com
diff --git a/test/rejectlog/4600 b/test/rejectlog/4600
index 6eeab86c5..abd86c874 100644
--- a/test/rejectlog/4600
+++ b/test/rejectlog/4600
@@ -1,3 +1,4 @@
******** SERVER ********
1999-03-02 09:44:33 H=(testclient) [ip4.ip4.ip4.ip4] F=<a@example.com> rejected RCPT <fred@test.ex>
+1999-03-02 09:44:33 H=(testclient) [ip4.ip4.ip4.ip4] F=<b@test.example.com> rejected RCPT <fred@test.ex>
diff --git a/test/scripts/4600-SPF/4600 b/test/scripts/4600-SPF/4600
index 3907f6861..825efb959 100644
--- a/test/scripts/4600-SPF/4600
+++ b/test/scripts/4600-SPF/4600
@@ -19,11 +19,21 @@ rcpt to:<fred@test.ex>
??? 550
quit
****
+client HOSTIPV4 PORT_D
+??? 220
+helo testclient
+??? 250
+mail from:<b@test.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>
+mail from:<c@example.com>
??? 250
rcpt to:<fred@test.ex>
??? 250
diff --git a/test/stdout/4600 b/test/stdout/4600
index c33a531c2..3b75a04e3 100644
--- a/test/stdout/4600
+++ b/test/stdout/4600
@@ -12,13 +12,27 @@ Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
<<< 550 Administrative prohibition
>>> quit
End of script
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> helo testclient
+??? 250
+<<< 250 myhost.test.ex Hello testclient [ip4.ip4.ip4.ip4]
+>>> mail from:<b@test.example.com>
+??? 250
+<<< 250 OK
+>>> rcpt to:<fred@test.ex>
+??? 550
+<<< 550 Administrative prohibition
+>>> quit
+End of script
Connecting to 127.0.0.1 port 1225 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
>>> helo testclient
??? 250
<<< 250 myhost.test.ex Hello testclient [127.0.0.1]
->>> mail from:<b@example.com>
+>>> mail from:<c@example.com>
??? 250
<<< 250 OK
>>> rcpt to:<fred@test.ex>