]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-reply - Add debug message for reply send error.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 12 Apr 2021 19:12:27 +0000 (21:12 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 15 Apr 2021 06:59:59 +0000 (06:59 +0000)
This makes it a little clearer at what point the connection loss or error was
noticed and for which command/reply.

src/lib-smtp/smtp-server-reply.c

index ec9747825351acf18449f19558721259e3f5760b..5c68df0bf3d97466579c7e49606eb1b8159cc05b 100644 (file)
@@ -627,6 +627,8 @@ static int smtp_server_reply_send_real(struct smtp_server_reply *reply)
        }
 
        if (o_stream_send(output, str_data(textbuf), str_len(textbuf)) < 0) {
+               e_debug(reply->event, "Send failed: %s",
+                       o_stream_get_disconnect_reason(output));
                smtp_server_connection_handle_output_error(conn);
                return -1;
        }