Home GnuPG
Diffusion GpgOL 91c86d7cd53a

Restore S/MIME message class after decrypt

Description

Restore S/MIME message class after decrypt

* src/folder-events.cpp (BeforeMove),
src/mail.cpp (closeAllMails_o),
src/mail.h (close), src/mailitem-events.cpp (Close),
src/windowmessages.cpp (gpgol_window_proc): Close is no longer static.
* src/mail.cpp (Mail::decryptVerify_o): Restore message class in
decrypt verify and save the mail to be sure.
(Mail::parsing_done): Minor style fix.
(Mail::close): Put back gpgol class on close for move.
* src/mailitem-events.cpp (PropertyChange): Ignore message class
changes and fix debug output.

What we do here is that for S/MIME we try to keep the original
IPM.Note.SMIME message classes in the MAPI system. Sometimes
our gpgol message class is written into mapi (probably when
a write happens between before read and decrypt done). This
breaks our mails for other clients using Outlook MAPI to
detect if a mail is an S/MIME mail.

The strange thing happens in close then. If we do a close
with discard changes on a Mail with original S/MIME message
class it does not work properly. So we switch it here again
to our GpgOL class and close then. A problem with that is
that after the move the mails will not work correctly.