Skip to content

FEAT: Email search functionality #508

@andrinoff

Description

@andrinoff

Is your feature request related to a problem?

There is no way to search emails in matcha. Users with large mailboxes have no option other than scrolling to find specific emails. Search is a fundamental email client feature.

Describe the solution you'd like

  1. Add a Search(ctx context.Context, query string, folder string) ([]Email, error) method to the backend.Provider interface
  2. Implement using IMAP SEARCH command for the IMAP backend
  3. Implement using JMAP Email/query filters for the JMAP backend
  4. Add a search TUI overlay (e.g. triggered by / key) with a text input and results list
  5. Support searching by sender, subject, body text, and date range

Describe alternatives you've considered

Client-side filtering of already-fetched emails. This would be simpler but only works for cached emails and doesn't scale to large mailboxes.

Additional context

Both IMAP and JMAP protocols have native server-side search capabilities that are already available in the protocol libraries used by matcha (go-imap/v2 and go-jmap) but are not currently exposed.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions