summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-01-19 12:26:35 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2017-01-19 12:26:35 +0000
commitc39b93a62e182a09450f212b03705dcafa7431aa (patch)
treee1b61e870bec79c265877862b6366669959c1722
parent62ee80535b325100f05758fe1b6d22cb3cae9f73 (diff)
VRFY: add docs note on results, and additional test cases
-rw-r--r--doc/doc-docbook/spec.xfpt5
-rw-r--r--src/src/smtp_in.c4
-rw-r--r--test/confs/00416
-rw-r--r--test/scripts/0000-Basic/00415
-rw-r--r--test/stderr/004161
-rw-r--r--test/stdout/00419
6 files changed, 85 insertions, 5 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 18e171036..8303848c8 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -28093,6 +28093,11 @@ run. A &"discard"& return from the DATA or the non-SMTP ACL discards all the
remaining recipients. The &"discard"& return is not permitted for the
&%acl_smtp_predata%& ACL.
+.new
+If the ACL for VRFY returns &"accept"&, a recipient verify (without callout)
+is done on the address and the result determines the SMTP response.
+.wen
+
.cindex "&[local_scan()]& function" "when all recipients discarded"
The &[local_scan()]& function is always run, even if there are no remaining
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 655e25394..890c7c517 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4617,7 +4617,7 @@ while (done <= 0)
friends now makes it absolutely clear that it means *mailbox*. Consequently
we must always qualify this address, regardless. */
- if (recipient_domain == 0)
+ if (!recipient_domain)
if (!(recipient_domain = qualify_recipient(&recipient, smtp_cmd_data,
US"recipient")))
{
@@ -4875,7 +4875,7 @@ while (done <= 0)
break;
}
- if (recipient_domain == 0)
+ if (!recipient_domain)
if (!(recipient_domain = qualify_recipient(&address, smtp_cmd_data,
US"verify")))
break;
diff --git a/test/confs/0041 b/test/confs/0041
index 5157170f2..f7fa61ed8 100644
--- a/test/confs/0041
+++ b/test/confs/0041
@@ -11,6 +11,7 @@ acl_smtp_vrfy = check_vrfy
acl_smtp_expn = check_expn
qualify_domain = test.ex
no_write_rejectlog
+recipient_unqualified_hosts = 3.3.3.3
# ----- ACLs -----
@@ -20,6 +21,9 @@ begin acl
check_vrfy:
deny local_parts = hardfail
message = 599 custom reject
+ accept local_parts = acceptable
+ accept local_parts = ok_with_dom
+ domains = test.ex
check_expn:
accept hosts = 2.2.2.2
@@ -36,7 +40,7 @@ system_aliases:
localuser:
driver = accept
- local_parts = userx
+ local_parts = userx : ok_with_dom : acceptable
transport = local_delivery
diff --git a/test/scripts/0000-Basic/0041 b/test/scripts/0000-Basic/0041
index 0f8cdb3b5..521c00618 100644
--- a/test/scripts/0000-Basic/0041
+++ b/test/scripts/0000-Basic/0041
@@ -2,11 +2,16 @@
exim -bh 1.1.1.1
vrfy userx@test.ex
vrfy hardfail@test.ex
+vrfy ok_with_dom@test.ex
vrfy unqual
vrfy
expn postmaster
quit
****
+exim -bh 3.3.3.3
+vrfy acceptable
+quit
+****
exim -bh 2.2.2.2
expn list
quit
diff --git a/test/stderr/0041 b/test/stderr/0041
index b00305212..0d3f40044 100644
--- a/test/stderr/0041
+++ b/test/stderr/0041
@@ -2,7 +2,7 @@
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
->>> host in recipient_unqualified_hosts? no (option unset)
+>>> host in recipient_unqualified_hosts? no (end of list)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
@@ -12,6 +12,14 @@
>>> check local_parts = hardfail
>>> userx in "hardfail"? no (end of list)
>>> deny: condition test failed in ACL "check_vrfy"
+>>> processing "accept"
+>>> check local_parts = acceptable
+>>> userx in "acceptable"? no (end of list)
+>>> accept: condition test failed in ACL "check_vrfy"
+>>> processing "accept"
+>>> check local_parts = ok_with_dom
+>>> userx in "ok_with_dom"? no (end of list)
+>>> accept: condition test failed in ACL "check_vrfy"
>>> end of ACL "check_vrfy": implicit DENY
LOG: H=[1.1.1.1] rejected VRFY userx@test.ex
>>> using ACL "check_vrfy"
@@ -22,6 +30,29 @@ LOG: H=[1.1.1.1] rejected VRFY userx@test.ex
>>> deny: condition test succeeded in ACL "check_vrfy"
>>> end of ACL "check_vrfy": DENY
LOG: H=[1.1.1.1] rejected VRFY hardfail@test.ex: 599 custom reject
+>>> using ACL "check_vrfy"
+>>> processing "deny"
+>>> check local_parts = hardfail
+>>> ok_with_dom in "hardfail"? no (end of list)
+>>> deny: condition test failed in ACL "check_vrfy"
+>>> processing "accept"
+>>> check local_parts = acceptable
+>>> ok_with_dom in "acceptable"? no (end of list)
+>>> accept: condition test failed in ACL "check_vrfy"
+>>> processing "accept"
+>>> check local_parts = ok_with_dom
+>>> ok_with_dom in "ok_with_dom"? yes (matched "ok_with_dom")
+>>> check domains = test.ex
+>>> test.ex in "test.ex"? yes (matched "test.ex")
+>>> accept: condition test succeeded in ACL "check_vrfy"
+>>> end of ACL "check_vrfy": ACCEPT
+>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+>>> routing ok_with_dom@test.ex
+>>> calling system_aliases router
+>>> system_aliases router declined for ok_with_dom@test.ex
+>>> ok_with_dom in "userx : ok_with_dom : acceptable"? yes (matched "ok_with_dom")
+>>> calling localuser router
+>>> routed by localuser router
>>> using ACL "check_expn"
>>> processing "accept"
>>> check hosts = 2.2.2.2
@@ -33,7 +64,33 @@ LOG: H=[1.1.1.1] rejected EXPN postmaster
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
->>> host in recipient_unqualified_hosts? no (option unset)
+>>> host in recipient_unqualified_hosts? yes (matched "3.3.3.3")
+>>> host in helo_verify_hosts? no (option unset)
+>>> host in helo_try_verify_hosts? no (option unset)
+>>> host in helo_accept_junk_hosts? no (option unset)
+>>> host in smtp_accept_max_nonmail_hosts? yes (matched "*")
+>>> using ACL "check_vrfy"
+>>> processing "deny"
+>>> check local_parts = hardfail
+>>> acceptable in "hardfail"? no (end of list)
+>>> deny: condition test failed in ACL "check_vrfy"
+>>> processing "accept"
+>>> check local_parts = acceptable
+>>> acceptable in "acceptable"? yes (matched "acceptable")
+>>> accept: condition test succeeded in ACL "check_vrfy"
+>>> end of ACL "check_vrfy": ACCEPT
+>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+>>> routing acceptable@test.ex
+>>> calling system_aliases router
+>>> system_aliases router declined for acceptable@test.ex
+>>> acceptable in "userx : ok_with_dom : acceptable"? yes (matched "acceptable")
+>>> calling localuser router
+>>> routed by localuser router
+>>> host in hosts_connection_nolog? no (option unset)
+>>> host in host_lookup? no (option unset)
+>>> host in host_reject_connection? no (option unset)
+>>> host in sender_unqualified_hosts? no (option unset)
+>>> host in recipient_unqualified_hosts? no (end of list)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
diff --git a/test/stdout/0041 b/test/stdout/0041
index 6b22865b0..eb2472f52 100644
--- a/test/stdout/0041
+++ b/test/stdout/0041
@@ -6,11 +6,20 @@
220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
252 Administrative prohibition
599 custom reject
+250 <ok_with_dom@test.ex> is deliverable
501 unqual: recipient address must contain a domain
501 empty address
550 Administrative prohibition
221 the.local.host.name closing connection
+**** SMTP testing session as if from host 3.3.3.3
+**** but without any ident (RFC 1413) callback.
+**** This is not for real!
+
+220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 <acceptable@test.ex> is deliverable
+221 the.local.host.name closing connection
+
**** SMTP testing session as if from host 2.2.2.2
**** but without any ident (RFC 1413) callback.
**** This is not for real!