+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.

by

1 Answer

0 votes
 
Best answer

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

1.
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.

2.
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).

3.
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:
http://answers.microsoft.com/en-us/outlook_com/forum/oemail-oattach/imap-server-removes-attachments-in-copied-mails/92bfce6e-550a-438f-a869-94143514f545

by (297k points)
edited by
...