Search code examples
imapoutlook.com

Outlook.com via IMAP: cannot add tag \Deleted to mails in the Archive folder


I'm working on a Perl program to access Outlook.com via IMAP. It seems that I can't reliably append the \Deleted tag to messages in the Archive folder. A sample session:

>> 1 UID FETCH 152108 (uid body[header.fields (Message-ID)])
<< * 50190 FETCH (UID 152108 BODY[HEADER.FIELDS (Message-ID)] {84}
<< Message-ID: <[email protected]>
<< 
<<  FLAGS (\Seen))
<< 1 OK FETCH completed.

>> 2 UID STORE 152108 +FLAGS.SILENT (\Deleted)
<< 2 OK STORE completed.

>> 3 UID FETCH 152108 (uid body[header.fields (Message-ID)])
<< * 50190 FETCH (UID 152108 BODY[HEADER.FIELDS (Message-ID)] {84}
<< Message-ID: <[email protected]>
<< 
<<  FLAGS (\Seen))
<< 3 OK FETCH completed.

As a result, a subsequent Expunge will not remove these messages. The same code is able to delete messages in other folders reliably, while for the Archive folder it occasionally works but mostly doesn't. I'd appreciate any suggestions as to what might cause this behavior. Thank you very much!


Solution

  • It turns out that it started working a day later (before it misbehaved again) and I was able to finish processing the folder over the course of a few days. I guess it's either throttling (though I doubt this as there were no error/warning responses) or just bugs in Outlook.com server software that choke for a large number of emails.