{"id":4598,"date":"2014-05-23T19:34:54","date_gmt":"2014-05-23T17:34:54","guid":{"rendered":"http:\/\/www.limilabs.com\/blog\/?p=4598"},"modified":"2014-05-23T19:34:54","modified_gmt":"2014-05-23T17:34:54","slug":"outlook-com-imap-looses-attachment-contents-on-copy","status":"publish","type":"post","link":"https:\/\/www.limilabs.com\/blog\/outlook-com-imap-looses-attachment-contents-on-copy","title":{"rendered":"Outlook.com IMAP looses attachment contents on COPY"},"content":{"rendered":"<p>Outlook.com IMAP looses attachment contents on COPY operation.<\/p>\n<p>Coping an email with an attachment on Outlook.com using IMAP works correct for small attachments:<\/p>\n<p><code>C: 7554e85569d0465d UID COPY 100828 \"Destination\"<br \/>\nS: 7554e85569d0465d OK [COPYUID 43582022 100828 100003] COPY completed<\/code><\/p>\n<p>With large attachments (~3MB), although COPY command succeeds:<\/p>\n<p><code>C: 7734b17263a84259 UID COPY 100823 \"Destination\"<br \/>\nS: 7734b17263a84259 OK [COPYUID 43582022 100823 100001] COPY completed<\/code><\/p>\n<p>All contents of the attachments are removed by the server:<\/p>\n<p><code>------_=_NextPart_001_01CF7412.6651E594<br \/>\nContent-Type: image\/jpeg; name=\"100557_1_DSC_0041 (2).jpg\"<br \/>\nContent-Transfer-Encoding: base64<br \/>\nContent-Disposition: attachment; filename=\"100557_1_DSC_0041 (2).jpg\"<br \/>\nMS-Blob-Excluded: messageId=7C7BA5A2-E006-11E3-94A8-2C59E5464128; blobId=0; encodedLength=2925184; resolveError=true; blobHash=F206EC6BB4B95BF30B1382C38A33C9BEC3DBFB4A<\/p>\n<p>------_=_NextPart_001_01CF7412.6651E594--<br \/>\n<\/code><\/p>\n<p>After COPY operation email message is modified by the server:<br \/>\n&#8211; <strong>attachment contents are removed<\/strong> (attachment must be large enough ~3MB)<br \/>\n&#8211; new MIME header: <strong>MS-Blob-Excluded is added to the MIME entity<\/strong> representing the attachment.<\/p>\n<p>All IMAP clients are affected.<\/p>\n<p>It seems that this behavior is coded-in on purpose, however <strong>it&#8217;s a bug and violation of the IMAP protocol<\/strong>.<\/p>\n<p>It would be much wiser to fail on COPY command with appropriate error message, if for some reason (performance?) the operation would result in loosing data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Outlook.com IMAP looses attachment contents on COPY operation. Coping an email with an attachment on Outlook.com using IMAP works correct for small attachments: C: 7554e85569d0465d UID COPY 100828 &#8220;Destination&#8221; S: 7554e85569d0465d OK [COPYUID 43582022 100828 100003] COPY completed With large attachments (~3MB), although COPY command succeeds: C: 7734b17263a84259 UID COPY 100823 &#8220;Destination&#8221; S: 7734b17263a84259 OK [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[98,28,92],"class_list":["post-4598","post","type-post","status-publish","format-standard","hentry","category-news","tag-bug","tag-imap","tag-outlook-com"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/4598"}],"collection":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/comments?post=4598"}],"version-history":[{"count":6,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/4598\/revisions"}],"predecessor-version":[{"id":4605,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/posts\/4598\/revisions\/4605"}],"wp:attachment":[{"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/media?parent=4598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/categories?post=4598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.limilabs.com\/blog\/wp-json\/wp\/v2\/tags?post=4598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}