From: Stephan Bosch Date: Sat, 27 Jul 2019 21:33:22 +0000 (+0200) Subject: lib-smtp: smtp-client-transaction - Fix immediate transaction to wait until the conne... X-Git-Tag: 2.3.10~112 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=166e99335af166ff7f32b14af6fa9b84bfa02eaf;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: smtp-client-transaction - Fix immediate transaction to wait until the connection is ready. A transaction with the immediate mode enabled did not wait and started to submit commands too early; i.e., before an EHLO reply is received. This means that the first MAIL command is always sent bare without any extensions and the XCLIENT command is not sent when it is deferred (e.g. for submission). --- diff --git a/src/lib-smtp/smtp-client-transaction.c b/src/lib-smtp/smtp-client-transaction.c index 9968030b84..225d9f5ff0 100644 --- a/src/lib-smtp/smtp-client-transaction.c +++ b/src/lib-smtp/smtp-client-transaction.c @@ -962,7 +962,8 @@ void smtp_client_transaction_start( smtp_client_connection_add_transaction(conn, trans); - if (trans->immediate) { + if (trans->immediate && + conn->state == SMTP_CLIENT_CONNECTION_STATE_READY) { trans->state = SMTP_CLIENT_TRANSACTION_STATE_MAIL_FROM; if (!trans->submitting)