Closed link2xt closed 3 years ago
Message structure corruption should also be reported to ProtonMail, but copying the message correction logic from Thunderbird would be a nice enhancement anyway.
Here I also found a discussion about adding thing workaround to notmuch
: https://notmuchmail.org/pipermail/notmuch/2019/028802.html
Without the workaround, the message is received like this:
This is the message Thunderbird was able to recover.
The code which extracts encrypted payload resides in e2ee::get_autocrypt_mime
and can be unit-tested.
There is a draft RFC which describes this kind of "mixed up" encryption: https://tools.ietf.org/id/draft-dkg-openpgp-pgpmime-message-mangling-00.html
ProtonMail IMAP/SMTP Bridge, when used with Delta Chat, corrupts encrypted Autocrypt messages as follows:
Thunderbird 78.9.0 proposes to fix the message:
After clicking "Repair message", it changes the message as follows:
It removes "Empty message" part and changes the type of the outer message to
multipart/encrypted
instead ofmultipart/mixed
. To accept such messages, we need to recognizemultipart/mixed
(instead of correctmultipart/encrypted
) messages which contain necessaryapplication/pgp-encrypted
andencrypted.asc
parts as Autocrypt messages and ignore any irrelevant parts.ProtonMail IMAP/SMTP bridge also strips Autocrypt header, but this is another issue to be reported to https://github.com/ProtonMail/proton-bridge/issues