Lack of session ID or tranzationID

Your question

I noticed that Stalwart is not having in the logs a unique ID for the session like other email servers. It will be very easy to extract from the log (especially at Trace level) only the lines relevant for a transaxtion using grep on an ID. That ID should be the same for all the log line of the session starting with EHLO and finishind with Delivered or Defered.
Is there a reason why this is lacking?
I didn’t see any other method to extract only the lines of an incoming or outgoing email from the log, is there one?

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

The id does exist, every SMTP session has a span id that’s the same on every event of that transaction, from EHLO through to delivered or deferred. It’s just not printed in the default plain-text log lines, which is why you haven’t seen it. Switch to a JSON log tracer (or a webhook/OpenTelemetry tracer) and the spanId field is emitted, so you can grep on that to isolate a single transaction.