From 57cc27852af9019c0c423bcfde0165e698a0ce54 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 21 Mar 2017 16:16:38 +0000 Subject: Callouts: a "hold" option for receipient-verify, which keeps the connection open both for further recipients and for eventual delivery. --- test/log/2035 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/log/2035 (limited to 'test/log/2035') diff --git a/test/log/2035 b/test/log/2035 new file mode 100644 index 000000000..13c6c838e --- /dev/null +++ b/test/log/2035 @@ -0,0 +1,11 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 10HmaX-0005vi-00 received on port 0 +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex +1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-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 10HmaY-0005vi-00 received on port 1225 +1999-03-02 09:44:33 10HmaY-0005vi-00 <= usera@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex for userb@test.ex +1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed -- cgit v1.2.3 From 16b33efd9367c4f0a2560b2facd50797fd17a2b6 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 17 May 2017 23:19:43 +0100 Subject: Testsuite: delays in 2x3[567] --- test/log/2035 | 4 ++-- test/log/2036 | 4 ++-- test/log/2037 | 4 ++-- test/log/2135 | 4 ++-- test/log/2137 | 4 ++-- test/scripts/2000-GnuTLS/2035 | 2 +- test/scripts/2000-GnuTLS/2036 | 4 ++-- test/scripts/2000-GnuTLS/2037 | 4 ++-- test/scripts/2100-OpenSSL/2135 | 2 +- test/scripts/2100-OpenSSL/2136 | 4 ++-- test/scripts/2100-OpenSSL/2137 | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) (limited to 'test/log/2035') diff --git a/test/log/2035 b/test/log/2035 index 13c6c838e..5d7edb1d0 100644 --- a/test/log/2035 +++ b/test/log/2035 @@ -1,11 +1,11 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 10HmaX-0005vi-00 received on port 0 +1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex 1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-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 10HmaY-0005vi-00 received on port 1225 +1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 1225 1999-03-02 09:44:33 10HmaY-0005vi-00 <= usera@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex for userb@test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/log/2036 b/test/log/2036 index 8cd59048c..17125939d 100644 --- a/test/log/2036 +++ b/test/log/2036 @@ -7,6 +7,8 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 <= userc@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss for userd@test.ex 1999-03-02 09:44:33 10HmaX-0005vi-00 => userd@test.ex R=dut T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 port 1224 1999-03-02 09:44:33 10HmaZ-0005vi-00 received on port 1224 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= usere@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userf@test.ex @@ -14,5 +16,3 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 <= usere@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss for userf@test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userf@test.ex R=dut T=t1 H=127.0.0.1 [127.0.0.1]:1225 C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/log/2037 b/test/log/2037 index 896dcf6f8..4ca37620f 100644 --- a/test/log/2037 +++ b/test/log/2037 @@ -1,10 +1,10 @@ 1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later -1999-03-02 09:44:33 10HmaY-0005vi-00 10HmaY-0005vi-00 received on port 0 +1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for data_defer@test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 == data_defer@test.ex R=client T=t1 defer (-46) H=127.0.0.1 [127.0.0.1]:1111: SMTP error from remote mail server after end of data: 451 Temporary local problem - please try later ******** 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 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F= temporarily rejected RCPT -1999-03-02 09:44:33 10HmaX-0005vi-00 10HmaX-0005vi-00 received on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 1225 1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F= temporarily rejected after DATA diff --git a/test/log/2135 b/test/log/2135 index d2a01cd23..daade7dd3 100644 --- a/test/log/2135 +++ b/test/log/2135 @@ -1,11 +1,11 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 10HmaX-0005vi-00 received on port 0 +1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex 1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-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 10HmaY-0005vi-00 received on port 1225 +1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 1225 1999-03-02 09:44:33 10HmaY-0005vi-00 <= usera@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex for userb@test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/log/2137 b/test/log/2137 index bef7dce9d..5d0436069 100644 --- a/test/log/2137 +++ b/test/log/2137 @@ -1,10 +1,10 @@ 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later -1999-03-02 09:44:33 10HmaY-0005vi-00 10HmaY-0005vi-00 received on port 0 +1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for data_defer@test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 == data_defer@test.ex R=client T=t1 defer (-46) H=127.0.0.1 [127.0.0.1]:1111: SMTP error from remote mail server after end of data: 451 Temporary local problem - please try later ******** 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 H=localhost (myhost.test.ex) [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no F=<> temporarily rejected RCPT -1999-03-02 09:44:33 10HmaX-0005vi-00 10HmaX-0005vi-00 received on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 1225 1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no F=<> temporarily rejected after DATA diff --git a/test/scripts/2000-GnuTLS/2035 b/test/scripts/2000-GnuTLS/2035 index cb227868c..557a04e0f 100644 --- a/test/scripts/2000-GnuTLS/2035 +++ b/test/scripts/2000-GnuTLS/2035 @@ -18,7 +18,7 @@ body . quit **** -sleep 1 +sleep 3 killdaemon # # diff --git a/test/scripts/2000-GnuTLS/2036 b/test/scripts/2000-GnuTLS/2036 index 1891d2fe8..76a55e227 100644 --- a/test/scripts/2000-GnuTLS/2036 +++ b/test/scripts/2000-GnuTLS/2036 @@ -31,7 +31,7 @@ body QUIT ??? 221 **** -sleep 1 +sleep 3 killdaemon # # @@ -62,7 +62,7 @@ body QUIT ??? 221 **** -sleep 1 +sleep 3 killdaemon # # diff --git a/test/scripts/2000-GnuTLS/2037 b/test/scripts/2000-GnuTLS/2037 index 8dca68114..37891ad1a 100644 --- a/test/scripts/2000-GnuTLS/2037 +++ b/test/scripts/2000-GnuTLS/2037 @@ -10,7 +10,7 @@ mail from: rcpt to: quit **** -sleep 1 +sleep 3 # # cmdline -bs send, data-time defer exim -bs @@ -23,7 +23,7 @@ body . quit **** -sleep 1 +sleep 3 killdaemon # # diff --git a/test/scripts/2100-OpenSSL/2135 b/test/scripts/2100-OpenSSL/2135 index 5f8ee7d86..1f760e4ef 100644 --- a/test/scripts/2100-OpenSSL/2135 +++ b/test/scripts/2100-OpenSSL/2135 @@ -17,7 +17,7 @@ body . quit **** -sleep 2 +sleep 3 killdaemon # # diff --git a/test/scripts/2100-OpenSSL/2136 b/test/scripts/2100-OpenSSL/2136 index 0eb18ffa9..c18cf946c 100644 --- a/test/scripts/2100-OpenSSL/2136 +++ b/test/scripts/2100-OpenSSL/2136 @@ -31,7 +31,7 @@ body QUIT ??? 221 **** -sleep 2 +sleep 3 killdaemon # # @@ -62,7 +62,7 @@ body QUIT ??? 221 **** -sleep 2 +sleep 3 killdaemon # # diff --git a/test/scripts/2100-OpenSSL/2137 b/test/scripts/2100-OpenSSL/2137 index ec9a964a2..36c36fe11 100644 --- a/test/scripts/2100-OpenSSL/2137 +++ b/test/scripts/2100-OpenSSL/2137 @@ -9,7 +9,7 @@ mail from:<> rcpt to: quit **** -sleep 1 +sleep 3 # # cmdline -bs send, data-time defer exim -bs @@ -22,7 +22,7 @@ body . quit **** -sleep 1 +sleep 3 killdaemon # # -- cgit v1.2.3 From 087b6b26fa9be49f9ce52bf8941b5a69d1ec31ce Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 2 Jun 2017 11:58:28 +0100 Subject: Testsuite: stabilize output sequence for 2x35/6 --- test/confs/2035 | 75 +++++++++++++++++------------------------- test/confs/2135 | 74 +++++++++++++++++------------------------ test/log/2035 | 10 +++--- test/log/2036 | 22 +++++-------- test/log/2037 | 8 ++--- test/log/2135 | 10 +++--- test/log/2136 | 24 +++++--------- test/log/2137 | 2 -- test/rejectlog/2037 | 9 +++-- test/scripts/2000-GnuTLS/2035 | 9 +++-- test/scripts/2000-GnuTLS/2036 | 6 ++++ test/scripts/2000-GnuTLS/2037 | 4 +-- test/scripts/2100-OpenSSL/2135 | 9 +++-- test/scripts/2100-OpenSSL/2136 | 4 +++ test/stderr/2035 | 73 ++++++++++++++++++++++++++++++++++++++++ test/stderr/2135 | 73 ++++++++++++++++++++++++++++++++++++++++ 16 files changed, 266 insertions(+), 146 deletions(-) create mode 100644 test/stderr/2035 create mode 100644 test/stderr/2135 (limited to 'test/log/2035') diff --git a/test/confs/2035 b/test/confs/2035 index 52b9456b1..f7f225746 100644 --- a/test/confs/2035 +++ b/test/confs/2035 @@ -1,6 +1,4 @@ -# Exim test configuration 2035 - -OPT = +# Exim test configuration 2135 .include DIR/aux-var/tls_conf_prefix @@ -15,73 +13,62 @@ primary_hostname = myhost.test.ex # ----- Main settings ----- -acl_smtp_rcpt = check_rcpt -acl_smtp_data = check_data +.ifdef SERVER +acl_smtp_rcpt = srvr_rcpt +acl_smtp_data = srvr_data +.else +acl_smtp_rcpt = client_rcpt +acl_smtp_data = client_data +.endif log_selector = +received_recipients +outgoing_port -OPT + +.ifdef SERVER +queue_only +queue_run_in_order = true +.endif # ----- ACLs ----- begin acl -check_rcpt: +client_rcpt: accept - condition = ${if or { {!eq {SERVER}{server}} {= {$received_port}{PORT_S}} }} verify = recipient/callout=use_sender,hold - defer condition = ${if eq {SERVER}{server}} - local_parts = rcpt_defer + +client_data: accept -check_data: - warn logwrite = received on port $received_port - defer condition = ${if eq {SERVER}{server}} - condition = ${if eq {data_defer}{${local_part:$recipients}}} +srvr_rcpt: + defer local_parts = rcpt_defer accept -delay: - warn condition = ${if = {$received_port}{PORT_D}} - delay = 1s +srvr_data: + defer condition = ${if eq {data_defer}{${local_part:$recipients}}} accept # ----- Routers ----- begin routers -.ifdef SERVER - target: - driver = redirect - condition = ${if = {$received_port}{PORT_D}} - address_data = ${acl {delay}} - data = :blackhole: - -dut: - driver = manualroute - route_list = * 127.0.0.1 - self = send - transport = t1 - -.else + driver = redirect + condition = ${if or {{eq {SERVER}{server}} {queue_running}}} + data = :blackhole: client: - driver = manualroute - route_list = * 127.0.0.1 - self = send - transport = t1 - errors_to = "" - -.endif - + driver = manualroute + route_list= * 127.0.0.1::PORT_D + self = send + transport = t1 + errors_to = "" begin transports t1: - driver = smtp - port = PORT_D - tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem - tls_verify_cert_hostnames = : - + driver = smtp + tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem + tls_verify_cert_hostnames = : # ----- Retry ----- begin retry diff --git a/test/confs/2135 b/test/confs/2135 index 68762146c..f7f225746 100644 --- a/test/confs/2135 +++ b/test/confs/2135 @@ -1,7 +1,5 @@ # Exim test configuration 2135 -OPT = - .include DIR/aux-var/tls_conf_prefix .ifdef SERVER @@ -15,77 +13,65 @@ primary_hostname = myhost.test.ex # ----- Main settings ----- -acl_smtp_rcpt = check_rcpt -acl_smtp_data = check_data +.ifdef SERVER +acl_smtp_rcpt = srvr_rcpt +acl_smtp_data = srvr_data +.else +acl_smtp_rcpt = client_rcpt +acl_smtp_data = client_data +.endif log_selector = +received_recipients +outgoing_port -OPT + +.ifdef SERVER +queue_only +queue_run_in_order = true +.endif # ----- ACLs ----- begin acl -check_rcpt: +client_rcpt: accept - condition = ${if or { {!eq {SERVER}{server}} {= {$received_port}{PORT_S}} }} verify = recipient/callout=use_sender,hold - defer condition = ${if eq {SERVER}{server}} - local_parts = rcpt_defer + +client_data: accept -check_data: - warn logwrite = received on port $received_port - defer condition = ${if eq {SERVER}{server}} - condition = ${if eq {data_defer}{${local_part:$recipients}}} +srvr_rcpt: + defer local_parts = rcpt_defer accept -delay: - warn condition = ${if = {$received_port}{PORT_D}} - delay = 1s +srvr_data: + defer condition = ${if eq {data_defer}{${local_part:$recipients}}} accept # ----- Routers ----- begin routers -.ifdef SERVER - target: - driver = redirect - condition = ${if = {$received_port}{PORT_D}} - address_data = ${acl {delay}} - data = :blackhole: - -dut: - driver = manualroute - route_list = * 127.0.0.1 - self = send - transport = t1 - -.else + driver = redirect + condition = ${if or {{eq {SERVER}{server}} {queue_running}}} + data = :blackhole: client: - driver = manualroute - route_list = * 127.0.0.1 - self = send - transport = t1 - errors_to = "" - -.endif - + driver = manualroute + route_list= * 127.0.0.1::PORT_D + self = send + transport = t1 + errors_to = "" begin transports t1: - driver = smtp - port = PORT_D - tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem - tls_verify_cert_hostnames = : - + driver = smtp + tls_verify_certificates = DIR/aux-fixed/exim-ca/example.com/CA/CA.pem + tls_verify_cert_hostnames = : # ----- Retry ----- begin retry * * F,5d,10s - # End diff --git a/test/log/2035 b/test/log/2035 index 5d7edb1d0..423d9be13 100644 --- a/test/log/2035 +++ b/test/log/2035 @@ -1,11 +1,11 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex -1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target +1999-03-02 09:44:33 10HmaY-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 received on port 1225 1999-03-02 09:44:33 10HmaY-0005vi-00 <= usera@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex for userb@test.ex -1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/log/2036 b/test/log/2036 index 17125939d..33b6423ef 100644 --- a/test/log/2036 +++ b/test/log/2036 @@ -1,18 +1,14 @@ +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: R=target +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 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target +1999-03-02 09:44:33 10HmaY-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 port 1224 -1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 1224 1999-03-02 09:44:33 10HmaX-0005vi-00 <= userc@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userd@test.ex -1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 1225 -1999-03-02 09:44:33 10HmaY-0005vi-00 <= userc@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss for userd@test.ex -1999-03-02 09:44:33 10HmaX-0005vi-00 => userd@test.ex R=dut T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" -1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 port 1224 -1999-03-02 09:44:33 10HmaZ-0005vi-00 received on port 1224 -1999-03-02 09:44:33 10HmaZ-0005vi-00 <= usere@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userf@test.ex -1999-03-02 09:44:33 10HmbA-0005vi-00 received on port 1225 -1999-03-02 09:44:33 10HmbA-0005vi-00 <= usere@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss for userf@test.ex -1999-03-02 09:44:33 10HmaZ-0005vi-00 => userf@test.ex R=dut T=t1 H=127.0.0.1 [127.0.0.1]:1225 C="250 OK id=10HmbA-0005vi-00" -1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 <= usere@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userf@test.ex diff --git a/test/log/2037 b/test/log/2037 index 4ca37620f..ac307f28d 100644 --- a/test/log/2037 +++ b/test/log/2037 @@ -1,10 +1,8 @@ -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later -1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 0 +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for data_defer@test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 == data_defer@test.ex R=client T=t1 defer (-46) H=127.0.0.1 [127.0.0.1]:1111: SMTP error from remote mail server after end of data: 451 Temporary local problem - please try later ******** 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 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F= temporarily rejected RCPT -1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 1225 -1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F= temporarily rejected after DATA +1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F=<> temporarily rejected RCPT +1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F=<> temporarily rejected after DATA diff --git a/test/log/2135 b/test/log/2135 index daade7dd3..ee8d8709a 100644 --- a/test/log/2135 +++ b/test/log/2135 @@ -1,11 +1,11 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex -1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target +1999-03-02 09:44:33 10HmaY-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 received on port 1225 1999-03-02 09:44:33 10HmaY-0005vi-00 <= usera@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no S=sss id=E10HmaX-0005vi-00@myhost.test.ex for userb@test.ex -1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed diff --git a/test/log/2136 b/test/log/2136 index 027ea881e..33b6423ef 100644 --- a/test/log/2136 +++ b/test/log/2136 @@ -1,20 +1,14 @@ +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: R=target +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 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target +1999-03-02 09:44:33 10HmaY-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 port 1224 -1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 1224 1999-03-02 09:44:33 10HmaX-0005vi-00 <= userc@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userd@test.ex -1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 1225 -1999-03-02 09:44:33 10HmaY-0005vi-00 <= userc@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no S=sss for userd@test.ex -1999-03-02 09:44:33 10HmaX-0005vi-00 => userd@test.ex R=dut T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" -1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 port 1224 -1999-03-02 09:44:33 10HmaZ-0005vi-00 received on port 1224 -1999-03-02 09:44:33 10HmaZ-0005vi-00 <= usere@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userf@test.ex -1999-03-02 09:44:33 10HmbA-0005vi-00 received on port 1225 -1999-03-02 09:44:33 10HmbA-0005vi-00 <= usere@ok.example H=localhost (myhost.test.ex) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no S=sss for userf@test.ex -1999-03-02 09:44:33 10HmaZ-0005vi-00 => userf@test.ex R=dut T=t1 H=127.0.0.1 [127.0.0.1]:1225 C="250 OK id=10HmbA-0005vi-00" -1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed -1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: R=target -1999-03-02 09:44:33 10HmbA-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 <= usere@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userf@test.ex diff --git a/test/log/2137 b/test/log/2137 index 5d0436069..360f31ed6 100644 --- a/test/log/2137 +++ b/test/log/2137 @@ -1,10 +1,8 @@ 1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later -1999-03-02 09:44:33 10HmaY-0005vi-00 received on port 0 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for data_defer@test.ex 1999-03-02 09:44:33 10HmaY-0005vi-00 == data_defer@test.ex R=client T=t1 defer (-46) H=127.0.0.1 [127.0.0.1]:1111: SMTP error from remote mail server after end of data: 451 Temporary local problem - please try later ******** 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 H=localhost (myhost.test.ex) [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no F=<> temporarily rejected RCPT -1999-03-02 09:44:33 10HmaX-0005vi-00 received on port 1225 1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no F=<> temporarily rejected after DATA diff --git a/test/rejectlog/2037 b/test/rejectlog/2037 index 19259d512..210641393 100644 --- a/test/rejectlog/2037 +++ b/test/rejectlog/2037 @@ -1,14 +1,13 @@ -1999-03-02 09:44:33 U=CALLER F= temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later +1999-03-02 09:44:33 U=CALLER F=<> temporarily rejected RCPT : Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later ******** SERVER ******** -1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F= temporarily rejected RCPT -1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F= temporarily rejected after DATA -Envelope-from: +1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F=<> temporarily rejected RCPT +1999-03-02 09:44:33 10HmaX-0005vi-00 H=localhost (myhost.test.ex) [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no F=<> temporarily rejected after DATA +Envelope-from: <> Envelope-to: P Received: from localhost ([127.0.0.1] helo=myhost.test.ex) by myhost.test.ex with esmtps (TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256) (Exim x.yz) - (envelope-from ) id 10HmaX-0005vi-00 for data_defer@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 P Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz) diff --git a/test/scripts/2000-GnuTLS/2035 b/test/scripts/2000-GnuTLS/2035 index 557a04e0f..94923aa60 100644 --- a/test/scripts/2000-GnuTLS/2035 +++ b/test/scripts/2000-GnuTLS/2035 @@ -6,9 +6,10 @@ need_ipv4 exim -bd -DSERVER=server -oX PORT_D **** # -# a recipient verify and continued-delivery +# A recipient verify and continued-delivery. The debug output should show "already connected to", +# "proxied TLS", and the DATA smtp command only done by the transport process. # cmdline -bs send -exim -bs +exim -d-all+transport -bs mail from: rcpt to: data @@ -18,8 +19,10 @@ body . quit **** -sleep 3 +sleep 1 killdaemon +exim -q +**** # # no_stdout_check diff --git a/test/scripts/2000-GnuTLS/2036 b/test/scripts/2000-GnuTLS/2036 index 76a55e227..cd6e9a121 100644 --- a/test/scripts/2000-GnuTLS/2036 +++ b/test/scripts/2000-GnuTLS/2036 @@ -2,6 +2,7 @@ gnutls need_ipv4 # +# a recipient verify and continued-delivery # smtp send # a tls-capable target for the verify/delivery connection on PORT_D # plus a daemon under test on PORT_S @@ -33,6 +34,8 @@ QUIT **** sleep 3 killdaemon +exim -q +**** # # # smtp send, deliver_drop_priv @@ -64,6 +67,9 @@ QUIT **** sleep 3 killdaemon +exim -q +**** +# # # no_stdout_check diff --git a/test/scripts/2000-GnuTLS/2037 b/test/scripts/2000-GnuTLS/2037 index 37891ad1a..ad13a3f94 100644 --- a/test/scripts/2000-GnuTLS/2037 +++ b/test/scripts/2000-GnuTLS/2037 @@ -6,7 +6,7 @@ exim -bd -DSERVER=server -oX PORT_D **** # cmdline -bs send, rcpt-time defer exim -bs -mail from: +mail from:<> rcpt to: quit **** @@ -14,7 +14,7 @@ sleep 3 # # cmdline -bs send, data-time defer exim -bs -mail from: +mail from:<> rcpt to: data Subject: test diff --git a/test/scripts/2100-OpenSSL/2135 b/test/scripts/2100-OpenSSL/2135 index 1f760e4ef..ff460c671 100644 --- a/test/scripts/2100-OpenSSL/2135 +++ b/test/scripts/2100-OpenSSL/2135 @@ -5,9 +5,10 @@ need_ipv4 exim -bd -DSERVER=server -oX PORT_D **** # -# a recipient verify and continued-delivery +# A recipient verify and continued-delivery. The debug output should show "already connected to", +# "proxied TLS", and the DATA smtp command only done by the transport process. # cmdline -bs send -exim -bs +exim -d-all+transport -bs mail from: rcpt to: data @@ -17,8 +18,10 @@ body . quit **** -sleep 3 +sleep 1 killdaemon +exim -q +**** # # no_stdout_check diff --git a/test/scripts/2100-OpenSSL/2136 b/test/scripts/2100-OpenSSL/2136 index c18cf946c..396075cc1 100644 --- a/test/scripts/2100-OpenSSL/2136 +++ b/test/scripts/2100-OpenSSL/2136 @@ -33,6 +33,8 @@ QUIT **** sleep 3 killdaemon +exim -q +**** # # # smtp send, deliver_drop_priv @@ -64,6 +66,8 @@ QUIT **** sleep 3 killdaemon +exim -q +**** # # # diff --git a/test/stderr/2035 b/test/stderr/2035 new file mode 100644 index 000000000..aa0e43805 --- /dev/null +++ b/test/stderr/2035 @@ -0,0 +1,73 @@ +Exim version x.yz .... +configuration file is TESTSUITE/test-config +admin user +LOG: smtp_connection MAIN + SMTP connection from CALLER +Transport port=25 replaced by host-specific port=1225 +Connecting to 127.0.0.1 [127.0.0.1]:1225 ... connected + SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 + SMTP>> EHLO myhost.test.ex +cmd buf flush ddd bytes + SMTP<< 250-myhost.test.ex Hello localhost [127.0.0.1] + 250-SIZE 52428800 + 250-8BITMIME + 250-PIPELINING + 250-STARTTLS + 250 HELP + SMTP>> STARTTLS +cmd buf flush ddd bytes + SMTP<< 220 TLS go ahead + SMTP>> EHLO myhost.test.ex +cmd buf flush ddd bytes + SMTP<< 250-myhost.test.ex Hello localhost [127.0.0.1] + 250-SIZE 52428800 + 250-8BITMIME + 250-PIPELINING + 250 HELP +using PIPELINING +not using DSN + SMTP>> MAIL FROM: SIZE=ssss + SMTP>> RCPT TO: +cmd buf flush ddd bytes + SMTP<< 250 OK + SMTP<< 250 Accepted +LOG: MAIN + <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss +LOG: smtp_connection MAIN + SMTP connection from CALLER closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +>>>>>>>>>>>>>>>> Remote deliveries >>>>>>>>>>>>>>>> +--------> userb@test.ex <-------- +t1 transport entered + userb@test.ex +hostlist: + 127.0.0.1:1225 +already connected to 127.0.0.1 [127.0.0.1] (on fd 0) +checking status of 127.0.0.1 +127.0.0.1 [127.0.0.1]:1111 retry-status = usable +delivering 10HmaX-0005vi-00 to 127.0.0.1 [127.0.0.1] (userb@test.ex) +continued connection, proxied TLS + SMTP>> DATA +cmd buf flush ddd bytes + SMTP<< 354 Enter message, ending with "." on a line by itself + SMTP>> writing message and terminating "." +cannot use sendfile for body: spoolfile not wireformat +writing data block fd=dddd size=sss timeout=300 + SMTP<< 250 OK id=10HmaY-0005vi-00 +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)>> +Leaving t1 transport +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +LOG: MAIN + => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" +LOG: MAIN + Completed +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> + +******** SERVER ******** diff --git a/test/stderr/2135 b/test/stderr/2135 new file mode 100644 index 000000000..c61239a11 --- /dev/null +++ b/test/stderr/2135 @@ -0,0 +1,73 @@ +Exim version x.yz .... +configuration file is TESTSUITE/test-config +admin user +LOG: smtp_connection MAIN + SMTP connection from CALLER +Transport port=25 replaced by host-specific port=1225 +Connecting to 127.0.0.1 [127.0.0.1]:1225 ... connected + SMTP<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 + SMTP>> EHLO myhost.test.ex +cmd buf flush ddd bytes + SMTP<< 250-myhost.test.ex Hello localhost [127.0.0.1] + 250-SIZE 52428800 + 250-8BITMIME + 250-PIPELINING + 250-STARTTLS + 250 HELP + SMTP>> STARTTLS +cmd buf flush ddd bytes + SMTP<< 220 TLS go ahead + SMTP>> EHLO myhost.test.ex +cmd buf flush ddd bytes + SMTP<< 250-myhost.test.ex Hello localhost [127.0.0.1] + 250-SIZE 52428800 + 250-8BITMIME + 250-PIPELINING + 250 HELP +using PIPELINING +not using DSN + SMTP>> MAIL FROM: SIZE=ssss + SMTP>> RCPT TO: +cmd buf flush ddd bytes + SMTP<< 250 OK + SMTP<< 250 Accepted +LOG: MAIN + <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss +LOG: smtp_connection MAIN + SMTP connection from CALLER closed by QUIT +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +Exim version x.yz .... +configuration file is TESTSUITE/test-config +trusted user +admin user +>>>>>>>>>>>>>>>> Remote deliveries >>>>>>>>>>>>>>>> +--------> userb@test.ex <-------- +t1 transport entered + userb@test.ex +hostlist: + 127.0.0.1:1225 +already connected to 127.0.0.1 [127.0.0.1] (on fd 0) +checking status of 127.0.0.1 +127.0.0.1 [127.0.0.1]:1111 retry-status = usable +delivering 10HmaX-0005vi-00 to 127.0.0.1 [127.0.0.1] (userb@test.ex) +continued connection, proxied TLS + SMTP>> DATA +cmd buf flush ddd bytes + SMTP<< 354 Enter message, ending with "." on a line by itself + SMTP>> writing message and terminating "." +cannot use sendfile for body: spoolfile not wireformat +writing data block fd=dddd size=sss timeout=300 + SMTP<< 250 OK id=10HmaY-0005vi-00 +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)>> +Leaving t1 transport +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> +LOG: MAIN + => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" +LOG: MAIN + Completed +>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> + +******** SERVER ******** -- cgit v1.2.3 From a843a57ecb56c45c42bd0e8e8bd66defe48bb6bd Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 2 Jun 2017 14:22:42 +0100 Subject: Fix logging of delivery port for callout lazy-close, when port specified by router --- doc/doc-txt/ChangeLog | 3 +++ src/src/transports/smtp.c | 19 ++++++++++--------- test/log/2035 | 2 +- test/log/2135 | 2 +- test/stderr/2035 | 3 ++- test/stderr/2135 | 3 ++- 6 files changed, 19 insertions(+), 13 deletions(-) (limited to 'test/log/2035') diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 7f2e9d097..336935329 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -106,6 +106,9 @@ JH/15 Fix a crash in the smtp transport caused when two hosts in succession are unsuable for non-message-specific reasons - eg. connection timeout, banner-time rejection. +JH/16 Fix logging of delivery remote port, when specified by router, under + callout/hold. + Exim version 4.89 ----------------- diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index dc9e03be1..d6a52034b 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -1846,7 +1846,7 @@ else else { sx->inblock.sock = sx->outblock.sock = 0; /* stdin */ - sx->host->port = sx->port; /* Record the port that was used */ + smtp_port_for_connect(sx->host, sx->port); /* Record the port that was used */ } smtp_command = big_buffer; sx->helo_data = NULL; /* ensure we re-expand ob->helo_data */ @@ -2660,7 +2660,8 @@ Arguments: failed by one of them. host host to deliver to host_af AF_INET or AF_INET6 - port default TCP/IP port to use, in host byte order + defport default TCP/IP port to use if host does not specify, in host + byte order interface interface to bind to, or NULL tblock transport instance block message_defer set TRUE if yield is OK, but all addresses were deferred @@ -2682,7 +2683,7 @@ Returns: OK - the connection was made and the delivery attempted; */ static int -smtp_deliver(address_item *addrlist, host_item *host, int host_af, int port, +smtp_deliver(address_item *addrlist, host_item *host, int host_af, int defport, uschar *interface, transport_instance *tblock, BOOL *message_defer, BOOL suppress_tls) { @@ -2705,7 +2706,7 @@ suppress_tls = suppress_tls; /* stop compiler warning when no TLS support */ sx.addrlist = addrlist; sx.host = host; sx.host_af = host_af, -sx.port = port; +sx.port = defport; sx.interface = interface; sx.helo_data = NULL; sx.tblock = tblock; @@ -3661,7 +3662,7 @@ smtp_transport_entry( address_item *addrlist) /* addresses we are working on */ { int cutoff_retry; -int port; +int defport; int hosts_defer = 0; int hosts_fail = 0; int hosts_looked_up = 0; @@ -3816,7 +3817,7 @@ else if (ob->hosts_randomize && hostlist->mx == MX_NONE && !continue_hostname) /* Sort out the default port. */ -if (!smtp_get_port(ob->port, addrlist, &port, tid)) return FALSE; +if (!smtp_get_port(ob->port, addrlist, &defport, tid)) return FALSE; /* For each host-plus-IP-address on the list: @@ -4055,7 +4056,7 @@ for (cutoff_retry = 0; the default. */ pistring = string_sprintf(":%d", host->port == PORT_NONE - ? port : host->port); + ? defport : host->port); if (Ustrcmp(pistring, ":25") == 0) pistring = US""; /* Select IPv4 or IPv6, and choose an outgoing interface. If the interface @@ -4255,7 +4256,7 @@ for (cutoff_retry = 0; /* Attempt the delivery. */ total_hosts_tried++; - rc = smtp_deliver(addrlist, thost, host_af, port, interface, tblock, + rc = smtp_deliver(addrlist, thost, host_af, defport, interface, tblock, &message_defer, FALSE); /* Yield is one of: @@ -4302,7 +4303,7 @@ for (cutoff_retry = 0; "%s: delivering unencrypted to H=%s [%s] (not in hosts_require_tls)", first_addr->message, host->name, host->address); first_addr = prepare_addresses(addrlist, host); - rc = smtp_deliver(addrlist, thost, host_af, port, interface, tblock, + rc = smtp_deliver(addrlist, thost, host_af, defport, interface, tblock, &message_defer, TRUE); if (rc == DEFER && first_addr->basic_errno != ERRNO_AUTHFAIL) write_logs(first_addr, host); diff --git a/test/log/2035 b/test/log/2035 index 423d9be13..ea335213a 100644 --- a/test/log/2035 +++ b/test/log/2035 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex -1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed 1999-03-02 09:44:33 Start queue run: pid=pppp 1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target diff --git a/test/log/2135 b/test/log/2135 index ee8d8709a..50a8dbc19 100644 --- a/test/log/2135 +++ b/test/log/2135 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userb@test.ex -1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed 1999-03-02 09:44:33 Start queue run: pid=pppp 1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=target diff --git a/test/stderr/2035 b/test/stderr/2035 index aa0e43805..e37495092 100644 --- a/test/stderr/2035 +++ b/test/stderr/2035 @@ -50,6 +50,7 @@ already connected to 127.0.0.1 [127.0.0.1] (on fd 0) checking status of 127.0.0.1 127.0.0.1 [127.0.0.1]:1111 retry-status = usable delivering 10HmaX-0005vi-00 to 127.0.0.1 [127.0.0.1] (userb@test.ex) +Transport port=25 replaced by host-specific port=1225 continued connection, proxied TLS SMTP>> DATA cmd buf flush ddd bytes @@ -65,7 +66,7 @@ cmd buf flush ddd bytes Leaving t1 transport >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN - => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" + => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250 OK id=10HmaY-0005vi-00" LOG: MAIN Completed >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> diff --git a/test/stderr/2135 b/test/stderr/2135 index c61239a11..5a4de14ec 100644 --- a/test/stderr/2135 +++ b/test/stderr/2135 @@ -50,6 +50,7 @@ already connected to 127.0.0.1 [127.0.0.1] (on fd 0) checking status of 127.0.0.1 127.0.0.1 [127.0.0.1]:1111 retry-status = usable delivering 10HmaX-0005vi-00 to 127.0.0.1 [127.0.0.1] (userb@test.ex) +Transport port=25 replaced by host-specific port=1225 continued connection, proxied TLS SMTP>> DATA cmd buf flush ddd bytes @@ -65,7 +66,7 @@ cmd buf flush ddd bytes Leaving t1 transport >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> LOG: MAIN - => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:25 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" + => userb@test.ex R=client T=t1 H=127.0.0.1 [127.0.0.1]:1225 X=TLSv1:AES256-SHA:256 CV=no C="250 OK id=10HmaY-0005vi-00" LOG: MAIN Completed >>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>> -- cgit v1.2.3