From 0762e1a4d6de4b7b0206314302297c9dd6d7ae73 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 23 Dec 2022 18:02:25 +0000 Subject: Expand max_rcpt option on smtp transport. Bug 2946 --- test/confs/0285 | 15 +++++++++++---- test/log/0285 | 4 ++++ test/scripts/0000-Basic/0285 | 29 +++++++++++++++++++++++++++++ test/stdout/0285 | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/confs/0285 b/test/confs/0285 index 8b0ada1f1..20ec0263a 100644 --- a/test/confs/0285 +++ b/test/confs/0285 @@ -23,7 +23,7 @@ all: driver = manualroute route_list = * 127.0.0.1 byname self = send - transport = smtp + transport = ${if eq {$domain}{test.ex} {smtp}{magic_smtp}} # ----- Transports ----- @@ -31,10 +31,17 @@ all: begin transports smtp: - driver = smtp - port = PORT_S + driver = smtp + port = PORT_S hosts_try_fastopen = : - max_rcpt = 2 + max_rcpt = 2 + connection_max_messages = 3 + +magic_smtp: + driver = smtp + port = PORT_S + hosts_try_fastopen = : + max_rcpt = ${if match {$domain}{magic(\\d+)} {$1} {2}} connection_max_messages = 3 diff --git a/test/log/0285 b/test/log/0285 index 7828219ce..4da1f42dc 100644 --- a/test/log/0285 +++ b/test/log/0285 @@ -26,3 +26,7 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed 1999-03-02 09:44:33 End queue run: pid=p1235 +1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbB-0005vi-00 => x@magic1.test.ex R=all T=magic_smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmbB-0005vi-00 => y@magic1.test.ex R=all T=magic_smtp H=127.0.0.1 [127.0.0.1]* C="250 OK" +1999-03-02 09:44:33 10HmbB-0005vi-00 Completed diff --git a/test/scripts/0000-Basic/0285 b/test/scripts/0000-Basic/0285 index 1ecc64202..976058fa4 100644 --- a/test/scripts/0000-Basic/0285 +++ b/test/scripts/0000-Basic/0285 @@ -100,3 +100,32 @@ QUIT **** exim -odi -q **** +# +# Extended version of pulling a max_rcpt out of an expansion +# Expect log with two => lines on one conn +server PORT_S +220 ESMTP +EHLO +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +. +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +. +250 OK +QUIT +250 OK +**** +exim -odf x@magic1.test.ex y@magic1.test.ex +**** diff --git a/test/stdout/0285 b/test/stdout/0285 index 256a65070..de6245c6d 100644 --- a/test/stdout/0285 +++ b/test/stdout/0285 @@ -133,3 +133,44 @@ Date: Tue, 2 Mar 1999 09:44:33 +0000 QUIT 250 OK End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +EHLO myhost.test.ex +250-OK +250 HELP +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmbB-0005vi-00; + Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +. +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmbB-0005vi-00; + Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +. +250 OK +QUIT +250 OK +End of script -- cgit v1.2.1