summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/aux-var-src/tls_conf_prefix3
-rw-r--r--test/confs/00023
-rw-r--r--test/confs/05643
-rw-r--r--test/confs/09003
-rw-r--r--test/confs/09063
-rw-r--r--test/confs/405063
l---------test/confs/40511
l---------test/confs/40521
-rw-r--r--test/confs/405347
-rw-r--r--test/confs/405662
-rw-r--r--test/confs/405850
-rw-r--r--test/confs/406058
-rw-r--r--test/confs/406159
l---------test/confs/40621
l---------test/confs/40631
-rw-r--r--test/confs/406472
-rw-r--r--test/confs/406573
l---------test/confs/40661
l---------test/confs/40671
-rw-r--r--test/confs/59103
-rw-r--r--test/log/40274
-rw-r--r--test/log/40506
-rw-r--r--test/log/405144
-rw-r--r--test/log/405252
-rw-r--r--test/log/405323
-rw-r--r--test/log/405623
-rw-r--r--test/log/405844
-rw-r--r--test/log/406054
-rw-r--r--test/log/406133
-rw-r--r--test/log/406254
-rw-r--r--test/log/406333
-rw-r--r--test/log/406448
-rw-r--r--test/log/406523
-rw-r--r--test/log/406648
-rw-r--r--test/log/406723
-rwxr-xr-xtest/runtest5
-rw-r--r--test/scripts/4050-pipe-conn/4050103
-rw-r--r--test/scripts/4050-pipe-conn/405159
-rw-r--r--test/scripts/4050-pipe-conn/4052243
-rw-r--r--test/scripts/4050-pipe-conn/405331
-rw-r--r--test/scripts/4050-pipe-conn/REQUIRES1
-rw-r--r--test/scripts/4056-pipe-conn-auth/405631
-rw-r--r--test/scripts/4056-pipe-conn-auth/REQUIRES2
-rw-r--r--test/scripts/4058-pipe-conn-tfo/405878
-rw-r--r--test/scripts/4058-pipe-conn-tfo/REQUIRES2
-rw-r--r--test/scripts/4060-pipe-conn-gnutls/406071
-rw-r--r--test/scripts/4060-pipe-conn-gnutls/406143
-rw-r--r--test/scripts/4060-pipe-conn-gnutls/REQUIRES2
-rw-r--r--test/scripts/4062-pipe-conn-openssl/406272
-rw-r--r--test/scripts/4062-pipe-conn-openssl/406343
-rw-r--r--test/scripts/4062-pipe-conn-openssl/REQUIRES2
-rw-r--r--test/scripts/4064-pipe-conn-gnutls-auth/406460
-rw-r--r--test/scripts/4064-pipe-conn-gnutls-auth/406532
-rw-r--r--test/scripts/4064-pipe-conn-gnutls-auth/REQUIRES3
-rw-r--r--test/scripts/4066-pipe-conn-openssl-auth/406661
-rw-r--r--test/scripts/4066-pipe-conn-openssl-auth/406732
-rw-r--r--test/scripts/4066-pipe-conn-openssl-auth/REQUIRES3
-rw-r--r--test/stderr/20134
-rw-r--r--test/stderr/20352
-rw-r--r--test/stderr/21134
-rw-r--r--test/stderr/21352
-rw-r--r--test/stderr/405267
-rw-r--r--test/stdout/4050133
-rw-r--r--test/stdout/4052201
64 files changed, 2404 insertions, 8 deletions
diff --git a/test/aux-var-src/tls_conf_prefix b/test/aux-var-src/tls_conf_prefix
index aa29a2c85..0a14cee24 100644
--- a/test/aux-var-src/tls_conf_prefix
+++ b/test/aux-var-src/tls_conf_prefix
@@ -17,3 +17,6 @@ chunking_advertise_hosts =
.ifdef _HAVE_REQTLS
tls_advertise_requiretls =
.endif
+.ifdef _HAVE_PIPE_CONNECT
+pipelining_connect_advertise_hosts = :
+.endif
diff --git a/test/confs/0002 b/test/confs/0002
index 6ca2d1bcb..165f0a4b2 100644
--- a/test/confs/0002
+++ b/test/confs/0002
@@ -12,6 +12,9 @@ log_file_path = DIR/spool/log/%slog
gecos_pattern = ""
gecos_name = CALLER_NAME
tls_advertise_hosts =
+.ifdef _HAVE_PIPE_CONNECT
+pipelining_connect_advertise_hosts = :
+.endif
# ----- Main settings -----
diff --git a/test/confs/0564 b/test/confs/0564
index 6a23896ef..e01628550 100644
--- a/test/confs/0564
+++ b/test/confs/0564
@@ -9,6 +9,9 @@ gecos_pattern = ""
gecos_name = CALLER_NAME
chunking_advertise_hosts =
tls_advertise_hosts =
+.ifdef _HAVE_PIPE_CONNECT
+pipelining_connect_advertise_hosts =
+.endif
# ----- Main settings -----
diff --git a/test/confs/0900 b/test/confs/0900
index dfb58eb43..caf17be81 100644
--- a/test/confs/0900
+++ b/test/confs/0900
@@ -16,6 +16,9 @@ tls_advertise_hosts = ${if eq {SRV}{tls} {*}}
.ifdef _HAVE_REQTLS
tls_advertise_requiretls = :
.endif
+.ifdef _HAVE_PIPE_CONNECT
+pipelining_connect_advertise_hosts = :
+.endif
# ----- Main settings -----
diff --git a/test/confs/0906 b/test/confs/0906
index 8bb0a9e26..ff99d9304 100644
--- a/test/confs/0906
+++ b/test/confs/0906
@@ -10,6 +10,9 @@ gecos_pattern = ""
gecos_name = CALLER_NAME
chunking_advertise_hosts = *
tls_advertise_hosts = ${if eq {SRV}{tls} {*}}
+.ifdef _HAVE_PIPE_CONNECT
+pipelining_connect_advertise_hosts =
+.endif
# ----- Main settings -----
diff --git a/test/confs/4050 b/test/confs/4050
new file mode 100644
index 000000000..06a85c089
--- /dev/null
+++ b/test/confs/4050
@@ -0,0 +1,63 @@
+# test config 4050
+# Pipelining the early part of the SMTP conversation
+
+CONNECTCOND=
+CONTROL=
+RETRY=7d
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts =
+tls_advertise_hosts =
+
+pipelining_connect_advertise_hosts = CONNECTCOND
+retry_data_expire = RETRY
+log_selector = +received_recipients +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+clientbounce:
+ driver = redirect
+ condition = ${if !def:sender_address}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = CONTROL
+ max_rcpt = 1
+
+#
+begin retry
+
+* * F,5d,1d
+
diff --git a/test/confs/4051 b/test/confs/4051
new file mode 120000
index 000000000..ca1c19b14
--- /dev/null
+++ b/test/confs/4051
@@ -0,0 +1 @@
+4050 \ No newline at end of file
diff --git a/test/confs/4052 b/test/confs/4052
new file mode 120000
index 000000000..ca1c19b14
--- /dev/null
+++ b/test/confs/4052
@@ -0,0 +1 @@
+4050 \ No newline at end of file
diff --git a/test/confs/4053 b/test/confs/4053
new file mode 100644
index 000000000..3a85deeab
--- /dev/null
+++ b/test/confs/4053
@@ -0,0 +1,47 @@
+# test config 4053
+# Early-pipe, CHUNKING
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts = *
+tls_advertise_hosts =
+
+pipelining_connect_advertise_hosts = *
+log_selector = +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = *
+
diff --git a/test/confs/4056 b/test/confs/4056
new file mode 100644
index 000000000..c77c439e4
--- /dev/null
+++ b/test/confs/4056
@@ -0,0 +1,62 @@
+# test config 4056
+# Early-pipe, AUTH (no TLS!)
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts =
+tls_advertise_hosts =
+
+pipelining_connect_advertise_hosts = *
+auth_advertise_hosts = *
+log_selector = +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = *
+ hosts_require_auth = *
+
+#
+begin authenticators
+
+plain:
+ driver = plaintext
+ public_name = PLAIN
+
+ server_condition = "\
+ ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
+ server_set_id = $auth2
+
+ client_send = ^userx^secret
+
diff --git a/test/confs/4058 b/test/confs/4058
new file mode 100644
index 000000000..887427a57
--- /dev/null
+++ b/test/confs/4058
@@ -0,0 +1,50 @@
+# test config 4058
+# Early-pipelining with TCP Fast Open
+
+OPT=
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+log_selector = +received_recipients +millisec +pipelining
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts = OPT
+tls_advertise_hosts =
+
+pipelining_connect_advertise_hosts = *
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_try_fastopen = *
+ hosts_pipe_connect = *
+
diff --git a/test/confs/4060 b/test/confs/4060
new file mode 100644
index 000000000..935d49fe1
--- /dev/null
+++ b/test/confs/4060
@@ -0,0 +1,58 @@
+# test config 4060
+# Pipelining the early part of the SMTP conversation, starttls
+
+CONTROL=*
+OPT=
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts = OPT
+tls_advertise_hosts = *
+tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+
+# Avoid ECDHE key-exchange so that we can wireshark-decode
+.ifdef _HAVE_GNUTLS
+tls_require_ciphers = NORMAL:-KX-ALL:+RSA
+.endif
+
+pipelining_connect_advertise_hosts = *
+log_selector = +received_recipients +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = CONTROL
+ tls_verify_hosts =
+ tls_try_verify_hosts =
+
diff --git a/test/confs/4061 b/test/confs/4061
new file mode 100644
index 000000000..3ff106f8b
--- /dev/null
+++ b/test/confs/4061
@@ -0,0 +1,59 @@
+# test config 4061
+# Pipelining the early part of the SMTP conversation, tls-on-connect
+
+CONTROL=*
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts =
+tls_on_connect_ports = PORT_D
+tls_advertise_hosts = *
+tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+
+# Avoid ECDHE key-exchange so that we can wireshark-decode
+.ifdef _HAVE_GNUTLS
+tls_require_ciphers = NORMAL:-KX-ALL:+RSA
+.endif
+
+pipelining_connect_advertise_hosts = *
+log_selector = +received_recipients +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = CONTROL
+ protocol = smtps
+ tls_verify_hosts =
+ tls_try_verify_hosts =
+
diff --git a/test/confs/4062 b/test/confs/4062
new file mode 120000
index 000000000..f9a2604f2
--- /dev/null
+++ b/test/confs/4062
@@ -0,0 +1 @@
+4060 \ No newline at end of file
diff --git a/test/confs/4063 b/test/confs/4063
new file mode 120000
index 000000000..723e8a8a0
--- /dev/null
+++ b/test/confs/4063
@@ -0,0 +1 @@
+4061 \ No newline at end of file
diff --git a/test/confs/4064 b/test/confs/4064
new file mode 100644
index 000000000..8c3c300a5
--- /dev/null
+++ b/test/confs/4064
@@ -0,0 +1,72 @@
+# test config 4064
+# Early-pipe, AUTH, GnuTLS
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts = OPT
+tls_advertise_hosts = *
+tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+
+# Avoid ECDHE key-exchange so that we can wireshark-decode
+.ifdef _HAVE_GNUTLS
+tls_require_ciphers = NORMAL:-KX-ALL:+RSA
+.endif
+
+pipelining_connect_advertise_hosts = *
+auth_advertise_hosts = *
+
+log_selector = +received_recipients +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = *
+ tls_verify_hosts =
+ tls_try_verify_hosts =
+ hosts_require_auth = *
+
+#
+begin authenticators
+
+plain:
+ driver = plaintext
+ public_name = PLAIN
+
+ server_advertise_condition = ${if eq{$tls_in_cipher}{}{no}{yes}}
+ server_condition = "\
+ ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
+ server_set_id = $auth2
+
+ client_send = ^userx^secret
+
diff --git a/test/confs/4065 b/test/confs/4065
new file mode 100644
index 000000000..dcf0d6f5d
--- /dev/null
+++ b/test/confs/4065
@@ -0,0 +1,73 @@
+# test config 4065
+# Early-pipe, AUTH, GnuTLS, tls-on-connect
+
+keep_environment = PATH
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+
+.ifdef SERVER
+log_file_path = DIR/spool/log/SERVER%slog
+.else
+log_file_path = DIR/spool/log/%slog
+.endif
+
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+dns_cname_loops = 9
+chunking_advertise_hosts =
+tls_on_connect_ports = PORT_D
+tls_advertise_hosts = *
+tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail}
+
+# Avoid ECDHE key-exchange so that we can wireshark-decode
+.ifdef _HAVE_GNUTLS
+tls_require_ciphers = NORMAL:-KX-ALL:+RSA
+.endif
+
+pipelining_connect_advertise_hosts = *
+auth_advertise_hosts = *
+
+log_selector = +received_recipients +pipelining
+queue_only
+
+acl_smtp_rcpt = accept
+
+#
+begin routers
+
+server:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}}
+ data = :blackhole:
+
+client:
+ driver = manualroute
+ route_data = 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+#
+begin transports
+
+smtp:
+ driver = smtp
+ hosts_pipe_connect = *
+ protocol = smtps
+ tls_verify_hosts =
+ tls_try_verify_hosts =
+ hosts_require_auth = *
+
+#
+begin authenticators
+
+plain:
+ driver = plaintext
+ public_name = PLAIN
+
+ server_condition = "\
+ ${if and {{eq{$auth2}{userx}}{eq{$auth3}{secret}}}{yes}{no}}"
+ server_set_id = $auth2
+
+ client_send = ^userx^secret
+
diff --git a/test/confs/4066 b/test/confs/4066
new file mode 120000
index 000000000..8d736b10e
--- /dev/null
+++ b/test/confs/4066
@@ -0,0 +1 @@
+4064 \ No newline at end of file
diff --git a/test/confs/4067 b/test/confs/4067
new file mode 120000
index 000000000..ddeca2101
--- /dev/null
+++ b/test/confs/4067
@@ -0,0 +1 @@
+4065 \ No newline at end of file
diff --git a/test/confs/5910 b/test/confs/5910
index 2437758bf..55838b3db 100644
--- a/test/confs/5910
+++ b/test/confs/5910
@@ -21,6 +21,9 @@ log_file_path = DIR/spool/log/%slog
gecos_pattern = ""
gecos_name = CALLER_NAME
chunking_advertise_hosts =
+.ifdef _HAVE_PIPE_CONNECT
+pipelining_connect_advertise_hosts =
+.endif
primary_hostname = myhost.test.ex
diff --git a/test/log/4027 b/test/log/4027
index 7df91966f..06903fe7f 100644
--- a/test/log/4027
+++ b/test/log/4027
@@ -2,8 +2,8 @@
1999-03-02 09:44:33 10HmaX-0005vi-00 => user_tfo@test.ex R=my_main_router T=my_smtp H=127.0.0.1 [127.0.0.1]:1224 PRX=[127.0.0.1]:1225 C="250 accepted OK"
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
-1999-03-02 09:44:33 10HmaY-0005vi-00 => user_tfo@test.ex R=my_main_router T=my_smtp H=127.0.0.1 [127.0.0.1]:1224 PRX=[127.0.0.1]:1225 TFO C="250 accepted OK"
+1999-03-02 09:44:33 10HmaY-0005vi-00 => user_tfo@test.ex R=my_main_router T=my_smtp H=127.0.0.1 [127.0.0.1]:1224 PRX=[127.0.0.1]:1225 C="250 accepted OK"
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss
-1999-03-02 09:44:33 10HmaZ-0005vi-00 => user_tfo@test.ex R=my_main_router T=my_smtp H=127.0.0.1 [127.0.0.1]:1224 PRX=[127.0.0.1]:1225 TFO C="250 accepted OK"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => user_tfo@test.ex R=my_main_router T=my_smtp H=127.0.0.1 [127.0.0.1]:1224 PRX=[127.0.0.1]:1225 TFO* C="250 accepted OK"
1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
diff --git a/test/log/4050 b/test/log/4050
new file mode 100644
index 000000000..bd994fe1f
--- /dev/null
+++ b/test/log/4050
@@ -0,0 +1,6 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= a@test.ex H=(testclient) [127.0.0.1] P=esmtp L* S=sss for a@test.ex
diff --git a/test/log/4051 b/test/log/4051
new file mode 100644
index 000000000..00fa3ebc9
--- /dev/null
+++ b/test/log/4051
@@ -0,0 +1,44 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for notadvertised@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => notadvertised@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for clientno@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 => clientno@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L S=sss id=E10HmaX-0005vi-00@the.local.host.name for notadvertised@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <notadvertised@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. S=sss id=E10HmaZ-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L* S=sss id=E10HmbB-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. S=sss id=E10HmbD-0005vi-00@the.local.host.name for clientno@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <clientno@test.ex> R=server
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4052 b/test/log/4052
new file mode 100644
index 000000000..91fc0b78b
--- /dev/null
+++ b/test/log/4052
@@ -0,0 +1,52 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for client_old@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => client_old@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache2@test.ex withcache2@test.ex badbanner@test.ex
+1999-03-02 09:44:33 10HmbD-0005vi-00 => nocache2@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 message accepted"
+1999-03-02 09:44:33 10HmbD-0005vi-00 => withcache2@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 message accepted"
+1999-03-02 09:44:33 10HmbD-0005vi-00 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 450 sorry no banner for you today
+1999-03-02 09:44:33 10HmbD-0005vi-00 == badbanner@test.ex R=client T=smtp defer (0) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 450 sorry no banner for you today
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex withcache@test.ex baddata@test.ex badrcpt@test.ex badmail@test.ex withcache2@test.ex
+1999-03-02 09:44:33 10HmbE-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 message accepted"
+1999-03-02 09:44:33 10HmbE-0005vi-00 => withcache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 message accepted"
+1999-03-02 09:44:33 10HmbE-0005vi-00 ** baddata@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 550 obscure data error
+1999-03-02 09:44:33 10HmbE-0005vi-00 ** badrcpt@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<badrcpt@test.ex>: 550 rcpt refused
+1999-03-02 09:44:33 10HmbE-0005vi-00 ** badmail@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:<CALLER@the.local.host.name>: 550 mail cmd refused
+1999-03-02 09:44:33 10HmbE-0005vi-00 => withcache2@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 message accepted"
+1999-03-02 09:44:33 10HmbF-0005vi-00 <= <> R=10HmbE-0005vi-00 U=EXIMUSER P=local S=sss for CALLER@the.local.host.name
+1999-03-02 09:44:33 10HmbF-0005vi-00 => :blackhole: <CALLER@the.local.host.name> R=clientbounce
+1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for extchange@test.ex
+1999-03-02 09:44:33 10HmbG-0005vi-00 => extchange@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 message accepted"
+1999-03-02 09:44:33 10HmbG-0005vi-00 Completed
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L* S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. S=sss id=E10HmbB-0005vi-00@the.local.host.name for client_old@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <client_old@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4053 b/test/log/4053
new file mode 100644
index 000000000..758be7c40
--- /dev/null
+++ b/test/log/4053
@@ -0,0 +1,23 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => b@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. K S=sss id=E10HmaX-0005vi-00@the.local.host.name
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <a@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L* K S=sss id=E10HmaZ-0005vi-00@the.local.host.name
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <b@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4056 b/test/log/4056
new file mode 100644
index 000000000..03f13aebd
--- /dev/null
+++ b/test/log/4056
@@ -0,0 +1,23 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] A=plain L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => b@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] A=plain L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpa L. A=plain:userx S=sss id=E10HmaX-0005vi-00@the.local.host.name
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <a@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpa L* A=plain:userx S=sss id=E10HmaZ-0005vi-00@the.local.host.name
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <b@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4058 b/test/log/4058
new file mode 100644
index 000000000..21ce510cb
--- /dev/null
+++ b/test/log/4058
@@ -0,0 +1,44 @@
+2017-07-30 18:51:05.712 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L C="250 OK id=10HmaY-0005vi-00"
+2017-07-30 18:51:05.712 10HmaX-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] TFO* L* C="250 OK id=10HmbA-0005vi-00"
+2017-07-30 18:51:05.712 10HmaZ-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbB-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] TFO L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-0005vi-00"
+2017-07-30 18:51:05.712 10HmbB-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for chunking@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbD-0005vi-00 => chunking@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] TFO* L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00"
+2017-07-30 18:51:05.712 10HmbD-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+
+******** SERVER ********
+2017-07-30 18:51:05.712 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+2017-07-30 18:51:05.712 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp L. S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+2017-07-30 18:51:05.712 10HmaY-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] TFO* P=esmtp L* S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+2017-07-30 18:51:05.712 10HmbA-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+2017-07-30 18:51:05.712 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+2017-07-30 18:51:05.712 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] TFO P=esmtp L. K S=sss id=E10HmbB-0005vi-00@the.local.host.name for nocache@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbC-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+2017-07-30 18:51:05.712 10HmbC-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] TFO* P=esmtp L* K S=sss id=E10HmbD-0005vi-00@the.local.host.name for chunking@test.ex
+2017-07-30 18:51:05.712 Start queue run: pid=pppp
+2017-07-30 18:51:05.712 10HmbE-0005vi-00 => :blackhole: <chunking@test.ex> R=server
+2017-07-30 18:51:05.712 10HmbE-0005vi-00 Completed
+2017-07-30 18:51:05.712 End queue run: pid=pppp
diff --git a/test/log/4060 b/test/log/4060
new file mode 100644
index 000000000..cb227a6bc
--- /dev/null
+++ b/test/log/4060
@@ -0,0 +1,54 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for clientno@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => clientno@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbF-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbF-0005vi-00 => chunking@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbG-0005vi-00"
+1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmbB-0005vi-00@the.local.host.name for clientno@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <clientno@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no K S=sss id=E10HmbD-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no K S=sss id=E10HmbF-0005vi-00@the.local.host.name for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbG-0005vi-00 => :blackhole: <chunking@test.ex> R=server
+1999-03-02 09:44:33 10HmbG-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4061 b/test/log/4061
new file mode 100644
index 000000000..d1edf2dea
--- /dev/null
+++ b/test/log/4061
@@ -0,0 +1,33 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for clientno@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => clientno@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no L C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTPS on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmbB-0005vi-00@the.local.host.name for clientno@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <clientno@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4062 b/test/log/4062
new file mode 100644
index 000000000..6302a8bb2
--- /dev/null
+++ b/test/log/4062
@@ -0,0 +1,54 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for a@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for b@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => b@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for c@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => c@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbF-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbF-0005vi-00 => chunking@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbG-0005vi-00"
+1999-03-02 09:44:33 10HmbF-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmaX-0005vi-00@the.local.host.name for a@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <a@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmaZ-0005vi-00@the.local.host.name for b@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <b@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmbB-0005vi-00@the.local.host.name for c@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <c@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no K S=sss id=E10HmbD-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no K S=sss id=E10HmbF-0005vi-00@the.local.host.name for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbG-0005vi-00 => :blackhole: <chunking@test.ex> R=server
+1999-03-02 09:44:33 10HmbG-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4063 b/test/log/4063
new file mode 100644
index 000000000..090c36d41
--- /dev/null
+++ b/test/log/4063
@@ -0,0 +1,33 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for a@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for b@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => b@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for c@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => c@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no L C="250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTPS on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmaX-0005vi-00@the.local.host.name for a@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <a@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmaZ-0005vi-00@the.local.host.name for b@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <b@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtps L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no S=sss id=E10HmbB-0005vi-00@the.local.host.name for c@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <c@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4064 b/test/log/4064
new file mode 100644
index 000000000..0d89b0ebb
--- /dev/null
+++ b/test/log/4064
@@ -0,0 +1,48 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 => chunking@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain:userx S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain:userx S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain:userx K S=sss id=E10HmbB-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain:userx K S=sss id=E10HmbD-0005vi-00@the.local.host.name for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <chunking@test.ex> R=server
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4065 b/test/log/4065
new file mode 100644
index 000000000..dd3534270
--- /dev/null
+++ b/test/log/4065
@@ -0,0 +1,23 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTPS on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L. X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain:userx S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no A=plain:userx S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4066 b/test/log/4066
new file mode 100644
index 000000000..8daec2d56
--- /dev/null
+++ b/test/log/4066
@@ -0,0 +1,48 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbB-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain L K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbC-0005vi-00"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbD-0005vi-00 => chunking@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain L* K C="250- 3nn byte chunk, total 3nn\\n250 OK id=10HmbE-0005vi-00"
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain:userx S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 no IP address found for host OPT (during SMTP connection from localhost (the.local.host.name) [127.0.0.1])
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain:userx S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain:userx K S=sss id=E10HmbB-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmbC-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain:userx K S=sss id=E10HmbD-0005vi-00@the.local.host.name for chunking@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbE-0005vi-00 => :blackhole: <chunking@test.ex> R=server
+1999-03-02 09:44:33 10HmbE-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4067 b/test/log/4067
new file mode 100644
index 000000000..11d59e3d8
--- /dev/null
+++ b/test/log/4067
@@ -0,0 +1,23 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => nocache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain L C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => hascache@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain L* C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTPS on port 1225
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L. X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain:userx S=sss id=E10HmaX-0005vi-00@the.local.host.name for nocache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: <nocache@test.ex> R=server
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtpsa L* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no A=plain:userx S=sss id=E10HmaZ-0005vi-00@the.local.host.name for hascache@test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: <hascache@test.ex> R=server
+1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/runtest b/test/runtest
index 3814261f3..76e1177c5 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1119,6 +1119,9 @@ RESET_AFTER_EXTRA_LINE_READ:
# TCP Fast Open
next if /^(ppppp )?setsockopt FASTOPEN: Network Error/;
+ # Experimental_PIPE_CONNECT
+ next if / in (pipelining_connect_advertise_hosts|hosts_pipe_connect)?\? no /;
+
# Environment cleaning
next if /\w+ in keep_environment\? (yes|no)/;
@@ -1628,9 +1631,11 @@ $munges =
{ 'stdout' => '/^(
dkim_(canon|domain|private_key|selector|sign_headers|strict|hash|identity|timestamps)
|gnutls_require_(kx|mac|protocols)
+ |hosts_pipe_connect
|hosts_(requ(est|ire)|try)_(dane|ocsp)
|dane_require_tls_ciphers
|hosts_(avoid|nopass|noproxy|require|verify_avoid)_tls
+ |pipelining_connect_advertise_hosts
|socks_proxy
|tls_[^ ]*
|utf8_downconvert
diff --git a/test/scripts/4050-pipe-conn/4050 b/test/scripts/4050-pipe-conn/4050
new file mode 100644
index 000000000..9dc04576f
--- /dev/null
+++ b/test/scripts/4050-pipe-conn/4050
@@ -0,0 +1,103 @@
+# pipelined connect, server
+
+# not advertised when not wanted
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+client 127.0.0.1 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250 HELP
+QUIT
+??? 221
+****
+killdaemon
+#
+# advertised when wanted
+exim -bd -DSERVER=server -DCONNECTCOND=127.0.0.1 -oX PORT_D
+****
+#
+client 127.0.0.1 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+??? 250 HELP
+QUIT
+??? 221
+****
+killdaemon
+#
+# Client does not wait for banner
+exim -bd -DSERVER=server -DCONNECTCOND=127.0.0.1 -oX PORT_D
+****
+#
+client 127.0.0.1 PORT_D
+EHLO testclient
+??? 220
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+??? 250 HELP
+QUIT
+??? 221
+****
+# No banner wait; pipelined MAIL
+client 127.0.0.1 PORT_D
+EHLO testclient\r\nMAIL FROM:<a@test.ex>
+??? 220
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+??? 250 HELP
+??? 250
+QUIT
+??? 221
+****
+# No banner wait; pipelined MAIL,RCPT
+client 127.0.0.1 PORT_D
+EHLO testclient\r\nMAIL FROM:<a@test.ex>\r\nRCPT TO:<a@test.ex>
+??? 220
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+??? 250 HELP
+??? 250
+??? 250
+QUIT
+??? 221
+****
+# No banner wait; pipelined MAIL,RCPT,DATA
+client 127.0.0.1 PORT_D
+EHLO testclient\r\nMAIL FROM:<a@test.ex>\r\nRCPT TO:<a@test.ex>\r\nDATA
+??? 220
+??? 250-
+??? 250-SIZE
+??? 250-8BITMIME
+??? 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+??? 250 HELP
+??? 250
+??? 250
+??? 354
+.
+??? 250
+QUIT
+??? 221
+****
+#
+killdaemon
+no_msglog_check
diff --git a/test/scripts/4050-pipe-conn/4051 b/test/scripts/4050-pipe-conn/4051
new file mode 100644
index 000000000..45e4b7410
--- /dev/null
+++ b/test/scripts/4050-pipe-conn/4051
@@ -0,0 +1,59 @@
+# pipelined-connect, client
+#
+# Not attempted when not advertised
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim notadvertised@test.ex
+Subject: test 1
+
+****
+exim -DCONTROL=127.0.0.1 -q
+****
+killdaemon
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -DCONNECTCOND=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 2
+
+****
+exim -DCONTROL=127.0.0.1 -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 3
+
+****
+exim -DCONTROL=127.0.0.1 -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+# Check that client doesn't try when not told to, even now there is
+# a cache entry
+exim clientno@test.ex
+Subject test 4
+
+****
+exim -DCONTROL=: -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4050-pipe-conn/4052 b/test/scripts/4050-pipe-conn/4052
new file mode 100644
index 000000000..d41cf8123
--- /dev/null
+++ b/test/scripts/4050-pipe-conn/4052
@@ -0,0 +1,243 @@
+# pipelined-connect, cache invalidation
+#
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -DCONNECTCOND=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -DCONTROL=127.0.0.1 -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -DCONTROL=127.0.0.1 -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+# Check that client doesn't try when the cache entry is too old
+# It will however create a new entry
+sleep 2
+#
+exim client_old@test.ex
+Subject test 3
+
+****
+exim -DRETRY=1s -DCONTROL=127.0.0.1 -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+killdaemon
+#
+#
+#
+sudo rm DIR/spool/db/misc
+#
+# Check that the cache is invalidated on SMTP errors from the server for the banner
+#
+server PORT_D 3
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+.
+>250 message accepted
+<QUIT
+>220 bye
+*eof
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+.
+>250 message accepted
+<QUIT
+>220 bye
+*eof
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>450 sorry no banner for you today
+>550 sync error
+>550 sync error
+>550 sync error
+>550 sync error
+<QUIT
+>>220 bye
+*eof
+****
+exim -DCONTROL=127.0.0.1 -odi nocache2@test.ex withcache2@test.ex badbanner@test.ex
+body 2
+****
+#
+# Check that the cache is not invalidated on SMTP errors from the server after early-pipelining
+#
+server PORT_D 6
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+.
+>250 message accepted
+<QUIT
+>220 bye
+*eof
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+.
+>250 message accepted
+<QUIT
+>220 bye
+*eof
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>220 banner
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+>250 mail good
+>250 rcpt good
+>550 obscure data error
+<QUIT
+>>220 bye
+*eof
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>220 banner
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+>250 mail good
+>550 rcpt refused
+>550 data cmd rejected - no valid recipient
+<QUIT
+>>220 bye
+*eof
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>220 banner
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+>550 mail cmd refused
+>550 rcpt cmd rejected - no valid mail
+>550 data cmd rejected - no valid mail
+<QUIT
+>>220 bye
+*eof
+*sleep 2
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+.
+>250 message accepted
+<QUIT
+>220 bye
+*eof
+****
+exim -DCONTROL=127.0.0.1 -odi nocache@test.ex withcache@test.ex baddata@test.ex badrcpt@test.ex badmail@test.ex withcache2@test.ex
+body
+****
+#
+#
+# Check that the cache is updated on a change of advertised extensions
+# The conn will be made pipelined anyway (because we don't find out early)
+# but it's the DB dump that matters. Unfortunately the dump doesn't show
+# us the (binary) record content, only the key. So you need to look at the
+# debug output after all.
+server PORT_D 1
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250-STARTTLS
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+.
+>250 message accepted
+<QUIT
+>220 bye
+*eof
+****
+exim -d-all+transport -DCONTROL=127.0.0.1 -odi extchange@test.ex
+body
+****
+dump misc
+#
+no_msglog_check
diff --git a/test/scripts/4050-pipe-conn/4053 b/test/scripts/4050-pipe-conn/4053
new file mode 100644
index 000000000..eea284f6e
--- /dev/null
+++ b/test/scripts/4050-pipe-conn/4053
@@ -0,0 +1,31 @@
+# CHUNKING
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim a@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim b@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4050-pipe-conn/REQUIRES b/test/scripts/4050-pipe-conn/REQUIRES
new file mode 100644
index 000000000..fd2535fa5
--- /dev/null
+++ b/test/scripts/4050-pipe-conn/REQUIRES
@@ -0,0 +1 @@
+support Experimental_PIPE_CONNECT
diff --git a/test/scripts/4056-pipe-conn-auth/4056 b/test/scripts/4056-pipe-conn-auth/4056
new file mode 100644
index 000000000..403cf621c
--- /dev/null
+++ b/test/scripts/4056-pipe-conn-auth/4056
@@ -0,0 +1,31 @@
+# AUTH
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim a@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do (limited) early-pipelinng.
+exim b@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4056-pipe-conn-auth/REQUIRES b/test/scripts/4056-pipe-conn-auth/REQUIRES
new file mode 100644
index 000000000..9ae94aaaf
--- /dev/null
+++ b/test/scripts/4056-pipe-conn-auth/REQUIRES
@@ -0,0 +1,2 @@
+support Experimental_PIPE_CONNECT
+authenticator plaintext
diff --git a/test/scripts/4058-pipe-conn-tfo/4058 b/test/scripts/4058-pipe-conn-tfo/4058
new file mode 100644
index 000000000..3a388a2d9
--- /dev/null
+++ b/test/scripts/4058-pipe-conn-tfo/4058
@@ -0,0 +1,78 @@
+# Early-pipelining, with TFO
+#
+#
+# Packet delays so we can see TFO operational in packet captures
+sudo perl
+system ("tc qdisc add dev lo root netem delay 50ms");
+****
+#
+# Wipe any stored TFO cookie, to start from known state.
+sudo perl
+system ("ip tcp_metrics delete 127.0.0.1");
+****
+#
+#
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+# No early-pipe cache yet. Run one through to prime it;
+# this should not use early-pipe despite both the client & server being enabled.
+# Should also prime the TFO cookie cache.
+exim nocache@test.ex
+Subject: tfo test
+
+Testing
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Having primed the cache, this one should use it.
+exim hascache@test.ex
+Subject: tfo test 2
+
+Testing
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+# Again, with CHUNKING
+sudo rm DIR/spool/db/misc
+exim -bd -DSERVER=server -DOPT=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject: tfo test 3
+
+Testing
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+exim chunking@test.ex
+Subject: tfo test 4
+
+Testing
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+sudo perl
+system ("tc qdisc delete dev lo root");
+****
+#
+no_msglog_check
diff --git a/test/scripts/4058-pipe-conn-tfo/REQUIRES b/test/scripts/4058-pipe-conn-tfo/REQUIRES
new file mode 100644
index 000000000..c18c49b2e
--- /dev/null
+++ b/test/scripts/4058-pipe-conn-tfo/REQUIRES
@@ -0,0 +1,2 @@
+support Experimental_PIPE_CONNECT
+support TCP_Fast_Open
diff --git a/test/scripts/4060-pipe-conn-gnutls/4060 b/test/scripts/4060-pipe-conn-gnutls/4060
new file mode 100644
index 000000000..b07c5c07d
--- /dev/null
+++ b/test/scripts/4060-pipe-conn-gnutls/4060
@@ -0,0 +1,71 @@
+# starttls
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+# Check that client doesn't try when not told to, even now there is
+# a cache entry
+exim clientno@test.ex
+Subject test 3
+
+****
+exim -DCONTROL=: -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+#
+# And again with CHUNKING
+sudo rm DIR/spool/db/misc
+exim -bd -DSERVER=server -DOPT=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 4
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it
+exim chunking@test.ex
+Subject test 5
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+killdaemon
+no_msglog_check
diff --git a/test/scripts/4060-pipe-conn-gnutls/4061 b/test/scripts/4060-pipe-conn-gnutls/4061
new file mode 100644
index 000000000..e4922b86b
--- /dev/null
+++ b/test/scripts/4060-pipe-conn-gnutls/4061
@@ -0,0 +1,43 @@
+# tls-on-connect
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+# Check that client doesn't try when not told to, even now there is
+# a cache entry
+exim clientno@test.ex
+Subject test 3
+
+****
+exim -DCONTROL=: -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4060-pipe-conn-gnutls/REQUIRES b/test/scripts/4060-pipe-conn-gnutls/REQUIRES
new file mode 100644
index 000000000..36c96e737
--- /dev/null
+++ b/test/scripts/4060-pipe-conn-gnutls/REQUIRES
@@ -0,0 +1,2 @@
+support Experimental_PIPE_CONNECT
+support GnuTLS
diff --git a/test/scripts/4062-pipe-conn-openssl/4062 b/test/scripts/4062-pipe-conn-openssl/4062
new file mode 100644
index 000000000..87b156c6c
--- /dev/null
+++ b/test/scripts/4062-pipe-conn-openssl/4062
@@ -0,0 +1,72 @@
+# starttls
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim a@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim b@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+# Check that client doesn't try when not told to, even now there is
+# a cache entry
+exim c@test.ex
+Subject test 3
+
+****
+exim -DCONTROL=: -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+#
+# And again with CHUNKING
+sudo rm DIR/spool/db/misc
+exim -bd -DSERVER=server -DOPT=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 4
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it
+exim chunking@test.ex
+Subject test 5
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4062-pipe-conn-openssl/4063 b/test/scripts/4062-pipe-conn-openssl/4063
new file mode 100644
index 000000000..cdf2d96a1
--- /dev/null
+++ b/test/scripts/4062-pipe-conn-openssl/4063
@@ -0,0 +1,43 @@
+# tls-on-connect
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim a@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim b@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+# Check that client doesn't try when not told to, even now there is
+# a cache entry
+exim c@test.ex
+Subject test 3
+
+****
+exim -DCONTROL=: -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4062-pipe-conn-openssl/REQUIRES b/test/scripts/4062-pipe-conn-openssl/REQUIRES
new file mode 100644
index 000000000..3863ae742
--- /dev/null
+++ b/test/scripts/4062-pipe-conn-openssl/REQUIRES
@@ -0,0 +1,2 @@
+support Experimental_PIPE_CONNECT
+support OpenSSL
diff --git a/test/scripts/4064-pipe-conn-gnutls-auth/4064 b/test/scripts/4064-pipe-conn-gnutls-auth/4064
new file mode 100644
index 000000000..62be1e291
--- /dev/null
+++ b/test/scripts/4064-pipe-conn-gnutls-auth/4064
@@ -0,0 +1,60 @@
+# starttls
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+killdaemon
+#
+#
+#
+# And again with CHUNKING
+sudo rm DIR/spool/db/misc
+exim -bd -DSERVER=server -DOPT=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 4
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it
+exim chunking@test.ex
+Subject test 5
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+killdaemon
+no_msglog_check
diff --git a/test/scripts/4064-pipe-conn-gnutls-auth/4065 b/test/scripts/4064-pipe-conn-gnutls-auth/4065
new file mode 100644
index 000000000..819e4295a
--- /dev/null
+++ b/test/scripts/4064-pipe-conn-gnutls-auth/4065
@@ -0,0 +1,32 @@
+# tls-on-connect
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4064-pipe-conn-gnutls-auth/REQUIRES b/test/scripts/4064-pipe-conn-gnutls-auth/REQUIRES
new file mode 100644
index 000000000..fafecf0fe
--- /dev/null
+++ b/test/scripts/4064-pipe-conn-gnutls-auth/REQUIRES
@@ -0,0 +1,3 @@
+support Experimental_PIPE_CONNECT
+support GnuTLS
+authenticator plaintext
diff --git a/test/scripts/4066-pipe-conn-openssl-auth/4066 b/test/scripts/4066-pipe-conn-openssl-auth/4066
new file mode 100644
index 000000000..3dc16bbe1
--- /dev/null
+++ b/test/scripts/4066-pipe-conn-openssl-auth/4066
@@ -0,0 +1,61 @@
+# starttls
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+killdaemon
+#
+#
+#
+# And again with CHUNKING
+sudo rm DIR/spool/db/misc
+exim -bd -DSERVER=server -DOPT=* -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 4
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it
+exim chunking@test.ex
+Subject test 5
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+killdaemon
+no_msglog_check
diff --git a/test/scripts/4066-pipe-conn-openssl-auth/4067 b/test/scripts/4066-pipe-conn-openssl-auth/4067
new file mode 100644
index 000000000..819e4295a
--- /dev/null
+++ b/test/scripts/4066-pipe-conn-openssl-auth/4067
@@ -0,0 +1,32 @@
+# tls-on-connect
+#
+# Not attempted without a cache entry
+exim -bd -DSERVER=server -oX PORT_D
+****
+#
+exim nocache@test.ex
+Subject test 1
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+# Go for it. This one should do early-pipelinng.
+exim hascache@test.ex
+Subject test 2
+
+****
+exim -q
+****
+exim -DNOTDAEMON -DSERVER=server -q
+****
+#
+#
+#
+killdaemon
+#
+no_msglog_check
diff --git a/test/scripts/4066-pipe-conn-openssl-auth/REQUIRES b/test/scripts/4066-pipe-conn-openssl-auth/REQUIRES
new file mode 100644
index 000000000..e58e0f91a
--- /dev/null
+++ b/test/scripts/4066-pipe-conn-openssl-auth/REQUIRES
@@ -0,0 +1,3 @@
+support Experimental_PIPE_CONNECT
+support OpenSSL
+authenticator plaintext
diff --git a/test/stderr/2013 b/test/stderr/2013
index d050ebd30..fb8bd4008 100644
--- a/test/stderr/2013
+++ b/test/stderr/2013
@@ -68,12 +68,12 @@ cmd buf flush ddd bytes
SMTP>> QUIT
cmd buf flush ddd bytes
SMTP(close)>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: MAIN
=> usery@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmbC-0005vi-00"
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
->>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: queue_run MAIN
End queue run: pid=pppp -qqf
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
@@ -147,12 +147,12 @@ cmd buf flush ddd bytes
SMTP>> QUIT
cmd buf flush ddd bytes
SMTP(close)>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: MAIN
=> userb@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmbI-0005vi-00"
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
->>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: queue_run MAIN
End queue run: pid=pppp -qqf
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
diff --git a/test/stderr/2035 b/test/stderr/2035
index 4f72f35c2..c1fb86309 100644
--- a/test/stderr/2035
+++ b/test/stderr/2035
@@ -68,12 +68,12 @@ ok=1 send_quit=1 send_rset=0 continue_more=0 yield=0 first_address is NULL
SMTP>> QUIT
cmd buf flush ddd bytes
SMTP(close)>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
Leaving t1 transport
LOG: MAIN
=> userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00"
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
->>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
******** SERVER ********
diff --git a/test/stderr/2113 b/test/stderr/2113
index 026cd28b6..8ea042eaa 100644
--- a/test/stderr/2113
+++ b/test/stderr/2113
@@ -68,12 +68,12 @@ cmd buf flush ddd bytes
SMTP>> QUIT
cmd buf flush ddd bytes
SMTP(close)>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: MAIN
=> usery@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no C="250 OK id=10HmbC-0005vi-00"
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
->>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: queue_run MAIN
End queue run: pid=pppp -qqf
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
@@ -147,12 +147,12 @@ cmd buf flush ddd bytes
SMTP>> QUIT
cmd buf flush ddd bytes
SMTP(close)>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: MAIN
=> userb@test.ex R=cl_override T=send_to_server H=127.0.0.1 [127.0.0.1]* X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no C="250 OK id=10HmbI-0005vi-00"
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
->>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
LOG: queue_run MAIN
End queue run: pid=pppp -qqf
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
diff --git a/test/stderr/2135 b/test/stderr/2135
index db08f08a3..1e323ed1e 100644
--- a/test/stderr/2135
+++ b/test/stderr/2135
@@ -68,12 +68,12 @@ ok=1 send_quit=1 send_rset=0 continue_more=0 yield=0 first_address is NULL
SMTP>> QUIT
cmd buf flush ddd bytes
SMTP(close)>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
Leaving t1 transport
LOG: MAIN
=> userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLSv1:ke-RSA-AES256-SHA:xxx CV=no C="250 OK id=10HmaY-0005vi-00"
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
->>>>>>>>>>>>>>>> Exim pid=pppp (TLS proxy) terminating with rc=0 >>>>>>>>>>>>>>>>
******** SERVER ********
diff --git a/test/stderr/4052 b/test/stderr/4052
new file mode 100644
index 000000000..35739f170
--- /dev/null
+++ b/test/stderr/4052
@@ -0,0 +1,67 @@
+Exim version x.yz ....
+configuration file is TESTSUITE/test-config
+admin user
+LOG: MAIN
+ <= CALLER@the.local.host.name U=CALLER P=local S=sss
+Exim version x.yz ....
+configuration file is TESTSUITE/test-config
+trusted user
+admin user
+>>>>>>>>>>>>>>>> Remote deliveries >>>>>>>>>>>>>>>>
+--------> extchange@test.ex <--------
+smtp transport entered
+ extchange@test.ex
+hostlist:
+ '127.0.0.1' IP 127.0.0.1 port 1225
+checking status of 127.0.0.1
+no host retry record
+no message retry record
+127.0.0.1 [127.0.0.1]:1111 retry-status = usable
+delivering 10HmbG-0005vi-00 to 127.0.0.1 [127.0.0.1] (extchange@test.ex)
+Transport port=25 replaced by host-specific port=1225
+EHLO response bits from cache: cleartext 0x0220 crypted 0x0000
+Using cached cleartext PIPE_CONNECT
+ SMTP>> EHLO the.local.host.name
+using PIPELINING
+not using DSN
+ SMTP>> MAIL FROM:<CALLER@the.local.host.name>
+ SMTP>> RCPT TO:<extchange@test.ex>
+ SMTP>> DATA
+cmd buf flush ddd bytes
+Connecting to 127.0.0.1 [127.0.0.1]:1225 ... sending 87 nonTFO early-data
+connected
+smtp_reap_early_pipe expect banner
+ SMTP<< 220 banner
+smtp_reap_early_pipe expect ehlo
+ SMTP<< 250-esmtp-resp
+ 250-PIPELINING
+ 250-X_PIPE_CONNECT
+ 250-STARTTLS
+ 250 ok
+EHLO extensions changed, 0x0220/0x0000 -> 0x0221/0x0000
+sync_responses expect mail
+ SMTP<< 250 mail-from accepted
+sync_responses expect rcpt
+ SMTP<< 250 rcpt-to accepted
+sync_responses expect data
+ SMTP<< 354 data go-ahead
+ SMTP>> writing message and terminating "."
+cannot use sendfile for body: spoolfile not wireformat
+writing data block fd=dddd size=sss timeout=300
+ SMTP<< 250 message accepted
+ok=1 send_quit=1 send_rset=0 continue_more=0 yield=0 first_address is NULL
+transport_check_waiting entered
+ sequence=1 local_max=500 global_max=-1
+no messages waiting for 127.0.0.1
+ SMTP>> QUIT
+cmd buf flush ddd bytes
+ SMTP(close)>>
+Leaving smtp transport
+LOG: MAIN
+ => extchange@test.ex R=client T=smtp H=127.0.0.1 [127.0.0.1] L* C="250 message accepted"
+LOG: MAIN
+ Completed
+>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
+>>>>>>>>>>>>>>>> Exim pid=pppp (main) terminating with rc=0 >>>>>>>>>>>>>>>>
+
+******** SERVER ********
diff --git a/test/stdout/4050 b/test/stdout/4050
new file mode 100644
index 000000000..783dfd6a2
--- /dev/null
+++ b/test/stdout/4050
@@ -0,0 +1,133 @@
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-the.local.host.name Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250 HELP
+<<< 250 HELP
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-the.local.host.name Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+<<< 250-X_PIPE_CONNECT
+??? 250 HELP
+<<< 250 HELP
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+>>> EHLO testclient
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+??? 250-
+<<< 250-the.local.host.name Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+<<< 250-X_PIPE_CONNECT
+??? 250 HELP
+<<< 250 HELP
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+>>> EHLO testclient\r\nMAIL FROM:<a@test.ex>
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+??? 250-
+<<< 250-the.local.host.name Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+<<< 250-X_PIPE_CONNECT
+??? 250 HELP
+<<< 250 HELP
+??? 250
+<<< 250 OK
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+>>> EHLO testclient\r\nMAIL FROM:<a@test.ex>\r\nRCPT TO:<a@test.ex>
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+??? 250-
+<<< 250-the.local.host.name Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+<<< 250-X_PIPE_CONNECT
+??? 250 HELP
+<<< 250 HELP
+??? 250
+<<< 250 OK
+??? 250
+<<< 250 Accepted
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+>>> EHLO testclient\r\nMAIL FROM:<a@test.ex>\r\nRCPT TO:<a@test.ex>\r\nDATA
+??? 220
+<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+??? 250-
+<<< 250-the.local.host.name Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-8BITMIME
+<<< 250-8BITMIME
+??? 250-PIPELINING
+<<< 250-PIPELINING
+??? 250-X_PIPE_CONNECT
+<<< 250-X_PIPE_CONNECT
+??? 250 HELP
+<<< 250 HELP
+??? 250
+<<< 250 OK
+??? 250
+<<< 250 Accepted
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> .
+??? 250
+<<< 250 OK id=10HmaX-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 the.local.host.name closing connection
+End of script
diff --git a/test/stdout/4052 b/test/stdout/4052
new file mode 100644
index 000000000..0b38af6bb
--- /dev/null
+++ b/test/stdout/4052
@@ -0,0 +1,201 @@
++++++++++++++++++++++++++++
+07-Mar-2000 12:21:52 127.0.0.1:1225.EHLO
+
+******** SERVER ********
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+R
+>250 message accepted
+<QUIT
+>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+R
+>250 message accepted
+<QUIT
+>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>450 sorry no banner for you today
+>550 sync error
+>550 sync error
+>550 sync error
+>550 sync error
+<QUIT
+>>220 bye
+Expected EOF read from client
+End of script
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+R
+>250 message accepted
+<QUIT
+>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+R
+>250 message accepted
+<QUIT
+>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>220 banner
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+>250 mail good
+>250 rcpt good
+>550 obscure data error
+<QUIT
+>>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>220 banner
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+>250 mail good
+>550 rcpt refused
+>550 data cmd rejected - no valid recipient
+<QUIT
+>>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+*sleep 2
+<EHLO
+<MAIL
+<RCPT
+<DATA
+>220 banner
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+>550 mail cmd refused
+>550 rcpt cmd rejected - no valid mail
+>550 data cmd rejected - no valid mail
+<QUIT
+>>220 bye
+Expected EOF read from client
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+*sleep 2
+>220 banner
+<EHLO
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250 ok
+<MAIL
+>250 mail-from accepted
+<RCPT
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+R
+>250 message accepted
+<QUIT
+>220 bye
+Expected EOF read from client
+End of script
+Listening on port 1225 ...
+Connection request from [127.0.0.1]
+>220 banner
+<EHLO the.local.host.name
+>250-esmtp-resp
+>250-PIPELINING
+>250-X_PIPE_CONNECT
+>250-STARTTLS
+>250 ok
+<MAIL FROM:<CALLER@the.local.host.name>
+>250 mail-from accepted
+<RCPT TO:<extchange@test.ex>
+>250 rcpt-to accepted
+<DATA
+>354 data go-ahead
+Received: from CALLER by the.local.host.name with local (Exim x.yz)
+ (envelope-from <CALLER@the.local.host.name>)
+ id 10HmbG-0005vi-00
+ for extchange@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmbG-0005vi-00@the.local.host.name>
+From: CALLER_NAME <CALLER@the.local.host.name>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+body
+.
+>250 message accepted
+<QUIT
+>220 bye
+Expected EOF read from client
+End of script