]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp, lmtp: Add brackets to <session-id> in logging
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 1 Feb 2022 13:29:43 +0000 (14:29 +0100)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 1 Feb 2022 14:57:14 +0000 (15:57 +0100)
This makes it clearer where the session-id stops. It's also similar to
how it is in mail_log_prefix.

src/lib-smtp/smtp-server-transaction.c
src/lmtp/lmtp-proxy.c

index 07bc44302d688cc78e8ab388c71d0072e4f00210..29bac5375f9207c838c39663a88740e7595c6479 100644 (file)
@@ -23,7 +23,7 @@ smtp_server_transaction_update_event(struct smtp_server_transaction *trans)
                      smtp_address_encode_raw(trans->mail_from));
        smtp_params_mail_add_to_event(&trans->params, event);
        event_set_append_log_prefix(event,
-                                   t_strdup_printf("trans %s: ", trans->id));
+                                   t_strdup_printf("trans <%s>: ", trans->id));
 }
 
 struct smtp_server_transaction *
index fcb8fe964ee5cc8af704b132a69f2363b4eff0a6..a2b37c466bff3e5424b49550000622e1aaf7e34d 100644 (file)
@@ -1020,7 +1020,7 @@ lmtp_proxy_data_cb(const struct smtp_reply *proxy_reply,
 
        /* Compose log message */
        msg = t_str_new(128);
-       str_printfa(msg, "%s: ", lrcpt->session_id);
+       str_printfa(msg, "<%s>: ", lrcpt->session_id);
        if (smtp_reply_is_success(proxy_reply))
                str_append(msg, "Sent message to");
        else