#3742: Handle 'corrupted' (multipart/mixed) PGP-MIME bodies
-------------------------+----------------------
 Reporter:  Feandil      |      Owner:  mutt-dev
     Type:  enhancement  |     Status:  new
 Priority:  minor        |  Milestone:
Component:  mutt         |    Version:
 Keywords:               |
-------------------------+----------------------
 Some clients/server combinations seems to have an issue with PGP-MIME
 formatting.
 Instead of having an application/pgp-encrypted and an application/octet-
 stream parts wrapped in a multipart/encrypted message, the message they
 are sending put these two parts (in a base64-encoded format), after an
 empty text/plain part, in an multipart/mixed body.

 Instead of:

 <multiplart/encrypted>
 * <application/pgp-encrypted>
 * <application/octet-stream>

 They contain:

 <multiplart/mixed>
 * <text/plain>
 * <application/pgp-encrypted> [BASE64-encoded]
 * <application/octet-stream>  [BASE64-encoded]

 Such a problem, which seems at least to be produced when the Apple mail
 client is used with Exchange servers, has been described (and sometime
 fixed) in other threads:
 - http://sourceforge.net/p/enigmail/bugs/384/
 - http://www.gossamer-threads.com/lists/gnupg/users/55862
 - https://groups.google.com/forum/#!topic/comp.mail.mutt/AHmenhyjcN4

 I believe that mutt could deal with it and I wrote a prototype patch
 (against the heavily patched gentoo version, sorry) which make such emails
 directly readable by mutt.
 The idea behind this prototype patch is to:
 - Rewrite the MIME body in a way mutt understand
 - Add Base64 decoding capability in pgp_decrypt_part (pgp.c)

 The rewriting changes:

 <multiplart/mixed>
 * <text/plain>
 * <application/pgp-encrypted> [BASE64-encoded]
 * <application/octet-stream>  [BASE64-encoded]

 Into:

 <multiplart/mixed>
 * <text/plain>
 * <multiplart/encrypted>
  *  <application/pgp-encrypted> [BASE64-encoded]
  *  <application/octet-stream>  [BASE64-encoded]

 I was not able to add Base64 decoding capability to pgp_decrypt_part
 without duplicating code from the decode64 function already present in
 mutt that deals with STATE).

 This patch has been sent to mutt-dev, with no comment so far

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3742>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to