From: Stephan Bosch Date: Tue, 30 Sep 2025 02:35:01 +0000 (+0200) Subject: lib-smtp: smtp-client-command - Allow sending empty AUTH line X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=613ebbd2b52a483210ba863e9fb3f09062ddf6dd;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: smtp-client-command - Allow sending empty AUTH line --- diff --git a/src/lib-smtp/smtp-client-command.c b/src/lib-smtp/smtp-client-command.c index 66d5bb5c24..deb15d4473 100644 --- a/src/lib-smtp/smtp-client-command.c +++ b/src/lib-smtp/smtp-client-command.c @@ -509,8 +509,10 @@ static void smtp_client_command_sent(struct smtp_client_command *cmd) if (cmd->data == NULL) e_debug(e->event(), "Sent"); - else { - i_assert(str_len(cmd->data) > 2); + else if (str_len(cmd->data) <= 2) { + i_assert(str_len(cmd->data) == 2); + e_debug(e->event(), "Sent empty line"); + } else { str_truncate(cmd->data, str_len(cmd->data)-2); e_debug(e->event(), "Sent: %s", str_c(cmd->data)); }