]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-client-transaction - Fix immediate transaction to wait until the conne...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 27 Jul 2019 21:33:22 +0000 (23:33 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 31 Jan 2020 13:43:44 +0000 (13:43 +0000)
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).

src/lib-smtp/smtp-client-transaction.c

index 9968030b8490ce8b48cf4fa08dab08d917c541d0..225d9f5ff06c7fef4947041cede0ef7a28de4487 100644 (file)
@@ -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)