From: Timo Sirainen Date: Tue, 1 Feb 2022 13:29:43 +0000 (+0100) Subject: lib-smtp, lmtp: Add brackets to in logging X-Git-Tag: 2.3.19~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f26b7d3c13dcc6e329aed830cbecd774d391bcfc;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp, lmtp: Add brackets to in logging This makes it clearer where the session-id stops. It's also similar to how it is in mail_log_prefix. --- diff --git a/src/lib-smtp/smtp-server-transaction.c b/src/lib-smtp/smtp-server-transaction.c index 07bc44302d..29bac5375f 100644 --- a/src/lib-smtp/smtp-server-transaction.c +++ b/src/lib-smtp/smtp-server-transaction.c @@ -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 * diff --git a/src/lmtp/lmtp-proxy.c b/src/lmtp/lmtp-proxy.c index 186a62e2fe..d8a6d7beb7 100644 --- a/src/lmtp/lmtp-proxy.c +++ b/src/lmtp/lmtp-proxy.c @@ -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