Diffusion GpgOL dc48589b3d42

Handle weirdly constructed PGP/MIME mails

Authored by aheinecke on Apr 11 2018, 10:13 AM.

Description

Handle weirdly constructed PGP/MIME mails

* src/mapihelp.cpp (get_msgcls_from_pgp_lines): Add return
value for empty body.
(get_msgcls_from_first_attachment): New. factored out.
(change_message_class_ipm_note): Use get_msgcls_from_first_attachment.

This fixes the handling of mails that are:

multipart/mixed
->application/pgp-encrypted
->application/octed-stream

They also don't have a body. To avoid overhead in a
normal unencrypted multipart mixed mail we only check
for this structure if we don't have a body.

Details