Skip to content

Fix UID infinity search range returning last message#159

Merged
stevebauman merged 2 commits into
masterfrom
bug-157
May 20, 2026
Merged

Fix UID infinity search range returning last message#159
stevebauman merged 2 commits into
masterfrom
bug-157

Conversation

@stevebauman
Copy link
Copy Markdown
Member

Closes #157

This PR fixes uid($next, INF) compiling to UID $next:*, which can return the current last message when $next is UIDNEXT.

In IMAP, * in a UID range refers to the highest existing UID, and ranges are inclusive regardless of order. This means UIDNEXT:* can still match the last existing message. The query now compiles INF to the maximum IMAP UID value (4294967295) for UID searches.

@stevebauman stevebauman merged commit d545ff3 into master May 20, 2026
9 checks passed
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

Successfully merging this pull request may close these issues.

uid($next, INF) returns one message always

1 participant