Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token in IMAP response: '[' #193

Closed
quentez opened this issue May 17, 2015 · 2 comments
Closed

Unexpected token in IMAP response: '[' #193

quentez opened this issue May 17, 2015 · 2 comments
Labels
bug Something isn't working

Comments

@quentez
Copy link

quentez commented May 17, 2015

I'm suspecting that this happens when some flags have the [ character in them.
Here's the last response I got from the server before the error was thrown:

C: A00000005 SELECT "[Gmail]/Trash" (CONDSTORE)
S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen OIB-Seen-[Gmail]/Trash OIB-Seen-[Gmail]/Important $MailFlagBit2 OIB-Seen-Unsubscribe $Phishing $Forwarded $MDNSent OIB-Seen-INBOX JunkRecorded NotJunk $NotJunk $NotPhishing $Junk OIB-Seen-[Gmail]/All Mail OIB-Seen-[Gmail]/Spam)
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen OIB-Seen-[Gmail]/Trash OIB-Seen-[Gmail]/Important $MailFlagBit2 OIB-Seen-Unsubscribe $Phishing $Forwarded $MDNSent OIB-Seen-INBOX JunkRecorded NotJunk $NotJunk $NotPhishing $Junk OIB-Seen-[Gmail]/All Mail OIB-Seen-[Gmail]/Spam \*)] Flags permitted.
S: * OK [UIDVALIDITY 7] UIDs valid.
S: * 67 EXISTS
S: * 0 RECENT
S: * OK [UIDNEXT 29237] Predicted next UID.
S: * OK [HIGHESTMODSEQ 9195383]
S: A00000005 OK [READ-WRITE] [Gmail]/Trash selected. (Success)
@jstedfast
Copy link
Owner

Ugh, another GMail bug :-(

Flags like OIB-Seen-[Gmail]/Trash should be in quoted-string tokens.

I've added a work-around, so it should work now.

@quentez
Copy link
Author

quentez commented May 18, 2015

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants