Issue Description
In the PGP/MIME encryption at rest feature, Stalwart inserts a hardcoded inline text body (OpenPGP/MIME message (Automatically encrypted by Stalwart)) inside the top-level multipart boundary if it encrypts itself the message.
This should be replaced by a dedicated MIME header: X-Content-Encryption: on-delivery.
Expected Behavior
When fetching message header, we should get a such information.
Actual Behavior
Instead, we have to download the message Blob and do use a regex to determinate if the message was encrypted by sender or by server
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
PostgreSQL
Blob Storage
Filesystem
Search Engine
Internal
Directory Backend
OIDC
Additional Context
I can provide the PR, but the fix would be very simple, in crates/email/src/message/crypto.rs, just replace
concat!(
"\"\r\n\r\n",
"OpenPGP/MIME message (Automatically encrypted by Stalwart)\r\n\r\n",
"--"
)
by
concat!(
"\"\r\n",
"X-Content-Encryption: on-delivery\r\n\r\n",
"--"
)
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
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