Home GnuPG
Diffusion GpgOL 8fe7ead78980

Remove hidden attachments in OOM

Description

Remove hidden attachments in OOM

* src/mail.cpp (Mail::parsing_done): Call remove_hidden_attachments_oom
* src/oomhelp.cpp, src/oomhelp.h (remove_hidden_attachments_oom): New.

Due to the fact that the Exchange server size limits mails we
cannot both keep the unencrypted and encrypted attachments in
OOM as we will receive a server error, even though either
the encrypted mime structure and the unencrypted attachments
fitted into the limit.

The solution is to remove the attachment in OOM without
touching MAPI. This should work in theory but has a huge
regression risk. We might need to store the MOSS attachment
in the Mail object and later restore it in places where
we would otherwise delete our attachments.