summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-txt/ChangeLog4
-rw-r--r--src/src/receive.c4
-rw-r--r--test/log/54051
-rw-r--r--test/scripts/5400-cutthrough/540524
-rw-r--r--test/stdout/540535
5 files changed, 67 insertions, 1 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index cbc7f2baa..201e21207 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -183,6 +183,10 @@ JH/34 Re-introduce enforcement of no cutthrough delivery on transports having
consolidation of verify-callout and delivery SMTP handling.
Extend the restriction to also cover ARC-signing.
+JH/35 Cutthrough: for a final-dot response timeout (and nonunderstood responses)
+ in defer=pass mode supply a 450 to the initiator. Previously the message
+ would be spooled.
+
Exim version 4.90
-----------------
diff --git a/src/src/receive.c b/src/src/receive.c
index 4cc43eb3a..4e1dca5c5 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -4157,9 +4157,11 @@ if(cutthrough.fd >= 0 && cutthrough.delivery)
case '4': /* Temp-reject. Keep spoolfiles and accept, unless defer-pass mode.
... for which, pass back the exact error */
if (cutthrough.defer_pass) smtp_reply = string_copy_malloc(msg);
- /*FALLTRHOUGH*/
+ cutthrough_done = TMP_REJ; /* Avoid the usual immediate delivery attempt */
+ break; /* message_id needed for SMTP accept below */
default: /* Unknown response, or error. Treat as temp-reject. */
+ if (cutthrough.defer_pass) smtp_reply = US"450 Onward transmission not accepted";
cutthrough_done = TMP_REJ; /* Avoid the usual immediate delivery attempt */
break; /* message_id needed for SMTP accept below */
diff --git a/test/log/5405 b/test/log/5405
index 901add1c3..feb4052f4 100644
--- a/test/log/5405
+++ b/test/log/5405
@@ -16,6 +16,7 @@
1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userf@domain.com
1999-03-02 09:44:33 rcpt for userg@domain.com
1999-03-02 09:44:33 10HmbC-0005vi-00 U=CALLER userg@domain.com F=<CALLER@myhost.test.ex> tmp-reject from cutthrough after DATA: R=all T=smtp H=127.0.0.1 [127.0.0.1] C="459 content reject"
+1999-03-02 09:44:33 rcpt for userj@domain.com
1999-03-02 09:44:33 rcpt for userh@domain.com
1999-03-02 09:44:33 10HmbD-0005vi-00 >> userh@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK"
1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userh@domain.com
diff --git a/test/scripts/5400-cutthrough/5405 b/test/scripts/5400-cutthrough/5405
index 2e7a33388..2de0f5c58 100644
--- a/test/scripts/5400-cutthrough/5405
+++ b/test/scripts/5400-cutthrough/5405
@@ -174,6 +174,30 @@ DATA
QUIT
****
#
+# conn-drop (at DATA-dot), option "pass". Should tmp-rej source, at DATA.
+server PORT_S
+220 ESMTP
+EHLO
+250 OK
+MAIL FROM:
+250 Sender OK
+RCPT TO:
+250 good rcpt
+DATA
+354 Send data
+.
+>*eof
+****
+exim -DCONTROL=/defer=pass -bs
+EHLO myhost.test.ex
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO:<userj@domain.com>
+DATA
+
+.
+QUIT
+****
+#
#########################################################
#, Now using a conn opened by a recipient verify
#
diff --git a/test/stdout/5405 b/test/stdout/5405
index 14bfdabdd..ef39477d5 100644
--- a/test/stdout/5405
+++ b/test/stdout/5405
@@ -82,6 +82,17 @@
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
+450 Onward transmission not accepted
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at myhost.test.ex
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250 HELP
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
250 OK id=10HmbD-0005vi-00
221 myhost.test.ex closing connection
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
@@ -247,6 +258,30 @@ EHLO myhost.test.ex
250 OK
MAIL FROM:<CALLER@myhost.test.ex>
250 Sender OK
+RCPT TO:<userj@domain.com>
+250 good rcpt
+DATA
+354 Send data
+Received: from CALLER (helo=myhost.test.ex)
+ by myhost.test.ex with local-esmtp (Exim x.yz)
+ (envelope-from <CALLER@myhost.test.ex>)
+ id 10HmbE-0005vi-00
+ for userj@domain.com; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmbE-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+X-hdr-rtr-new: +++
+
+.
+>*eof
+End of script
+Listening on port 1224 ...
+Connection request from [ip4.ip4.ip4.ip4]
+220 ESMTP
+EHLO myhost.test.ex
+250 OK
+MAIL FROM:<CALLER@myhost.test.ex>
+250 Sender OK
RCPT TO:<userh@domain.com>
250 Recipient OK
DATA