summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-01-19 13:12:02 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2017-01-19 13:12:02 +0000
commitbbc8ed07111bfc0ef3a5d24aa6318f0f307e41ca (patch)
treed2700de7691b3a94bea75c3e92c0a157dcae8853
parentc39b93a62e182a09450f212b03705dcafa7431aa (diff)
VRFY: advertise in EHLO response, if there is an ACL defined
-rw-r--r--doc/doc-docbook/spec.xfpt2
-rw-r--r--src/src/smtp_in.c17
-rw-r--r--test/stderr/03711
-rw-r--r--test/stderr/34001
-rw-r--r--test/stdout/03711
-rw-r--r--test/stdout/340022
-rw-r--r--test/stdout/35005
7 files changed, 40 insertions, 9 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 8303848c8..7d8b908f8 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -25875,7 +25875,7 @@ running, the transport may get an IP for the name for its authentication
check which does not match the connection peer IP.
No authentication will then be done, despite the names being identical.
-For such cases use a separate transport which alwats authenticates.
+For such cases use a separate transport which always authenticates.
.wen
.cindex "AUTH" "on MAIL command"
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 890c7c517..04cbbe465 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -3903,19 +3903,20 @@ while (done <= 0)
dsn_advertised = TRUE;
}
- /* Advertise ETRN if there's an ACL checking whether a host is
- permitted to issue it; a check is made when any host actually tries. */
+ /* Advertise ETRN/VRFY/EXPN if there's are ACL checking whether a host is
+ permitted to issue them; a check is made when any host actually tries. */
- if (acl_smtp_etrn != NULL)
+ if (acl_smtp_etrn)
{
s = string_catn(s, &size, &ptr, smtp_code, 3);
s = string_catn(s, &size, &ptr, US"-ETRN\r\n", 7);
}
-
- /* Advertise EXPN if there's an ACL checking whether a host is
- permitted to issue it; a check is made when any host actually tries. */
-
- if (acl_smtp_expn != NULL)
+ if (acl_smtp_vrfy)
+ {
+ s = string_catn(s, &size, &ptr, smtp_code, 3);
+ s = string_catn(s, &size, &ptr, US"-VRFY\r\n", 7);
+ }
+ if (acl_smtp_expn)
{
s = string_catn(s, &size, &ptr, smtp_code, 3);
s = string_catn(s, &size, &ptr, US"-EXPN\r\n", 7);
diff --git a/test/stderr/0371 b/test/stderr/0371
index 1cdf00177..c59988723 100644
--- a/test/stderr/0371
+++ b/test/stderr/0371
@@ -41,6 +41,7 @@ host in chunking_advertise_hosts? no (end of list)
SMTP>> 250-mail.test.ex Hello something [V4NET.0.0.0]
250-SIZE 52428800
250-8BITMIME
+250-VRFY
250-PIPELINING
250 HELP
SMTP<< mail from:<x@y>
diff --git a/test/stderr/3400 b/test/stderr/3400
index 541d08d5a..99e927c6b 100644
--- a/test/stderr/3400
+++ b/test/stderr/3400
@@ -445,6 +445,7 @@ SMTP>> 250-myhost.test.ex Hello CALLER at testing.testing [10.0.0.5]
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
diff --git a/test/stdout/0371 b/test/stdout/0371
index 313432631..b9248dcf1 100644
--- a/test/stdout/0371
+++ b/test/stdout/0371
@@ -7,6 +7,7 @@
250-mail.test.ex Hello something [V4NET.0.0.0]
250-SIZE 52428800
250-8BITMIME
+250-VRFY
250-PIPELINING
250 HELP
250 OK
diff --git a/test/stdout/3400 b/test/stdout/3400
index 67add4d54..c57747bda 100644
--- a/test/stdout/3400
+++ b/test/stdout/3400
@@ -20,6 +20,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -53,6 +54,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -69,6 +71,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -102,6 +105,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -113,6 +117,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -124,6 +129,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -136,6 +142,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -153,6 +160,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -165,6 +173,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -176,6 +185,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -188,6 +198,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -206,6 +217,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250 HELP
@@ -215,6 +227,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -226,6 +239,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -238,6 +252,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -250,6 +265,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -262,6 +278,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250 HELP
@@ -273,6 +290,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -304,6 +322,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -328,6 +347,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -341,6 +361,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH MYLOGIN PLAIN EXPLAIN EXPANDED EXPANDFAIL DEFER LOGIN
@@ -352,6 +373,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250 HELP
diff --git a/test/stdout/3500 b/test/stdout/3500
index 634ac1ecd..326da7880 100644
--- a/test/stdout/3500
+++ b/test/stdout/3500
@@ -3,6 +3,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH CRAM-MD5
@@ -19,6 +20,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH CRAM-MD5
@@ -36,6 +38,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250 HELP
@@ -50,6 +53,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH CRAM-MD5
@@ -74,6 +78,7 @@
250-SIZE 52428800
250-8BITMIME
250-ETRN
+250-VRFY
250-EXPN
250-PIPELINING
250-AUTH CRAM-MD5