Cannot FETCH message S: B00000007 OK EXPUNGE completed.
Sometimes I get a email I cannot FETCH from outlook.office365.com with imap and I have to delete it with Outlook or similar. The email looks OK in Outlook. The email is written in Norwegian. Has anyone had the same problem? Is it some charset that needs to be set in the Client? Here is the log:
Connected to imaps://outlook.office365.com:993/ S: * OK The Microsoft Exchange IMAP4 service is ready. [RABCADcAUABSADAAMwBDAEEAMAAwADgANQAuAGUAdQByAHAAcgBkADAAMwAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A] C: B00000000 CAPABILITY S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+ S: B00000000 OK CAPABILITY completed. C: B00000001 AUTHENTICATE PLAIN AFBvcnRlcmluZ2VyQ2hpbGltb2JpbEBjbW9iaWwub25taWNyb3NvZnQuY29tAFBhcjgzMjY2 S: B00000001 OK AUTHENTICATE completed. C: B00000002 CAPABILITY S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+ S: B00000002 OK CAPABILITY completed. C: B00000003 NAMESPACE S: * NAMESPACE (("" "/")) NIL NIL S: B00000003 OK NAMESPACE completed. C: B00000004 LIST "" "INBOX" S: * LIST (\Marked \HasNoChildren) "/" INBOX S: B00000004 OK LIST completed. C: B00000005 SELECT INBOX S: * 1 EXISTS S: * 0 RECENT S: * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent) S: * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)] Permanent flags S: * OK [UNSEEN 1] Is the first unseen message S: * OK [UIDVALIDITY 14] UIDVALIDITY value S: * OK [UIDNEXT 3314] The next unique identifier value S: B00000005 OK [READ-WRITE] SELECT completed. C: B00000006 FETCH 1:2 (UID INTERNALDATE) S: * 1 FETCH (UID 3311 INTERNALDATE "03-Mar-2022 08:28:56 +0000") S: B00000006 NO The specified message set is invalid. C: B00000007 EXPUNGE S: * 1 EXISTS S: B00000007 OK EXPUNGE completed. C: B00000008 LOGOUT S: * BYE Microsoft Exchange Server IMAP4 server signing off. S: B00000008 OK LOGOUT completed.
That log doesn't seem to be from this module, as that format for the request IDs is not used by this module.
Anyway, I think the server is telling you that there is only one message (and there is, judging by the * 1 EXISTS sent by the server during mailbox open) so when you ask for the first two messages in the mailbox, it of course gives you an error.