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: [atom: 0] #428

Closed
mike-nelson opened this issue Nov 21, 2016 · 5 comments
Closed

Unexpected token in IMAP response: [atom: 0] #428

mike-nelson opened this issue Nov 21, 2016 · 5 comments
Labels
compatibility Compatibility with existing software server-bug The bug appears to be in the server

Comments

@mike-nelson
Copy link

Hi, I got this error in this case from an IMAP server called Courier-IMAP (version from 2004) which is running in the wild (this is a user - not my server).

Trying to remove a flag from an email - seems to be OK but MailKit reports this as an error.

S: Q00000006 OK [READ-WRITE] SELECT completed.
C: Q00000007 UID STORE 16334 -FLAGS (\Flagged)
S: * 0 FETCH (UID 16334 FLAGS ())
S: Q00000007 OK STORE completed.

Unexpected token in IMAP response: [atom: 0]

I'm just going to catch that error on that line and call it OK, just thought you might like to know this case.

@jstedfast
Copy link
Owner

Looks like the Courier-IMAP thinks that indexes start at 0 when in fact they start at 1 :(

My guess is that newer versions of Courier IMAP have been fixed.

I'll commit a fix to allow 0 for the index, I guess. You will probably have to ignore an Index of 0 in the MessageFlagsChanged event, though.

@jstedfast
Copy link
Owner

When Courier-IMAP sends "* 0 FETCH ...", the Index value in the event args will be -1.

@mike-nelson
Copy link
Author

Thanks

Cheers
-Mike

Mike Nelson // CEO (and Developer) // Beweb http://www.beweb.co.nz // 09
3077042 // 027 4403757
Listen to your email with Speaking Email https://speaking.email by beweb

On 22 November 2016 at 02:03, Jeffrey Stedfast [email protected]
wrote:

Looks like the Courier-IMAP thinks that indexes start at 0 when in fact
they start at 1 :(

My guess is that newer versions of Courier IMAP have been fixed.

I'll commit a fix to allow 0 for the index, I guess. You will probably
have to ignore an Index of 0 in the MessageFlagsChanged event, though.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#428 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGeog6IgRXpU4wMFZdE_k40P5BDYDwggks5rAZaHgaJpZM4K4BKr
.

@jstedfast jstedfast added the compatibility Compatibility with existing software label Nov 23, 2016
@jstedfast
Copy link
Owner

I released MailKit 1.10.1 with this fix to nuget.org

@jstedfast
Copy link
Owner

@mike-nelson would you be willing to send me the first few lines of a log connecting to Courier IMAP? I mostly care about the greeting, but the CAPABILITIES would also be nice. Thanks!

@jstedfast jstedfast added the server-bug The bug appears to be in the server label Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with existing software server-bug The bug appears to be in the server
Projects
None yet
Development

No branches or pull requests

2 participants