Add proper Attachment handling for MIME messages.
Attachments are now session decrypted in the read event and
session encrypted again in the write event.
- src/attachment.cpp, src/attachment.h: Functions for attachment
Session encryption / decryption.
- src/Makefile.am: Add new files.
- src/mailitem-events.cpp (~MailItemEvents): Resolve Macro
to avoid confusing bracing.
(MailItemEvents::handle_read): Remove session encryption from
attachments.
(MailItemEvents::invoke): Track "wipe" status. Session encrypt
attachments in write event.
- src/mapihelp.cpp (get_gpgolattachtype): Unstatic.
- src/mapihelp.h (get_gpgolattachtype): Expose.
(attachtype_t): Define attachment type for temporary unprotected
Attachments.
The code will probably be changed to just untprotect an attachment
when it is accessed in the BeforeAttachmentWriteToTempFile event.