]> git.notmuchmail.org Git - notmuch/commit
test: add test for "Mixed-Up Mime" message mangling
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Tue, 28 May 2019 02:46:53 +0000 (22:46 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 15 Sep 2019 05:20:03 +0000 (01:20 -0400)
commitcb522fb06ef534a485408de608984d1be6dbadfa
tree8a1febe715ce0d928875b5c7fd818332a255059a
parente0e55c5b6fd27a96601de95cfcec2b67d8a20c76
test: add test for "Mixed-Up Mime" message mangling

Some MTAs mangle e-mail messages in transit in ways that are
repairable.

Microsoft Exchange (in particular, the version running today on
Office365's mailservers) appears to mangle multipart/encrypted
messages in a way that makes them undecryptable by the recipient.

I've documented this in section 4.1 "Mixed-up encryption" of draft -00
of
https://tools.ietf.org/html/draft-dkg-openpgp-pgpmime-message-mangling

Fortunately, it's possible to repair such a message, and notmuch can
do that so that a user who receives an encrypted message from a user
of office365.com can still decrypt the message.

Enigmail already knows about this particular kind of mangling.  It
describes it as "broken PGP email format probably caused by an old
Exchange server", and it tries to repair by directly changing the
message held by the user.  if this kind of repair goes wrong, the
repair process can cause data loss
(https://sourceforge.net/p/enigmail/bugs/987/, yikes).

The tests introduced here are currently broken.  In subsequent
patches, i'll introduce a non-destructive form of repair for notmuch
so that notmuch users can read mail that has been mangled in this way,
and the tests will succeed.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
test/T351-pgpmime-mangling.sh [new file with mode: 0755]
test/corpora/mangling/mixed-up.eml [new file with mode: 0644]