The IMAP resource should fetch the BODYSTRUCTURE of messages during sync. This would allow us to reliably detect attachments without parsing the whole thing. Furthermore, it would allow to detect attachments even in messages that we don't have a full body for (like in case of online IMAP).
Description
Description