-
Notifications
You must be signed in to change notification settings - Fork 400
Description
Describe the bug
mu does not recognize S/MIME enveloped messages (Content-Type: application/pkcs7-mime; smime-type=enveloped-data) and does not return the encrypted flag for these messages.
How to Reproduce
- Receive an encrypted S/MIME message as the whole message (i.e., not
multipart/encrypted). - Index the message.
- Retrieve the message flags from
mu.
Best practice with S/MIME encryption is to envelope the signature (sign first, then encrypt), which is what message-mode and Outlook does. Basically, the message is sent as enveloped-data, which contains a multipart-signed MIME message (or a plain signed message, depending on the sending MUA configuration [e.g., "opaque signing" on Outlook]). To do otherwise implies a binding between the signing key and the encryption key which is not always true.
See attached sample raw message (all Received & associated stuff removed).
I don't expect mu to decrypt and index content with gpgsm (though it would be nice). Flagging as encrypted is necessary for mu4e-compose-crypto-policy to take effect. When the flag is manually set via mu4e--server-move with "+x", the compose policy works with S/MIME as expected. This is not a viable workaround b/c these flags do not persist when the message is moved between mailboxes, or between mu4e sessions.
Environment
macOS 14.6
Emacs 29.4
mu 1.12.6
Checklist
- you are running either the latest 1.10.x/1.12.x release or
master(otherwise, please upgrade).
Thank you!