Your question
I have looked into the MTA Hooks draft specification at draft-degennaro-mta-hooks-01 - MTA Hooks: An HTTP-Based Mail Processing Protocol, it states the following:
5.6.2. Raw Message
The rawMessage property contains the complete message in Internet
Message Format as defined in [RFC5322], including all MIME parts and
attachments. In JSON serialization, the value is Base64-encoded. In
CBOR serialization, the value is a raw byte string.
The rawMessage property represents the entire message as stored or
received by the MTA. When present, it provides byte-exact access to
the message content, which is necessary for operations such as
cryptographic signature verification.
Scanners MAY request both message and rawMessage properties. If a
scanner's response modifies both properties, only rawMessage
modifications are applied; message modifications are ignored.
The raw message content MUST NOT appear within the message property
as a blob value. The message property contains only the structured
parsed representation with individual body part contents available
via bodyValues, while rawMessage contains the complete unparsed
message.
My question is what is the roadmap for support for this feature? I am looking to migrate to Stalwart, but the one missing piece for me at the moment is the limitation on the current MTA Hooks implementation not having access to the full raw EML message.
I am looking to emulate Exim’s pipe transport, but currently the message body and headers are passed to me separately by Stalwart’s MTA via the hook.
The example use case that I have is when rewriting an email, I would sometimes change the root mail part’s type, e.g. from text/plain to multipart/alternative, which requires me to edit a top level header.
Though it is possible for me to keep these headers in sync manually, I would prefer to have access to the raw email message including headers during the data phase of the transport for consistency.
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