]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: server: connection: Add debug messages for protocol elements sent outside...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 2 Nov 2018 09:17:30 +0000 (10:17 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:41:55 +0000 (15:41 +0200)
src/lib-smtp/smtp-server-connection.c

index d26d0b0d4d4eaf4e382c65b70a1b167723ccbd6f..c0a051682866f8e88fb065105746f0409f86e7a3 100644 (file)
@@ -1188,11 +1188,15 @@ void smtp_server_connection_send_line(struct smtp_server_connection *conn,
        va_list args;
 
        va_start(args, fmt);
+
        T_BEGIN {
                string_t *str;
 
                str = t_str_new(256);
                str_vprintfa(str, fmt, args);
+
+               smtp_server_connection_debug(conn, "Sent: %s", str_c(str));
+
                str_append(str, "\r\n");
                o_stream_nsend(conn->conn.output, str_data(str), str_len(str));
        } T_END;
@@ -1212,6 +1216,9 @@ void smtp_server_connection_reply_immediate(
                str = t_str_new(256);
                str_printfa(str, "%03u ", status);
                str_vprintfa(str, fmt, args);
+
+               smtp_server_connection_debug(conn, "Sent: %s", str_c(str));
+
                str_append(str, "\r\n");
                o_stream_nsend(conn->conn.output, str_data(str), str_len(str));
        } T_END;