From f83a760f108f79279c210e208bb02c270569a951 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 26 Jan 2018 18:40:41 +0000 Subject: Cutthrough: fix for port-number defined by router. Bug 2229 --- test/confs/5407 | 52 +++++++++++++++++++++++++++++++++++++++ test/log/5407 | 6 +++++ test/scripts/5400-cutthrough/5407 | 40 ++++++++++++++++++++++++++++++ test/stdout/5407 | 41 ++++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 test/confs/5407 create mode 100644 test/log/5407 create mode 100644 test/scripts/5400-cutthrough/5407 create mode 100644 test/stdout/5407 (limited to 'test') diff --git a/test/confs/5407 b/test/confs/5407 new file mode 100644 index 000000000..0d41b0b7d --- /dev/null +++ b/test/confs/5407 @@ -0,0 +1,52 @@ +# Exim test configuration 5407 + +# any options on the cutthrough_delivery control +CONTROL= + +# optional verify-callout +OPT= + +.include DIR/aux-var/std_conf_prefix + +primary_hostname = myhost.test.ex + +log_selector = +received_recipients +queue_only + +# ----- Main settings ----- + +domainlist local_domains = test.ex : *.test.ex + +acl_smtp_rcpt = ar + + +# ----- ACLs ----- + +begin acl + +ar: + accept + control = cutthrough_deliveryCONTROL + OPT + logwrite = rcpt for $local_part@$domain + +# ----- Routers ----- + +begin routers + +all: + driver = manualroute + domains = ! +local_domains + route_list = * 127.0.0.1::PORT_S + self = send + transport = smtp + + +# ----- Transports ----- + +begin transports + +smtp: + driver = smtp + +# End diff --git a/test/log/5407 b/test/log/5407 new file mode 100644 index 000000000..3b35ec632 --- /dev/null +++ b/test/log/5407 @@ -0,0 +1,6 @@ +1999-03-02 09:44:33 rcpt for userx@domain.com +1999-03-02 09:44:33 rcpt for usery@domain.com +1999-03-02 09:44:33 10HmaX-0005vi-00 >> usery@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaX-0005vi-00 >> userx@domain.com R=all T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss for userx@domain.com usery@domain.com +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/scripts/5400-cutthrough/5407 b/test/scripts/5400-cutthrough/5407 new file mode 100644 index 000000000..08bc36f1f --- /dev/null +++ b/test/scripts/5400-cutthrough/5407 @@ -0,0 +1,40 @@ +# cutthrough_delivery multiple recipient; router specifying port +need_ipv4 +munge loopback +# +# A two-RCPT message. +# Both should get cuttthrough, still as one message +server PORT_S +220 ESMTP +EHLO +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +. +250 OK +QUIT +250 OK +*eof +**** +exim -bs +EHLO myhost.test.ex +MAIL FROM: +RCPT TO: +RCPT TO: +DATA + +. +QUIT +**** +# +# +# +# +# +# End diff --git a/test/stdout/5407 b/test/stdout/5407 new file mode 100644 index 000000000..90ae013fa --- /dev/null +++ b/test/stdout/5407 @@ -0,0 +1,41 @@ +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello CALLER at myhost.test.ex +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +250 Accepted +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaX-0005vi-00 +221 myhost.test.ex closing connection + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [IP_LOOPBACK_ADDR] +220 ESMTP +EHLO myhost.test.ex +250 OK +MAIL FROM: +250 Sender OK +RCPT TO: +250 Recipient OK +RCPT TO: +250 Recipient OK +DATA +354 Send data +Received: from CALLER (helo=myhost.test.ex) + by myhost.test.ex with local-esmtp (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +. +250 OK +QUIT +250 OK +Expected EOF read from client +End of script -- cgit v1.2.3