Fix local delivery delay when combined with remote callout/hold. Bug 2599
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 20 Dec 2020 15:49:39 +0000 (15:49 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 20 Dec 2020 15:51:00 +0000 (15:51 +0000)
doc/doc-docbook/spec.xfpt
doc/doc-txt/ChangeLog
src/src/deliver.c
test/confs/0580
test/log/0580
test/log/0581
test/log/0582
test/mail/0580.local [new file with mode: 0644]
test/scripts/0000-Basic/0580
test/scripts/0000-Basic/0582
test/stdout/0580 [new file with mode: 0644]

index 302a62312ecc2f10d03d17ddb41109bf51f7229a..2938de5761645f7fc7fcf229e43d9f98683405c2 100644 (file)
@@ -3885,7 +3885,9 @@ id, and the remaining ones must be email addresses. However, if the message is
 active (in the middle of a delivery attempt), it is not altered. This option
 can be used only by an admin user.
 
-.vitem "&%-MC%&&~<&'transport'&>&~<&'hostname'&>&~<&'sequence&~number'&>&&&
+.vitem "&%-MC%&&~<&'transport'&>&~<&'hostname'&>&&&
+       &~<&'host&~IP'&>&&&
+       &~<&'sequence&~number'&>&&&
         &~<&'message&~id'&>"
 .oindex "&%-MC%&"
 .cindex "SMTP" "passed connection"
index f2d34e84dfd77b4e048ddedb5bcc5a21d092203f..396ec336274d503419afafb08d1136c12f5982a9 100644 (file)
@@ -156,6 +156,9 @@ JH/31 The ESMTP option name advertised for the SUPPORT_EARLY_PIPE build option
       Changeover between the implementations is handled by the mechanisms
       alrready coded.
 
+JH/32 Bug 2599: fix delay of delivery to a local address where there is also
+      a remote which uses callout/hold.  Previously the local was queued.
+
 
 Exim version 4.94
 -----------------
index 4e6f08f898b91173a93e1a3480579253e173b4b5..ec5990cc1b80b90c44999ebc508617bb13d33ba4 100644 (file)
@@ -7067,13 +7067,23 @@ if (  mua_wrapper
 
 
 /* If this is a run to continue deliveries to an external channel that is
-already set up, defer any local deliveries. */
+already set up, defer any local deliveries.
 
-if (continue_transport)
+jgh 2020/12/20: I don't see why; locals should be quick.
+The defer goes back to version 1.62 in 1997.  A local being still deliverable
+during a continued run might result from something like a defer during the
+original delivery, eg. in a DB lookup.  Unlikely but possible.
+
+To avoid delaying a local when combined with a callout-hold for a remote
+delivery, test continue_sequence rather than continue_transport. */
+
+if (continue_sequence > 1 && addr_local)
   {
+  DEBUG(D_deliver|D_retry|D_route)
+    debug_printf("deferring local deliveries due to continued-transport\n");
   if (addr_defer)
     {
-    address_item *addr = addr_defer;
+    address_item * addr = addr_defer;
     while (addr->next) addr = addr->next;
     addr->next = addr_local;
     }
index 6dbc06d64242e5e48765e17c35e69dd79110d48c..a96b01162e6d92b1e9cddd388ca5371d5dd89673 100644 (file)
@@ -18,28 +18,44 @@ OPT
 begin acl
 
 check_rcpt:
-  accept  verify = recipient/callout=use_sender,hold
+  accept
+       local_parts =   delay : remote
+       verify =        recipient/callout=2s,use_sender,defer_ok,hold
 
+  accept
+       local_parts =   local
+
+  accept
+       verify = recipient/callout=use_sender,hold
 
 # ----- Routers -----
 
 begin routers
 
-r1:
-  driver = manualroute
+r_local:
+  driver =     accept
+  local_parts =        local
+  transport =  local_deliv
+
+r_remote:
+  driver =     manualroute
   route_list = * 127.0.0.1
-  self = send
-  transport = t1
+  self =       send
+  transport =  t1
 
 
 begin transports
 
+local_deliv:
+  driver =     appendfile
+  file =       DIR/test-mail/$local_part_data
+  user =       CALLER
+
 t1:
   driver = smtp
   port =   PORT_S
   hosts_try_fastopen = :
 
-
 # ----- Retry -----
 begin retry
 
index f006778e54083bdd55e420dfdeb8d4f87e3de362..e748c69e10ea1993486e5211e2a5925de11e17af 100644 (file)
@@ -1,15 +1,19 @@
 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for usery@test.ex
-1999-03-02 09:44:33 10HmaX-0005vi-00 => usery@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaX-0005vi-00 => usery@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 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-smtp S=sss for usery@test.ex usery2@test.ex
-1999-03-02 09:44:33 10HmaY-0005vi-00 => usery@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
-1999-03-02 09:44:33 10HmaY-0005vi-00 -> usery2@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaY-0005vi-00 => usery@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaY-0005vi-00 -> usery2@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 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-smtp S=sss for usery3@test.ex usery@test.ex
-1999-03-02 09:44:33 10HmaZ-0005vi-00 => usery3@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
-1999-03-02 09:44:33 10HmaZ-0005vi-00 -> usery@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => usery3@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 -> usery@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
 1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for usery4@test.ex usery5@test.ex
-1999-03-02 09:44:33 10HmbA-0005vi-00 => usery4@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
-1999-03-02 09:44:33 10HmbA-0005vi-00 -> usery5@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmbA-0005vi-00 => usery4@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmbA-0005vi-00 -> usery5@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for remote@test.ex local@test.ex
+1999-03-02 09:44:33 10HmbB-0005vi-00 => local <local@test.ex> R=r_local T=local_deliv
+1999-03-02 09:44:33 10HmbB-0005vi-00 => remote@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 message accepted"
+1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
index 14f8d48a266f31b9f028d154d6773937847416f6..2a82ace4834b20242ee2cd158f16024b9f659534 100644 (file)
@@ -6,22 +6,22 @@
 ******** SERVER ********
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
 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 10HmaX-0005vi-00 => userd@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaX-0005vi-00 => userd@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
 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
-1999-03-02 09:44:33 10HmaY-0005vi-00 => userf@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaY-0005vi-00 => userf@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 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 PORT_D
 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userc@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userd@test.ex userd2@test.ex
-1999-03-02 09:44:33 10HmaZ-0005vi-00 => userd@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
-1999-03-02 09:44:33 10HmaZ-0005vi-00 -> userd2@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => userd@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmaZ-0005vi-00 -> userd2@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
 1999-03-02 09:44:33 10HmbA-0005vi-00 <= userc@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userd3@test.ex userd2@test.ex
-1999-03-02 09:44:33 10HmbA-0005vi-00 => userd3@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
-1999-03-02 09:44:33 10HmbA-0005vi-00 -> userd2@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmbA-0005vi-00 => userd3@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmbA-0005vi-00 -> userd2@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
 1999-03-02 09:44:33 10HmbB-0005vi-00 <= userc@ok.example H=(test.ex) [127.0.0.1] P=esmtp S=sss for userd4@test.ex userd5@test.ex
-1999-03-02 09:44:33 10HmbB-0005vi-00 => userd4@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
-1999-03-02 09:44:33 10HmbB-0005vi-00 -> userd5@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmbB-0005vi-00 => userd4@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
+1999-03-02 09:44:33 10HmbB-0005vi-00 -> userd5@test.ex R=r_remote T=t1 H=127.0.0.1 [127.0.0.1] C="250 yeah got that message"
 1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
index fd431813f03ace76c6167649dd0c27f756491234..179e80feaaca27b4b7361b2d192b18135ecba96e 100644 (file)
@@ -1,4 +1,4 @@
 1999-03-02 09:44:33 U=CALLER F=<userg@ok.example> temporarily rejected RCPT <userg@test.ex>: Could not complete recipient verify callout: 127.0.0.1 [127.0.0.1] : SMTP error from remote mail server after RCPT TO:<userg@test.ex>: 451 not right now
 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss for userh@test.ex
 1999-03-02 09:44:33 10HmaX-0005vi-00 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 451 not right now
-1999-03-02 09:44:33 10HmaX-0005vi-00 == userh@test.ex R=r1 T=t1 defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 451 not right now
+1999-03-02 09:44:33 10HmaX-0005vi-00 == userh@test.ex R=r_remote T=t1 defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 451 not right now
diff --git a/test/mail/0580.local b/test/mail/0580.local
new file mode 100644 (file)
index 0000000..5ee7d9d
--- /dev/null
@@ -0,0 +1,10 @@
+From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmbB-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+
index 8d8a11751d43ae48eb8cf080daf9897e1f1a99e1..5cce3e8585ce042c48857a51c3646d0514eb6127 100644 (file)
@@ -19,7 +19,7 @@ QUIT
 221 Bye
 ****
 #
-exim -bs
+exim -bs -odi
 mail from:<userx@ok.example>
 rcpt to:<usery@test.ex>
 data
@@ -29,7 +29,6 @@ body
 .
 quit
 ****
-sleep 1
 #
 #
 # multiple recipients
@@ -62,7 +61,7 @@ QUIT
 221 Bye
 ****
 #
-exim -bs
+exim -bs -odi
 mail from:<userx@ok.example>
 rcpt to:<usery@test.ex>
 rcpt to:<usery2@test.ex>
@@ -73,7 +72,6 @@ body
 .
 quit
 ****
-sleep 1
 #
 #
 # 2nd callout result is cached (above); should not activate LCC
@@ -105,7 +103,7 @@ QUIT
 221 Bye
 ****
 #
-exim -bs
+exim -bs -odi
 mail from:<userx@ok.example>
 rcpt to:<usery3@test.ex>
 rcpt to:<usery@test.ex>
@@ -116,7 +114,6 @@ body
 .
 quit
 ****
-sleep 1
 #
 #
 # no cache hits; should do LCC
@@ -138,7 +135,7 @@ QUIT
 221 Bye
 ****
 #
-exim -bs
+exim -bs -odi
 mail from:<userx@ok.example>
 rcpt to:<usery4@test.ex>
 rcpt to:<usery5@test.ex>
@@ -149,8 +146,33 @@ body
 .
 quit
 ****
-sleep 1
 #
+# cmdline -bs send, rmt conn timeout, also local rcpt
+server PORT_S
+220 Welcome
+EHLO
+250 Hi
+MAIL FROM
+250 OK 
+RCPT TO
+250 OK
+DATA
+354 hit me
+.
+250 message accepted
+QUIT
+221 bye
+****
+exim -bs -odi
+mail from:<useri@ok.example>
+rcpt to:<remote@test.ex>
+rcpt to:<local@test.ex>
+data
+Subject: test
+.
+quit
+****
+exim -bp
+****
 #
-no_stdout_check
 no_msglog_check
index 3eefcc979fa2f560450fc5537e99f29433826c41..6da20235ab037638b6831dfb0ce8b1a5d30470ca 100644 (file)
@@ -15,12 +15,11 @@ QUIT
 221 Bye
 ****
 #
-exim -bs
+exim -bs -odi
 mail from:<userg@ok.example>
 rcpt to:<userg@test.ex>
 quit
 ****
-sleep 1
 #
 # cmdline -bs send, data-time defer
 server PORT_S
@@ -39,7 +38,7 @@ QUIT
 221 Bye
 ****
 #
-exim -bs
+exim -bs -odi
 mail from:<userh@ok.example>
 rcpt to:<userh@test.ex>
 data
@@ -49,7 +48,7 @@ body
 .
 quit
 ****
-sleep 1
+#
 #
 #
 no_stdout_check
diff --git a/test/stdout/0580 b/test/stdout/0580
new file mode 100644 (file)
index 0000000..7dbc7d2
--- /dev/null
@@ -0,0 +1,191 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaX-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaY-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaZ-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmbA-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250 OK\r
+250 Accepted\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmbB-0005vi-00\r
+221 myhost.test.ex closing connection\r
+
+******** SERVER ********
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<userx@ok.example>
+250 OK
+RCPT TO:<usery@test.ex>
+250 OK
+DATA
+354 hit me
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaX-0005vi-00
+       for usery@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+body
+.
+250 yeah got that message
+QUIT
+221 Bye
+End of script
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<userx@ok.example>
+250 OK
+RCPT TO:<usery2@test.ex>
+250 OK
+QUIT
+221 Bye
+Expected EOF read from client
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<CALLER@myhost.test.ex>
+250 OK
+RCPT TO:<usery@test.ex>
+250 OK
+RCPT TO:<usery2@test.ex>
+250 OK
+DATA
+354 hit me
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+body
+.
+250 yeah got that message
+QUIT
+221 Bye
+End of script
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<userx@ok.example>
+250 OK
+RCPT TO:<usery3@test.ex>
+250 OK
+QUIT
+221 Bye
+Expected EOF read from client
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<CALLER@myhost.test.ex>
+250 OK
+RCPT TO:<usery3@test.ex>
+250 OK
+RCPT TO:<usery@test.ex>
+250 OK
+DATA
+354 hit me
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaZ-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+body
+.
+250 yeah got that message
+QUIT
+221 Bye
+End of script
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<userx@ok.example>
+250 OK
+RCPT TO:<usery4@test.ex>
+250 OK
+RCPT TO:<usery5@test.ex>
+250 OK
+DATA
+354 hit me
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmbA-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmbA-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+body
+.
+250 yeah got that message
+QUIT
+221 Bye
+End of script
+Listening on port 1224 ... 
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250 Hi
+MAIL FROM:<useri@ok.example>
+250 OK
+RCPT TO:<remote@test.ex>
+250 OK
+DATA
+354 hit me
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmbB-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmbB-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+.
+250 message accepted
+QUIT
+221 bye
+End of script