From a65c415633eb8753963ea6b42e0b3a8a0f2a1393 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 31 Jan 2017 16:00:54 +0000 Subject: [PATCH] Callouts: fix recipient verify/random Broken-by: e9166683487c --- src/src/verify.c | 13 +++++++++---- test/stderr/0476 | 2 ++ test/stdout/0473 | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/src/verify.c b/src/src/verify.c index 3dd2d3a39..96c2b66cc 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -778,6 +778,9 @@ tls_retry_connection: need another return code filtering out to here. */ + /* Remember when we last did a random test */ + new_domain_record.random_stamp = time(NULL); + if (smtp_write_mail_and_rcpt_cmds(&sx, &yield) == 0) switch(addr->transport_return) { @@ -810,13 +813,15 @@ tls_retry_connection: (void) event_raise(addr->transport->event_action, US"tcp:close", NULL); #endif + addr->address = main_address; + addr->transport_return = PENDING_DEFER; + sx.first_addr = sx.sync_addr = addr; + sx.ok = FALSE; + sx.send_rset = TRUE; + sx.completed_addr = FALSE; goto tls_retry_connection; } - /* Remember when we last did a random test */ - - new_domain_record.random_stamp = time(NULL); - /* Re-setup for main verify, or for the error message when failing */ addr->address = main_address; addr->transport_return = PENDING_DEFER; diff --git a/test/stderr/0476 b/test/stderr/0476 index 6868a902c..1ecd54d00 100644 --- a/test/stderr/0476 +++ b/test/stderr/0476 @@ -33,6 +33,7 @@ not using DSN cmd buf flush ddd bytes SMTP<< 250 OK SMTP<< 550 NO + SMTP(closed)<< Remote host closed connection in response to pipelined DATA error for DATA ignored: pipelining is in use and there were no good recipients ok=1 send_quit=1 send_rset=1 continue_more=0 yield=0 first_address is NULL @@ -40,6 +41,7 @@ transport_check_waiting entered sequence=1 local_max=500 global_max=-1 SMTP>> RSET cmd buf flush ddd bytes + SMTP(closed)<< H=127.0.0.1 [127.0.0.1] Remote host closed connection in response to RSET SMTP(close)>> set_process_info: pppp delivering 10HmaX-0005vi-00: just tried 127.0.0.1 [127.0.0.1] for userx@test.ex: result OK diff --git a/test/stdout/0473 b/test/stdout/0473 index 6199bf9bc..eda29bd92 100644 --- a/test/stdout/0473 +++ b/test/stdout/0473 @@ -253,7 +253,7 @@ EHLO the.local.host.name 250 OK MAIL FROM:<> 250 OK -RCPT TO: +RCPT TO: 250 OK QUIT 250 OK -- 2.25.1