]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: client: command: Add debug message showing what commands are being sent...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 6 Jan 2019 15:21:29 +0000 (16:21 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 10 Jan 2019 07:08:56 +0000 (07:08 +0000)
src/lib-smtp/smtp-client-command.c

index 185904dca4335a1982c0ca19a055afb26523127f..3854cc58167818f3e55cef333b7f6c29ede0d755 100644 (file)
@@ -415,7 +415,13 @@ void smtp_client_command_set_replies(struct smtp_client_command *cmd,
 static void
 smtp_client_command_sent(struct smtp_client_command *cmd)
 {
-       smtp_client_command_debug(cmd, "Sent");
+       if (cmd->data == NULL)
+               smtp_client_command_debug(cmd, "Sent");
+       else {
+               i_assert(str_len(cmd->data) > 2);
+               str_truncate(cmd->data, str_len(cmd->data)-2);
+               smtp_client_command_debug(cmd, "Sent: %s", str_c(cmd->data));
+       }
 
        if (smtp_client_command_name_equals(cmd, "QUIT"))
                cmd->conn->sent_quit = TRUE;