]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-server-cmd-helo - Stop processing pipeline until HELO/EHLO is complete.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sun, 8 Nov 2020 23:02:51 +0000 (00:02 +0100)
committerMartti Rannanjärvi <martti.rannanjarvi@open-xchange.com>
Fri, 21 Jan 2022 07:37:47 +0000 (09:37 +0200)
A subsequent MAIL command could get reset in the middle otherwise. Before, it
only blocked input until a reply was submitted, but the transaction isn't reset
until the EHLO/HELO command is complete (just before actually sending the reply)
which can cause issues when the subsequent MAIL command is already
being processed.

src/lib-smtp/smtp-server-cmd-helo.c

index f1f908a82b8f7232a124b5215457391aa62fa5b5..2f03cebc33148d690301209245ffd73f5f8dfa76 100644 (file)
@@ -66,7 +66,7 @@ smtp_server_cmd_helo_run(struct smtp_server_cmd_ctx *cmd, const char *params,
        }
        ret = smtp_helo_domain_parse(params, !old_smtp, &domain);
 
-       smtp_server_command_input_lock(cmd);
+       smtp_server_command_pipeline_block(cmd);
        if (conn->state.state == SMTP_SERVER_STATE_GREETING) {
                smtp_server_connection_set_state(conn, SMTP_SERVER_STATE_HELO,
                                                 NULL);