0

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: <XYZ@PQR.com>
<< 
<<  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: <XYZ@PQR.com>
<< 
<<  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!

P. B.
  • 417
  • 6
  • 12
  • I don't know about outlook.com, but on Gmail, you can't permanently \Delete messages in the Archive (All Mail) folder (apparently by design), but you CAN move them to the Trash folder. Maybe it's a similar thing here? – Max Feb 06 '17 at 19:10
  • I'm not sure but I didn't find anything on the web mentioning that this behavior also exists for Outlook.com. In fact I was able to delete quite a few messages (~10,000s) this way. It just seems the result is kind of random. It's a pity that Outlook.com no longer supports bulk operation for search results or a folder (move, delete, etc.). – P. B. Feb 06 '17 at 20:25
  • Alternatively, it's a corrupt message. Can you adjust the other flags on this particular message? – Max Feb 06 '17 at 21:12
  • It's actually not a specific message. Sorry for the unclear language -- I've edited my question accordingly. – P. B. Feb 06 '17 at 22:35

1 Answers1

0

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.

P. B.
  • 417
  • 6
  • 12