Skip to content

FEAT: Server-side IMAP SEARCH support #1131

@andrinoff

Description

@andrinoff

Describe the feature

Plumb the IMAP SEARCH command (and ESEARCH extension when supported) so users can search the entire mailbox without paginating through every UID. Pair it with the local index — local hits show instantly; the server search backfills.

Why this matters

For inboxes with 100k+ messages, downloading everything to build a local index is impractical at first run. Server-side SEARCH gives an instant first-pass result while the local index warms up.

Notes

  • Map our search DSL to IMAP search keys: from:, to:, subject:, body:, since:, larger:.
  • Use ESEARCH RETURN (ALL) (RFC 4731) to get UID lists in one round-trip.
  • Gracefully degrade to SEARCH UID for old servers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions