Gitweb:
https://git.exim.org/exim.git/commitdiff/ea97267cea0f7e6054806504b3616f2bf9723bce
Commit: ea97267cea0f7e6054806504b3616f2bf9723bce
Parent: 70e384dde1f5b1290b807bc69c73887a7cbbe773
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Sep 23 12:07:26 2018 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Sun Sep 23 16:01:30 2018 +0100
DSN: tescase for ESMTP DSN extension, RCPT options
---
src/src/deliver.c | 20 +++----
src/src/readconf.c | 3 +-
src/src/receive.c | 2 +-
src/src/route.c | 7 +--
src/src/smtp_in.c | 18 +++---
test/confs/0618 | 88 +++++++++++++++++++++++++++++
test/log/0618 | 63 +++++++++++++++++++++
test/mail/0618.rmt_accept | 14 +++++
test/rejectlog/0618 | 7 +++
test/scripts/0000-Basic/0618 | 112 +++++++++++++++++++++++++++++++++++++
test/stdout/0618 | 130 +++++++++++++++++++++++++++++++++++++++++++
11 files changed, 437 insertions(+), 27 deletions(-)
diff --git a/src/src/deliver.c b/src/src/deliver.c
index 1cf757d..9ab7402 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -7254,7 +7254,6 @@ for (addr_dsntmp = addr_succeed; addr_dsntmp; addr_dsntmp = addr_dsntmp->next)
if ( ( addr_dsntmp->dsn_aware != dsn_support_yes
|| addr_dsntmp->dsn_flags & rf_dsnlasthop
)
- && addr_dsntmp->dsn_flags & rf_dsnflags
&& addr_dsntmp->dsn_flags & rf_notify_success
)
{
@@ -7321,11 +7320,9 @@ if (addr_senddsn)
addr_dsntmp = addr_dsntmp->next)
fprintf(f, "<%s> (relayed %s)\n\n",
addr_dsntmp->address,
- (addr_dsntmp->dsn_flags & rf_dsnlasthop) == 1
- ? "via non DSN router"
- : addr_dsntmp->dsn_aware == dsn_support_no
- ? "to non-DSN-aware mailer"
- : "via non \"Remote SMTP\" router"
+ addr_dsntmp->dsn_flags & rf_dsnlasthop ? "via non DSN router"
+ : addr_dsntmp->dsn_aware == dsn_support_no ? "to non-DSN-aware mailer"
+ : "via non \"Remote SMTP\" router"
);
fprintf(f, "--%s\n"
@@ -7360,7 +7357,7 @@ if (addr_senddsn)
addr_dsntmp->host_used->name);
else
fprintf(f, "Diagnostic-Code: X-Exim; relayed via non %s router\n\n",
- (addr_dsntmp->dsn_flags & rf_dsnlasthop) == 1 ? "DSN" : "SMTP");
+ addr_dsntmp->dsn_flags & rf_dsnlasthop ? "DSN" : "SMTP");
}
fprintf(f, "--%s\nContent-type: text/rfc822-headers\n\n", bound);
@@ -7441,9 +7438,8 @@ while (addr_failed)
mark the recipient done. */
if ( addr_failed->prop.ignore_error
- || ( addr_failed->dsn_flags & rf_dsnflags
- && (addr_failed->dsn_flags & rf_notify_failure) != rf_notify_failure
- ) )
+ || addr_failed->dsn_flags & (rf_dsnflags & ~rf_notify_failure)
+ )
{
addr = addr_failed;
addr_failed = addr->next;
@@ -8080,8 +8076,8 @@ else if (addr_defer != (address_item *)(+1))
if ( !f.queue_2stage
&& delivery_attempted
- && ( ((addr_defer->dsn_flags & rf_dsnflags) == 0)
- || (addr_defer->dsn_flags & rf_notify_delay) == rf_notify_delay
+ && ( !(addr_defer->dsn_flags & rf_dsnflags)
+ || addr_defer->dsn_flags & rf_notify_delay
)
&& delay_warning[1] > 0
&& sender_address[0] != 0
diff --git a/src/src/readconf.c b/src/src/readconf.c
index b447475..14bbf31 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -823,7 +823,8 @@ if (*s) for (m = *s == '_' ? macros : macros_user; m; m = m->next)
{
int moveby;
- READCONF_DEBUG fprintf(stderr, "%s: matched '%s' in '%s'\n", __FUNCTION__, m->name, ss);
+ READCONF_DEBUG fprintf(stderr, "%s: matched '%s' in '%.*s'\n", __FUNCTION__,
+ m->name, strlen(ss)-1, ss);
/* Expand the buffer if necessary */
while (*newlen - m->namelen + m->replen + 1 > big_buffer_size)
diff --git a/src/src/receive.c b/src/src/receive.c
index f7124a6..bc5ceba 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -487,7 +487,7 @@ if (recipients_count >= recipients_list_max)
{
recipient_item *oldlist = recipients_list;
int oldmax = recipients_list_max;
- recipients_list_max = recipients_list_max? 2*recipients_list_max : 50;
+ recipients_list_max = recipients_list_max ? 2*recipients_list_max : 50;
recipients_list = store_get(recipients_list_max * sizeof(recipient_item));
if (oldlist != NULL)
memcpy(recipients_list, oldlist, oldmax * sizeof(recipient_item));
diff --git a/src/src/route.c b/src/src/route.c
index c69bdcb..d419d1c 100644
--- a/src/src/route.c
+++ b/src/src/route.c
@@ -1672,10 +1672,7 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr)
pw = &pwcopy;
}
- /* Run the router, and handle the consequences. */
-
- /* ... but let us check on DSN before. If this should be the last hop for DSN
- set flag. */
+ /* If this should be the last hop for DSN flag the addr. */
if (r->dsn_lasthop && !(addr->dsn_flags & rf_dsnlasthop))
{
@@ -1683,6 +1680,8 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr)
HDEBUG(D_route) debug_printf("DSN: last hop for %s\n", addr->address);
}
+ /* Run the router, and handle the consequences. */
+
HDEBUG(D_route) debug_printf("calling %s router\n", r->name);
yield = (r->info->code)(r, addr, pw, verify, paddr_local, paddr_remote,
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index cb64698..b99b5cd 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -3909,7 +3909,7 @@ while (done <= 0)
int c;
auth_instance *au;
uschar *orcpt = NULL;
- int flags;
+ int dsn_flags;
gstring * g;
#ifdef AUTH_TLS
@@ -4962,7 +4962,7 @@ while (done <= 0)
/* Set the DSN flags orcpt and dsn_flags from the session*/
orcpt = NULL;
- flags = 0;
+ dsn_flags = 0;
if (fl.esmtp) for(;;)
{
@@ -4987,14 +4987,14 @@ while (done <= 0)
else if (fl.dsn_advertised && strcmpic(name, US"NOTIFY") == 0)
{
/* Check if the notify flags have been already set */
- if (flags > 0)
+ if (dsn_flags > 0)
{
done = synprot_error(L_smtp_syntax_error, 501, NULL,
US"NOTIFY can be specified once only");
goto COMMAND_LOOP;
}
if (strcmpic(value, US"NEVER") == 0)
- flags |= rf_notify_never;
+ dsn_flags |= rf_notify_never;
else
{
uschar *p = value;
@@ -5006,17 +5006,17 @@ while (done <= 0)
if (strcmpic(p, US"SUCCESS") == 0)
{
DEBUG(D_receive) debug_printf("DSN: Setting notify success\n");
- flags |= rf_notify_success;
+ dsn_flags |= rf_notify_success;
}
else if (strcmpic(p, US"FAILURE") == 0)
{
DEBUG(D_receive) debug_printf("DSN: Setting notify failure\n");
- flags |= rf_notify_failure;
+ dsn_flags |= rf_notify_failure;
}
else if (strcmpic(p, US"DELAY") == 0)
{
DEBUG(D_receive) debug_printf("DSN: Setting notify delay\n");
- flags |= rf_notify_delay;
+ dsn_flags |= rf_notify_delay;
}
else
{
@@ -5027,7 +5027,7 @@ while (done <= 0)
}
p = pp;
}
- DEBUG(D_receive) debug_printf("DSN Flags: %x\n", flags);
+ DEBUG(D_receive) debug_printf("DSN Flags: %x\n", dsn_flags);
}
}
@@ -5145,7 +5145,7 @@ while (done <= 0)
/* Set the dsn flags in the recipients_list */
recipients_list[recipients_count-1].orcpt = orcpt;
- recipients_list[recipients_count-1].dsn_flags = flags;
+ recipients_list[recipients_count-1].dsn_flags = dsn_flags;
DEBUG(D_receive) debug_printf("DSN: orcpt: %s flags: %d\n",
recipients_list[recipients_count-1].orcpt,
diff --git a/test/confs/0618 b/test/confs/0618
new file mode 100644
index 0000000..2a2d8a9
--- /dev/null
+++ b/test/confs/0618
@@ -0,0 +1,88 @@
+# Exim test configuration 0618
+
+SERVER =
+
+.include DIR/aux-var/std_conf_prefix
+
+primary_hostname = myhost.test.ex
+
+# ----- Main settings -----
+
+.ifdef OPT
+dsn_advertise_hosts = *
+.endif
+delay_warning = 3s : 24h
+
+accept_8bitmime = false
+pipelining_advertise_hosts = :
+
+trusted_users = CALLER
+acl_smtp_rcpt = rcpt
+
+log_selector = +received_recipients
+queue_only
+queue_run_in_order
+
+
+event_action = ${acl {ev_log}}
+
+#
+
+begin acl
+
+ev_log:
+ accept logwrite = event $event_name
+
+rcpt:
+ accept hosts = HOSTIPV4
+
+ deny local_parts = rmt_reject
+ defer local_parts = rmt_defer
+ accept
+
+# ----- Routers -----
+
+begin routers
+
+r1:
+ driver = accept
+ condition = ${if eq {127.0.0.1}{$sender_host_address}}
+ transport = tofile
+
+r2:
+ driver = manualroute
+ local_parts = ^rmt_.*
+ route_list = * 127.0.0.1::PORT_D
+ self = send
+ transport = smtp
+
+r3:
+ driver = manualroute
+ local_parts = deferred
+ route_list = * 127.0.0.1::PORT_S
+ self = send
+ transport = bad_tpt
+
+# ----- Transports -----
+
+begin transports
+
+smtp:
+ driver = smtp
+ event_action = ${acl {ev_log}}
+
+bad_tpt:
+ driver = smtp
+ connect_timeout = 1s
+ event_action = ${acl {ev_log}}
+
+tofile:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ user = CALLER
+ event_action = ${acl {ev_log}}
+
+begin retry
+
+* * F,1m,3s
+# End
diff --git a/test/log/0618 b/test/log/0618
new file mode 100644
index 0000000..9707711
--- /dev/null
+++ b/test/log/0618
@@ -0,0 +1,63 @@
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmaX-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmaX-0005vi-00 ** rmt_reject@??? R=r2 T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_reject@???>: 550 Administrative prohibition
+1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:fail:delivery
+1999-03-02 09:44:33 10HmaX-0005vi-00 rmt_reject@???: error ignored
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmaY-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmaY-0005vi-00 => rmt_accept@??? R=r2 T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaZ-0005vi-00"
+1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 event msg:complete
+1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbA-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbB-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
+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 10HmbA-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbA-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbA-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbA-0005vi-00 U=EXIMUSER P=local S=sss for c@???
+1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:connect
+1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:connect
+1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:host:defer
+1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:rcpt:defer
+1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:close
+1999-03-02 09:44:33 10HmbB-0005vi-00 == rmt_defer@??? R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<rmt_defer@???>: 451 Temporary local problem - please try later
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => rmt_accept <rmt_accept@???> R=r1 T=tofile
+1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:delivery
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss for b@???
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 event msg:complete
+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 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@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_reject@???
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= b@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_accept@???
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= c@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@???
+1999-03-02 09:44:33 10HmbB-0005vi-00 <= d@??? H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_defer@???
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<a@???> rejected RCPT <rmt_reject@???>
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= b@??? H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp S=sss for rmt_accept@???
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@???> temporarily rejected RCPT <rmt_defer@???>
diff --git a/test/mail/0618.rmt_accept b/test/mail/0618.rmt_accept
new file mode 100644
index 0000000..3f11215
--- /dev/null
+++ b/test/mail/0618.rmt_accept
@@ -0,0 +1,14 @@
+From b@??? Tue Mar 02 09:44:33 1999
+Received: from localhost ([127.0.0.1] helo=myhost.test.ex)
+ by myhost.test.ex with esmtp (Exim x.yz)
+ (envelope-from <b@???>)
+ id 10HmaZ-0005vi-00
+ for rmt_accept@???; Tue, 2 Mar 1999 09:44:33 +0000
+Received: from [ip4.ip4.ip4.ip4] (helo=testclient)
+ by myhost.test.ex with esmtp (Exim x.yz)
+ (envelope-from <b@???>)
+ id 10HmaY-0005vi-00
+ for rmt_accept@???; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+
+
diff --git a/test/rejectlog/0618 b/test/rejectlog/0618
new file mode 100644
index 0000000..4c495d0
--- /dev/null
+++ b/test/rejectlog/0618
@@ -0,0 +1,7 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<a@???> rejected RCPT <rmt_reject@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<c@???> temporarily rejected RCPT <rmt_defer@???>
+1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F=<d@???> temporarily rejected RCPT <rmt_defer@???>
diff --git a/test/scripts/0000-Basic/0618 b/test/scripts/0000-Basic/0618
new file mode 100644
index 0000000..c093228
--- /dev/null
+++ b/test/scripts/0000-Basic/0618
@@ -0,0 +1,112 @@
+# DSN ESMTP extension RCPT options
+#
+# Server does not advertise by default
+exim -DSERVER=server -bd -oX PORT_D
+****
+client 127.0.0.1 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250 HELP
+****
+killdaemon
+#
+#
+# Server does advertise when told. Client requests no bounces, and this one gets a reject.
+exim -DSERVER=server -DOPT=y -bd -oX PORT_D
+****
+client HOSTIPV4 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-DSN
+??? 250 HELP
+MAIL FROM:<a@???>
+??? 250
+RCPT TO:<any@???> NOTIFY=foo
+??? 501
+RCPT TO:<rmt_reject@???> NOTIFY=never
+??? 250
+DATA
+??? 354
+Subject: test
+.
+??? 250
+QUIT
+??? 221
+****
+# Client requests delivery notification; the server supports DSN to takes responsibility
+client HOSTIPV4 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-DSN
+??? 250 HELP
+MAIL FROM:<b@???>
+??? 250
+RCPT TO:<rmt_accept@???> NOTIFY=success
+??? 250
+DATA
+??? 354
+Subject: test
+.
+??? 250
+QUIT
+??? 221
+****
+# Client requests notification of deferral. First time of trying, the
+# queue-time probably has not hit the 1st retry time yet, so no DSN will
+# be sent and the message remains queued.
+client HOSTIPV4 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-DSN
+??? 250 HELP
+MAIL FROM:<c@???>
+??? 250
+RCPT TO:<rmt_defer@???> NOTIFY=delay
+??? 250
+DATA
+??? 354
+Subject: test
+.
+??? 250
+QUIT
+??? 221
+****
+# Clients requests no DSNs, and this one gets deferred
+client HOSTIPV4 PORT_D
+??? 220
+EHLO testclient
+??? 250-
+??? 250-SIZE
+??? 250-DSN
+??? 250 HELP
+MAIL FROM:<d@???>
+??? 250
+RCPT TO:<rmt_defer@???> NOTIFY=never
+??? 250
+DATA
+??? 354
+Subject: test
+.
+??? 250
+QUIT
+??? 221
+****
+# This attemmpt the set of all the above, for the first time.
+exim -q
+****
+sleep 3
+# Second time, for the queued deferrals. Final delivery for the acceptance.
+exim -q
+****
+killdaemon
+#
+#
+no_msglog_check
diff --git a/test/stdout/0618 b/test/stdout/0618
new file mode 100644
index 0000000..a04553a
--- /dev/null
+++ b/test/stdout/0618
@@ -0,0 +1,130 @@
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-myhost.test.ex Hello testclient [127.0.0.1]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250 HELP
+<<< 250 HELP
+End of script
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-myhost.test.ex Hello testclient [ip4.ip4.ip4.ip4]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-DSN
+<<< 250-DSN
+??? 250 HELP
+<<< 250 HELP
+>>> MAIL FROM:<a@???>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<any@???> NOTIFY=foo
+??? 501
+<<< 501 Invalid value for NOTIFY parameter
+>>> RCPT TO:<rmt_reject@???> NOTIFY=never
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: test
+>>> .
+??? 250
+<<< 250 OK id=10HmaX-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-myhost.test.ex Hello testclient [ip4.ip4.ip4.ip4]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-DSN
+<<< 250-DSN
+??? 250 HELP
+<<< 250 HELP
+>>> MAIL FROM:<b@???>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<rmt_accept@???> NOTIFY=success
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: test
+>>> .
+??? 250
+<<< 250 OK id=10HmaY-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-myhost.test.ex Hello testclient [ip4.ip4.ip4.ip4]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-DSN
+<<< 250-DSN
+??? 250 HELP
+<<< 250 HELP
+>>> MAIL FROM:<c@???>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<rmt_defer@???> NOTIFY=delay
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: test
+>>> .
+??? 250
+<<< 250 OK id=10HmbA-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script
+Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> EHLO testclient
+??? 250-
+<<< 250-myhost.test.ex Hello testclient [ip4.ip4.ip4.ip4]
+??? 250-SIZE
+<<< 250-SIZE 52428800
+??? 250-DSN
+<<< 250-DSN
+??? 250 HELP
+<<< 250 HELP
+>>> MAIL FROM:<d@???>
+??? 250
+<<< 250 OK
+>>> RCPT TO:<rmt_defer@???> NOTIFY=never
+??? 250
+<<< 250 Accepted
+>>> DATA
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Subject: test
+>>> .
+??? 250
+<<< 250 OK id=10HmbB-0005vi-00
+>>> QUIT
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script