LMTP is a but troublesome in that a single LMTP session can do multiple RCPT
TOs, so the same session will end up delivering mails to multiple different
users. This is causing trouble with stats process, because each delivery is
using the same session ID for multiple different users, which causes errors
about session ID duplication in stats process. So we'll need to make the
session IDs unique, while still keeping it clear enough that they're part of
the same original LMTP session (which is also visible in th Received: headers).
I'm now thinking that the first recipient's delivery will have the
original normal session ID (e.g. "ME3ZHCi+A1dUDQAAvAUe3g"), while the
following recipients will have :2, :3, etc suffix (e.g.
"ME3ZHCi+A1dUDQAAvAUe3g:2"). If somebody cares about parsing the
original session ID from logs, they can just cut off the session ID from the
first ':' character (because indexer-worker also adds its own :suffix).
So now I'm mainly wondering if ':' is a good character? Has somebody
already changed mail_log_prefix in a way that these additional ':' chars
might break their log parsers (e.g. mail_log_prefix=%u:%s%{session}:%r).