stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
4.57k stars 175 forks source link

[enhancement]: Add Message ID to webhook payloads and delivery events #728

Closed ljuti closed 1 week ago

ljuti commented 2 weeks ago

Which feature or improvement would you like to request?

I'd like to see this feature: Delivery events and webhook payloads should include messageId key/value pair so that individual messages could be identified as they move through SMTP transactions and delivery flow.

The following events should include messageId in their payload:

Is your feature request related to a problem?

The problem: When operating a multi-role email server infrastructure, it's currently difficult to accurately track a message through the delivery flow. For example, if one is using an outbound SMTP gateway for accepting messages from authenticated users for delivery, and ultimately delivering the messages through a relay to recipients, there are no identifiers one could rely on to accurately track the message.

messageId is available in MTA hooks, so it's easy to register new messages entering the delivery flow, but since this property is not currently available in the event payloads in the later stages, accurate tracking is not possible.

Code of Conduct

mdecimus commented 1 week ago

Two comments regarding this:

ljuti commented 1 week ago

Fair enough. I'll work on finding another approach to address my use case.