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

On search, UID range sends always the last mail #75

Closed
seeker89 opened this issue Aug 3, 2012 · 3 comments
Closed

On search, UID range sends always the last mail #75

seeker89 opened this issue Aug 3, 2012 · 3 comments

Comments

@seeker89
Copy link

seeker89 commented Aug 3, 2012

When used with a range which is bigger than the actual maximal UID in the mailbox, the mail with maximal UID is found.

If my last message has UID 100,

SEARCH UID 101:*

fins the message with UID 100.

@mscdex
Copy link
Owner

mscdex commented Aug 3, 2012

Can you post debug output generated by setting the debug property of your connection options to console.log? Censor your username and password.

Also, the literal IMAP command string, "SEARCH UID 101:*" will return sequence numbers, not UIDs.

@mscdex
Copy link
Owner

mscdex commented Aug 3, 2012

Actually, scratch that. The RFC states this is expected behavior:

Excerpt from section 6.4.8:

           Also note that a UID range of 559:* always includes the
           UID of the last message in the mailbox, even if 559 is
           higher than any assigned UID value.  This is because the
           contents of a range are independent of the order of the
           range endpoints.  Thus, any UID range with * as one of
           the endpoints indicates at least one message (the
           message with the highest numbered UID), unless the
           mailbox is empty.

@aligatorr89
Copy link

Actually, scratch that. The RFC states this is expected behavior:

Excerpt from section 6.4.8:

           Also note that a UID range of 559:* always includes the
           UID of the last message in the mailbox, even if 559 is
           higher than any assigned UID value.  This is because the
           contents of a range are independent of the order of the
           range endpoints.  Thus, any UID range with * as one of
           the endpoints indicates at least one message (the
           message with the highest numbered UID), unless the
           mailbox is empty.

Thanks.

Jivings pushed a commit to squarecat/node-imap that referenced this issue Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants