]> 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 15:00:43 +0000 (16:00 +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 186a62e2fe38b75c741a03f172ac22ef216122de..d8a6d7beb75dea0d15f2594ba347793f31bca173 100644 (file)
@@ -747,7 +747,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