Closed quzhi1 closed 3 months ago
Interesting. Can you explain which server behaves like this?
I don't think ignoring the error is great, because we loose the flag. I'd prefer to add a dec.SP
call before ExpectFlag
, with a comment explaining that some servers start the list with a space and link to this PR.
@emersion No problem. The imap server is mail.mcspowermail.com:993. I updated this PR to use dec.SP
instead of ignoring error.
Thank you 🙏
Hi @emersion ,
Sometimes we see IMAP server return invalid flag list.
For example, when examining a folder with
EXAMINE INBOX
, this is the server response:In the line
OK [PERMANENTFLAGS ( \*)]
, there is a leading space inside the flag list. This causes this library to return an error:Can we just ignore the invalid flag instead of erroring out? If not, is there an elegant way to handle such server error?
Thank you @emersion , and hope you have a good day!