+1 vote

I'm using IMAP with outlook.com

One problem - when I use the MOVE, it is moving the email (with attachment) - but the content of the attachment becomes 0 bytes. - so you can no longer open the attachment once the email is moved to a new folder.

You can test easily with outlook.com to see the problem.


1 Answer

0 votes
Best answer

If that's the case - it's Outlook.com bug.

Entire operation is performed on the IMAP server.
Mail.dll uses COPY and STORE +FLAGS (\DELETED) commands. Email is not downloaded nor modified at any point by the client. Mail.dll sends those two commands (with email UID or message number as parameters) to the server.

Messages are immutable on the IMAP server - server is not allowed to change them. Attachments are part of email message, they are stored inside the message. It's very unlikely that they are removed from the email by the server (as that would invalidate S/MIME signature for example).

Most likely you are seeing a old version of this message (from your previous tests maybe?).

I've tried and I have no such problems. Attachments are preserved, however Outlook.com UI takes forever to refresh, logging out and in again doesn't even help sometimes.

So although I can see the moved message through IMAP (it contains the attachment), UI doesn't show this message at all. It is shown in Deleted folder, just after I remove entire folder using the UI.

After log examination I can see 3 things:

  • After COPY command email message is modified and attachment is removed.

  • It happens only for big attachments (~3 MB)

  • It seems that that Outlook.com does this on purpose, as it adds a new header to the attachment:

    MS-Blob-Excluded: messageId=7C7BA5A2-E006-11E3-94A8-2C59E5464128; blobId=0; encodedLength=2925184; resolveError=true;

This behavior is obviously coded-in on purpose (performance reasons?), but this is Outlook.com bug and violation of the IMAP protocol by Microsoft. Several people already reported this issue to Microsoft:

by (295k points)
edited by