The same issue arises with the ACL regex condition, which is applied
to every line of a received message.
+JH/21 Bug 3059: Fix crash in smtp transport. When running for a message for
+ which all recipients had been handled (itself an issue) a null-pointer
+ deref was done on trying to write a retry record. Fix that by counting
+ the outstanding recipients before trying to transmit the message.
+ The situation arose for a second MX try within a transport run, when the
+ first had perm-rejected a recipient (the only one for the connection, in
+ the case seen) during pipelining, and then closed the TCP connection.
+ The transport classified that as an I/O error, leaving the message
+ outstanding but having marked up the recipient as dealt-with. It then
+ tried another MX because of the I/O error. Fix this by converting the
+ message-level status to ok if there was a close but all recipients were
+ dealt with. Thanks to Wolfgand Breyha for debug runs.
Exim version 4.97
-----------------
break;
case ERRNO_SMTPCLOSED:
- message_error = Ustrncmp(smtp_command,"end ",4) == 0;
+ /* If the peer closed the TCP connection after end-of-data, but before
+ we could send QUIT, do TLS close, etc - call it a message error.
+ Otherwise, if all the recipients have been dealt with, call a close no
+ error at all; each address_item should have a suitable result already
+ (2xx: PENDING_OK, 4xx: DEFER, 5xx: FAIL) */
+
+ if (!(message_error = Ustrncmp(smtp_command,"end ",4) == 0))
+ {
+ address_item * addr;
+ for (addr = sx->addrlist; addr; addr = addr->next)
+ if (addr->transport_return == PENDING_DEFER)
+ break;
+ if (!addr) /* all rcpts fates determined */
+ {
+ log_write(0, LOG_MAIN, "peer close after all rcpt responses;"
+ " converting i/o-error to no-error");
+ sx->ok = TRUE;
+ goto happy;
+ }
+ }
break;
#ifndef DISABLE_DKIM
break;
}
- /* Handle the cases that are treated as message errors. These are:
+ /* Handle the cases that are treated as message errors (as opposed to
+ host-errors). These are:
(a) negative response or timeout after MAIL
(b) negative response after DATA
can), so we do not pass such a connection on if the host matches
hosts_nopass_tls. */
+happy:
+
DEBUG(D_transport)
debug_printf("ok=%d send_quit=%d send_rset=%d continue_more=%d "
"yield=%d first_address is %sNULL\n", sx->ok, sx->send_quit,
*/
static address_item *
-prepare_addresses(address_item *addrlist, host_item *host)
+prepare_addresses(address_item * addrlist, host_item * host)
{
-address_item *first_addr = NULL;
+address_item * first_addr = NULL;
for (address_item * addr = addrlist; addr; addr = addr->next)
if (addr->transport_return == DEFER)
{
if (!first_addr) first_addr = addr;
addr->transport_return = PENDING_DEFER;
addr->basic_errno = 0;
- addr->more_errno = (host->mx >= 0)? 'M' : 'A';
+ addr->more_errno = host->mx >= 0 ? 'M' : 'A';
addr->message = NULL;
#ifndef DISABLE_TLS
addr->cipher = NULL;
BOOL
smtp_transport_entry(
- transport_instance *tblock, /* data for this instantiation */
- address_item *addrlist) /* addresses we are working on */
+ transport_instance * tblock, /* data for this instantiation */
+ address_item * addrlist) /* addresses we are working on */
{
int defport;
-int hosts_defer = 0;
-int hosts_fail = 0;
-int hosts_looked_up = 0;
-int hosts_retry = 0;
-int hosts_serial = 0;
-int hosts_total = 0;
-int total_hosts_tried = 0;
+int hosts_defer = 0, hosts_fail = 0, hosts_looked_up = 0;
+int hosts_retry = 0, hosts_serial = 0, hosts_total = 0, total_hosts_tried = 0;
BOOL expired = TRUE;
-uschar *expanded_hosts = NULL;
-uschar *pistring;
-uschar *tid = string_sprintf("%s transport", tblock->name);
-smtp_transport_options_block *ob = SOB tblock->options_block;
-host_item *hostlist = addrlist->host_list;
-host_item *host = NULL;
+uschar * expanded_hosts = NULL, * pistring;
+uschar * tid = string_sprintf("%s transport", tblock->name);
+smtp_transport_options_block * ob = SOB tblock->options_block;
+host_item * hostlist = addrlist->host_list, * host = NULL;
DEBUG(D_transport)
{
queue_smtp or a 2-stage queue run. This gets unset for certain
kinds of error, typically those that are specific to the message. */
-update_waiting = TRUE;
+update_waiting = TRUE;
/* If a host list is not defined for the addresses - they must all have the
same one in order to be passed to a single transport - or if the transport has
&& total_hosts_tried < ob->hosts_max_try_hardlimit;
host = nexthost)
{
- int rc;
- int host_af;
- BOOL host_is_expired = FALSE;
- BOOL message_defer = FALSE;
- BOOL some_deferred = FALSE;
- address_item *first_addr = NULL;
- uschar *interface = NULL;
- uschar *retry_host_key = NULL;
- uschar *retry_message_key = NULL;
- uschar *serialize_key = NULL;
+ int rc, host_af;
+ BOOL host_is_expired = FALSE, message_defer = FALSE, some_deferred = FALSE;
+ address_item * first_addr = NULL;
+ uschar * interface = NULL;
+ uschar * retry_host_key = NULL, * retry_message_key = NULL;
+ uschar * serialize_key = NULL;
/* Deal slightly better with a possible Linux kernel bug that results
in intermittent TFO-conn fails deep into the TCP flow. Bug 2907 tracks.
out the result of previous attempts, and finding the first address that
is still to be delivered. */
- first_addr = prepare_addresses(addrlist, host);
+ if (!(first_addr = prepare_addresses(addrlist, host)))
+ {
+ /* Obscure situation; at least one case (bug 3059, fixed) where
+ a previous host try returned DEFER, but having moved all
+ recipients away from DEFER (the waiting-to-be-done state). */
+ DEBUG(D_transport) debug_printf("no pending recipients\n");
+ goto END_TRANSPORT;
+ }
DEBUG(D_transport) debug_printf("delivering %s to %s [%s] (%s%s)\n",
message_id, host->name, host->address, addrlist->address,
{
host_item * thost;
/* Make a copy of the host if it is local to this invocation
- of the transport. */
+ of the transport. */
if (expanded_hosts)
{
if (rc == OK)
for (address_item * addr = addrlist; addr; addr = addr->next)
if (addr->transport_return == DEFER)
- {
- some_deferred = TRUE;
- break;
- }
+ { some_deferred = TRUE; break; }
/* If no addresses deferred or the result was ERROR, return. We do this for
ERROR because a failing filter set-up or add_headers expansion is likely to
fail for any host we try. */
if (rc == ERROR || (rc == OK && !some_deferred))
- {
- DEBUG(D_transport) debug_printf("Leaving %s transport\n", tblock->name);
- return TRUE; /* Each address has its status */
- }
+ goto END_TRANSPORT;
/* If the result was DEFER or some individual addresses deferred, let
the loop run to try other hosts with the deferred addresses, except for the
if ((rc == DEFER || some_deferred) && nexthost)
{
BOOL timedout;
- retry_config *retry = retry_find_config(host->name, NULL, 0, 0);
+ retry_config * retry = retry_find_config(host->name, NULL, 0, 0);
if (retry && retry->rules)
{
before proceeding.
(3) A line containing "*data" and a number specifies that the client is
- expected to send that many byte; the server discards them
+ expected to send that many bytes; the server discards them
(4) A line containing "*eof" specifies that the client is expected to close
the connection at this point.
begin acl
check_recipient:
+.ifdef RETRY2
+ drop condition = ${if eq {SERVER}{server}}
+ message = 550 we really do not like you
+.endif
accept hosts = :
accept domains = +local_domains
deny message = relay not permitted
remote_smtp:
driver = smtp
+.ifdef RETRY2
+ hosts = 127.0.0.1 : HOSTIPV4
+.else
hosts = 127.0.0.1
+.endif
port = PORT_S
hosts_try_fastopen = :
.ifdef _HAVE_TLS
-2017-07-30 18:51:05.712 10HmaX-000000005vi-0000 <= sender@source.dom U=root Ci=p1234 P=local-bsmtp S=sss for p@test.ex
-2017-07-30 18:51:05.712 10HmaX-000000005vi-0000 => p@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] K C="250 OK bdat"
+2017-07-30 18:51:05.712 10HmaX-000000005vi-0000 <= sender@source.dom U=root Ci=p1235 P=local-bsmtp S=sss for a@test.ex
+2017-07-30 18:51:05.712 10HmaX-000000005vi-0000 => a@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] K C="250 OK bdat"
2017-07-30 18:51:05.712 10HmaX-000000005vi-0000 Completed
-2017-07-30 18:51:05.712 10HmaY-000000005vi-0000 <= sender@source.dom U=root Ci=p1235 P=local-bsmtp S=sss for r@test.ex
-2017-07-30 18:51:05.712 10HmaY-000000005vi-0000 => r@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] K C="250 OK bdat"
+2017-07-30 18:51:05.712 10HmaY-000000005vi-0000 <= sender@source.dom U=root Ci=p1236 P=local-bsmtp S=sss for c@test.ex
+2017-07-30 18:51:05.712 10HmaY-000000005vi-0000 => c@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] K C="250 OK bdat"
2017-07-30 18:51:05.712 10HmaY-000000005vi-0000 Completed
-2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 <= sender@source.dom U=root Ci=p1236 P=local-bsmtp S=sss for s@test.ex
-2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 ** s@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 550 unacceptable mail-from
-2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 s@test.ex: error ignored
+2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 <= sender@source.dom U=root Ci=p1237 P=local-bsmtp S=sss for d@test.ex
+2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 ** d@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 550 unacceptable mail-from
+2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 d@test.ex: error ignored
2017-07-30 18:51:05.712 10HmaZ-000000005vi-0000 Completed
-2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 <= sender@source.dom U=root Ci=p1237 P=local-bsmtp S=sss for s1@test.ex
+2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 <= sender@source.dom U=root Ci=p1238 P=local-bsmtp S=sss for c1@test.ex
2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 450 greylisted mail-from
-2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 == s1@test.ex R=to_server T=remote_smtp defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 450 greylisted mail-from
-2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 <= sender@source.dom U=root Ci=p1238 P=local-bsmtp S=sss for t@test.ex
-2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 ** t@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<t@test.ex>: 550 no such recipient
-2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 t@test.ex: error ignored
+2017-07-30 18:51:05.712 10HmbA-000000005vi-0000 == c1@test.ex R=to_server T=remote_smtp defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 450 greylisted mail-from
+2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 <= sender@source.dom U=root Ci=p1239 P=local-bsmtp S=sss for e@test.ex
+2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 ** e@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<e@test.ex>: 550 no such recipient
+2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 e@test.ex: error ignored
2017-07-30 18:51:05.712 10HmbB-000000005vi-0000 Completed
-2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 <= sender@source.dom U=root Ci=p1239 P=local-bsmtp S=sss for u@test.ex
-2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 ** u@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 500 oops bdat
-2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 u@test.ex: error ignored
+2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 <= sender@source.dom U=root Ci=p1240 P=local-bsmtp S=sss for f1@test.ex
+2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 peer close after all rcpt responses; converting i/o-error to no-error
+2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 ** f1@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes: SMTP error from remote mail server after RCPT TO:<f1@test.ex>: 550 we really do not like you
+2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 f1@test.ex: error ignored
2017-07-30 18:51:05.712 10HmbC-000000005vi-0000 Completed
-2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 <= sender@source.dom U=root Ci=p1240 P=local-bsmtp S=sss for v@test.ex
-2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 400 not right now bdat
-2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 == v@test.ex R=to_server T=remote_smtp defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 400 not right now bdat
+2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 <= sender@source.dom U=root Ci=p1241 P=local-bsmtp S=sss for g@test.ex
+2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 ** g@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 500 oops bdat
+2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 g@test.ex: error ignored
+2017-07-30 18:51:05.712 10HmbD-000000005vi-0000 Completed
+2017-07-30 18:51:05.712 10HmbE-000000005vi-0000 <= sender@source.dom U=root Ci=p1242 P=local-bsmtp S=sss for h@test.ex
+2017-07-30 18:51:05.712 10HmbE-000000005vi-0000 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 400 not right now bdat
+2017-07-30 18:51:05.712 10HmbE-000000005vi-0000 == h@test.ex R=to_server T=remote_smtp defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 400 not right now bdat
+
+******** SERVER ********
+2017-07-30 18:51:05.712 exim x.yz daemon started: pid=p1243, no queue runs, listening for SMTP on port PORT_S
+2017-07-30 18:51:05.712 H=localhost (testhost.test.ex) [127.0.0.1] Ci=p1234 X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no F=<> rejected RCPT <f1@test.ex>: 550 we really do not like you
--- /dev/null
+
+******** SERVER ********
+2017-07-30 18:51:05.712 H=localhost (testhost.test.ex) [127.0.0.1] Ci=p1234 X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=no F=<> rejected RCPT <f1@test.ex>: 550 we really do not like you
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<p@test.ex>
+RCPT TO:<a@test.ex>
DATA
Subject: foo
#sudo exim -odf -bS
#EHLO test
#MAIL FROM:<sender@source.dom>
-#RCPT TO:<q@test.ex>
+#RCPT TO:<b@test.ex>
#DATA
#Subject: foo
#
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<r@test.ex>
+RCPT TO:<c@test.ex>
DATA
Subject: foo
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<s@test.ex>
+RCPT TO:<d@test.ex>
DATA
Subject: foo
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<s1@test.ex>
+RCPT TO:<c1@test.ex>
DATA
Subject: foo
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<t@test.ex>
+RCPT TO:<e@test.ex>
DATA
Subject: foo
QUIT
****
#
+# server rejects RCPT cmd, and immediately drops the TCP conn
+sudo rm DIR/spool/db/retry
+exim -bd -DSERVER=server -DRETRY2 -DSRV=tls -oX PORT_S
+****
+sudo exim -DRETRY2 -odf -bS
+EHLO test
+MAIL FROM:<sender@source.dom>
+RCPT TO:<f1@test.ex>
+DATA
+Subject: foo
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+BigHeader_500: 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 12345
+
+data
+.
+QUIT
+****
+killdaemon
+#
# server rejects BDAT cmd
server PORT_S
220 Greetings
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<u@test.ex>
+RCPT TO:<g@test.ex>
DATA
Subject: foo
sudo exim -odf -bS
EHLO test
MAIL FROM:<sender@source.dom>
-RCPT TO:<v@test.ex>
+RCPT TO:<h@test.ex>
DATA
Subject: foo
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<p@test.ex>
+RCPT TO:<a@test.ex>
BDAT 345 LAST
250 OK mail
250 OK rcpt
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<r@test.ex>
+RCPT TO:<c@test.ex>
BDAT 345 LAST
250 OK mail
250 OK rcpt
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<s@test.ex>
+RCPT TO:<d@test.ex>
BDAT 345 LAST
550 unacceptable mail-from
550 rcpt ungood lacking mail-from
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<s1@test.ex>
+RCPT TO:<c1@test.ex>
BDAT 346 LAST
450 greylisted mail-from
550 rcpt ungood lacking mail-from
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<t@test.ex>
+RCPT TO:<e@test.ex>
BDAT 345 LAST
250 OK mail
550 no such recipient
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<u@test.ex>
+RCPT TO:<g@test.ex>
BDAT 345 LAST
250 OK mail
250 OK rcpt
250-PIPELINING
250 CHUNKING
MAIL FROM:<>
-RCPT TO:<v@test.ex>
+RCPT TO:<h@test.ex>
BDAT 345 LAST
250 OK mail
250 OK rcpt