Open matteomattei opened 2 years ago
Pull request created: #290
Can you consider to merge/review/rework the pull request #290? Just to know... because if you intend to import this functionality in the main stream ok, otherwise I need to use my separate fork since I need to be compliant with the regulations in term of traceability.
Hello, for legal compliance all smtp logs must contain a unique string from the initial smtp connect to the end of all deliveries. This is what postfix does for example with the session-id and also dovecot for what regards pop/imap communication.
This is an extract of the logs of a Zone-Mta for a very simple delivery from the smtp connection up to the final delivery:
You can see that the first two lines reports the session-id (hqrnsxavtse7rske) but it disappears in the next logs. In fact, after the authentication, the only quantity which is logged in every line becomes the envelope-id (17ebf018c77000b160).
I created a custom log in the smtp:data hook to join the session-id and the envelope-id but it is not a big deal also because I don't know how much the envelope-id is unique and also because an eventual software which parses the logs has to implement a custom logic to match the two quantities to extract a whole delivery message attempt.
Do you have a plan to add something like this? I would expect the session id is reported in every line (and so written to mongodb) even after the authentication stage.