From f0a4458d49a94b6a8be39ab4feb05b001ecaa904 Mon Sep 17 00:00:00 2001 From: Balasubramania Pillai Date: Thu, 6 Aug 2026 10:40:19 -0400 Subject: [PATCH] Momentum#1472 document the %OC custom_logger macro and disambiguate the mainlog connection-ID fields custom_logger gains %OC (outbound connection ID) so custom formats can match what ec_logger writes in the mainlog connection field on D/T/P records without changing what %CI has always meant. Clarify %CI as the inbound connection ID, and spell out inbound vs outbound for the four mainlog connection-ID rows. Co-Authored-By: Claude Fable 5 --- content/momentum/4/log-formats-mainlog.md | 8 ++++---- content/momentum/4/modules/custom-logger.md | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/content/momentum/4/log-formats-mainlog.md b/content/momentum/4/log-formats-mainlog.md index bc0ea87aa..e52cd9981 100644 --- a/content/momentum/4/log-formats-mainlog.md +++ b/content/momentum/4/log-formats-mainlog.md @@ -32,7 +32,7 @@ The following is a description of the fields: | 0 | 1064868656 | Date of reception in Unix timestamp format (seconds since 00:00:00 Jan 1, 1970) | | 1 | 00/00-25004-31B987F3 | Message's unique message-id | | 2 | 00/00-03736-F4101B54 | Batch ID | -| 3 | 00/00-04532-A3456B54 | Connection ID | +| 3 | 00/00-04532-A3456B54 | Connection ID: the inbound connection the message was received over | | 4 | R | `R` indicating a reception | | 5 | bob | Localpart of the recipient | | 6 | example.fict | Domain of the recipient | @@ -63,7 +63,7 @@ The following is a description of the fields: | 0 | 1064871280 | Date of delivery in Unix timestamp format (seconds since 00:00:00 Jan 1, 1970) | | 1 | 20/00-25593-945A87F3 | Message's unique message-id | | 2 | 00/00-03736-F4101B54 | Batch ID | -| 3 | 00/00-04532-A3456B54 | Connection ID | +| 3 | 00/00-04532-A3456B54 | Connection ID: the outbound connection delivery was attempted over. Each attempt uses a new connection, so retries log different values. | | 4 | D | `D` indicating a successful delivery or `X` indicating a transfer between nodes, in a cluster configuration.
`X` entries appear in the delivery log on the transferring node indicating that the message left for another cluster node, while `R` entries appear in the reception log on the node receiving the message with `xfer` in its protocol field. | | 5 | postalengine.com | Destination domain | | 6 | 266 | Size in bytes of the delivered message | @@ -92,7 +92,7 @@ The following is a description of the fields: | 0 | 1064869327 | Date of transient failure in Unix timestamp format (seconds since 00:00:00 Jan 1, 1970) | | 1 | 00/00-25004-31B987F3 | Message's unique message-id | | 2 | 00/00-03736-F4101B54 | Batch ID | -| 3 | 00/00-04532-A3456B54 | Connection ID | +| 3 | 00/00-04532-A3456B54 | Connection ID: the outbound connection delivery was attempted over. Each attempt uses a new connection, so retries log different values. | | 4 | T | `T` indicating a transient failure | | 5 | example.fict | Destination domain | | 6 | 0 | Number of bytes of data transferred before the failure occurred. A value of 0 indicates no connection could be made. | @@ -123,7 +123,7 @@ The following is a description of the fields: | 0 | 1064870847 | Date of permanent failure in Unix timestamp format (seconds since 00:00:00 Jan 1, 1970) | | 1 | 10/00-25593-393A87F3 | Message's unique message-id | | 2 | 00/00-03736-F4101B54 | Batch ID | -| 3 | 00/00-04532-A3456B54 | Connection ID | +| 3 | 00/00-04532-A3456B54 | Connection ID: the outbound connection delivery was attempted over. Each attempt uses a new connection, so retries log different values. | | 4 | P | `P` indicating a permanent failure, such as an in-band bounce | | 5 | postalengine.com | Destination domain | | 6 | 31 | Number of bytes of data transferred before the failure occurred. In this example, 31 bytes were transferred before the remote server returned its error. | diff --git a/content/momentum/4/modules/custom-logger.md b/content/momentum/4/modules/custom-logger.md index 0fe2dcc2c..234c30041 100644 --- a/content/momentum/4/modules/custom-logger.md +++ b/content/momentum/4/modules/custom-logger.md @@ -572,7 +572,7 @@ Number of the heuristic classification of the message from the DSN received from
-Connection ID +Inbound connection ID: the connection over which the message was received. This is what the mainlog carries in its connection field on reception records; for the connection a delivery was attempted over, see `%OC`.
@@ -658,6 +658,14 @@ Number of times the message has been tried +
%OC
+ +
+ +Outbound connection ID: the connection over which delivery was attempted. Each attempt uses a new connection, so retries of the same message log different values. This is the value the mainlog carries in its connection field on delivery, transient failure and permanent failure records. Expands empty on receptions, which have no outbound connection. + +
+
%P