From: Stephan Bosch Date: Sun, 8 Nov 2020 23:02:51 +0000 (+0100) Subject: lib-smtp: smtp-server-cmd-helo - Stop processing pipeline until HELO/EHLO is complete. X-Git-Tag: 2.3.19~131 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a7616f93bc26836273c8ee6ebf35d952065ca6c;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: smtp-server-cmd-helo - Stop processing pipeline until HELO/EHLO is complete. 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. --- diff --git a/src/lib-smtp/smtp-server-cmd-helo.c b/src/lib-smtp/smtp-server-cmd-helo.c index f1f908a82b..2f03cebc33 100644 --- a/src/lib-smtp/smtp-server-cmd-helo.c +++ b/src/lib-smtp/smtp-server-cmd-helo.c @@ -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);