-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mu bug] mu should return the encrypted flag for S/MIME enveloped-data #2745
Comments
For reference, see the following.
Of the remaining types, S/MIME has never included Yes, it's still there in RFC 3156 but it's been forever since anyone updated that spec. Also note that clear-signed ( |
Was poking deeper and while I'm not a C++ guy it seems like it should be working, but I suspect that mime tree isn't traversed for encrypted data unless the top message is multipart. For a more complete example, And here's the JSON from [
{
":path": "/Users/me/Maildir/Sent/cur/1724094095.6b17f735acef1e50.host-pc,U=676:2,S",
":size": 1091,
":changed": [
26307,
38608,
0
],
":date": [
26307,
38566,
0
],
":from": [
{
":email": "me@privacy.net",
":name": "Me"
}
],
":message-id": "m21q2kqqu1.fsf@privacy.net",
":priority": "normal",
":subject": "enveloped-data",
":to": [
{
":email": "me@privacy.net",
":name": "Me"
}
],
":maildir": "/Sent",
":flags": [
"seen",
"attach",
"personal"
]
},
{
":path": "/Users/me/Maildir/INBOX/new/1724094226.79327_1.HOST-PC,U=832:2,",
":size": 7710,
":changed": [
26307,
38674,
0
],
":date": [
26307,
38566,
0
],
":from": [
{
":email": "me@privacy.net",
":name": "Me"
}
],
":message-id": "m21q2kqqu1.fsf@privacy.net",
":priority": "normal",
":subject": "enveloped-data",
":to": [
{
":email": "me@privacy.net",
":name": "Me"
}
],
":maildir": "/INBOX",
":flags": {
"new": "attach",
"unread": "personal"
}
}
] The encrypted flag is not set. I have a ton of mail that should be returning, and only the test messages I've sent with PGP-MIME are so flagged, which is a multipart message at the top level. |
FWIW, noticed above that {
":path": "/Users/me/Maildir/INBOX/cur/1724094226.79327_1.HOST-PC,U=832:2,S",
":size": 7710,
":changed": [
26307,
39302,
0
],
":date": [
26307,
38566,
0
],
":from": [
{
":email": "me@privacy.net",
":name": "Me"
}
],
":message-id": "m21q2kqqu1.fsf@privacy.net",
":priority": "normal",
":subject": "enveloped-data",
":to": [
{
":email": "me@privacy.net",
":name": "Me"
}
],
":maildir": "/INBOX",
":flags": [
"seen",
"attach",
"personal"
]
} |
Yeah, the smime part on the top-level wasn't checked. I'll push as fix. Thanks for the details. |
I compiled
|
Describe the bug
mu
does not recognize S/MIME enveloped messages (Content-Type: application/pkcs7-mime; smime-type=enveloped-data
) and does not return theencrypted
flag for these messages.How to Reproduce
multipart/encrypted
).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).
msg.txt
I don't expect
mu
to decrypt and index content withgpgsm
(though it would be nice). Flagging as encrypted is necessary formu4e-compose-crypto-policy
to take effect. When the flag is manually set viamu4e--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 betweenmu4e
sessions.Environment
macOS 14.6
Emacs 29.4
mu 1.12.6
Checklist
master
(otherwise, please upgrade).Thank you!
The text was updated successfully, but these errors were encountered: