summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-12-23 18:02:25 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2022-12-23 18:07:57 +0000
commit0762e1a4d6de4b7b0206314302297c9dd6d7ae73 (patch)
treea0a06de3ccab66778aaae65bd4c1d1d6e6cdc0bf /test
parent02f746c26c113c1bd97cc25cc75797327eca9434 (diff)
downloadexim4-0762e1a4d6de4b7b0206314302297c9dd6d7ae73.tar.gz
Expand max_rcpt option on smtp transport. Bug 2946
Diffstat (limited to 'test')
-rw-r--r--test/confs/028515
-rw-r--r--test/log/02854
-rw-r--r--test/scripts/0000-Basic/028529
-rw-r--r--test/stdout/028541
4 files changed, 85 insertions, 4 deletions
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:<CALLER@test.ex>
+250 Sender OK
+RCPT TO:<x@magic1.test.ex>
+250 Recipient OK
+DATA
+354 Send data
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <CALLER@test.ex>)
+ id 10HmbB-0005vi-00;
+ Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+.
+250 OK
+MAIL FROM:<CALLER@test.ex>
+250 Sender OK
+RCPT TO:<y@magic1.test.ex>
+250 Recipient OK
+DATA
+354 Send data
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <CALLER@test.ex>)
+ id 10HmbB-0005vi-00;
+ Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+.
+250 OK
+QUIT
+250 OK
+End of script