How SupaMail search works, and why your assistant needs it fast

Last checked: .

Your assistant doesn't search once. To answer "what did we agree with Northwind?", it searches, reads a thread, learns a name, searches again and reads again. Several searches for one answer. If each one waits on a mail server, you wait for all of them.

So SupaMail's search is built for an assistant that asks again and again.

Short answer. SupaMail keeps a synced copy of your mailbox and searches that copy, never your mail server. Each customer has one separate search index. Search is keyword search ranked by relevance and recency, with exact phrases and sender, recipient and subject filters.

The job: many searches, one answer

A person searches a mailbox once and scrolls. An assistant runs a search, reads the best match, and uses what it read to write the next search: a sender's address, a project name, a date. Each step depends on the one before.

Two things follow. Each search has to come back quickly, or the waits add up. And each search has to cost little to run, so the assistant can ask as often as the job needs.

How it's built

A synced copy, not a live search. SupaMail syncs your mailbox from your provider and searches its own copy. Your mail server isn't asked during a search, so a slow or busy mail server doesn't slow the answer. If your own IMAP MCP server times out on a big mailbox, this is why: Why does my email MCP server time out on a big mailbox?.

One index per customer. Each customer has one search index, separate from every other customer's, and never shared. A customer's mailboxes, up to 5, share that index. Every search is limited to that customer's own mailboxes.

Under the hood, the search engine behind SupaMail is written in Rust and keeps every index on durable object storage. At the engine level, by its published benchmark, a warm keyword query over a million documents takes about 13 ms. End to end, including everything SupaMail does around it, our median search in the week to 2 December 2026 took about 0.3 s (p95 about 1.5 s).

Keyword ranking. Results are ranked by how well your words match (BM25 keyword relevance), and newer mail counts more: in the default sort, the recency weight halves about every 30 days. A quoted phrase matches those words in that order. Filters narrow the search: from:, to:, subject:, in: for a folder, after: and before: for dates, has:attachment, filename:, is:unread, is:starred, and -word to leave a word out.

What the index holds. For each message: the subject, sender and recipients, date, folder, the names and types of its attachments, and up to 32 KiB of its text, plus details such as read and starred flags, size, message and thread IDs, and a short snippet. It doesn't hold what is inside attachments. Your inbox, sent mail and your own folders are indexed. Trash, Junk and Spam are not, and neither is Gmail's All Mail.

What this means for you

You describe the email you remember. The assistant searches, reads the thread and answers, without you finding the email and pasting it in first. See Find an old email you can't locate.

How fast

End to end, the median search in the 7 days from 25 November to 2 December 2026 (1,879 searches from real use) took about 0.3 seconds on SupaMail's servers, and 95% finished within about 1.5 seconds. That is server time, from the request reaching SupaMail to the answer leaving it. It doesn't include the network or the assistant's own thinking. The slowest 5% sit in the index lookup.

SupaMail times every real request. A scheduled check also runs search, read, draft, send, move and flag on SupaMail's own mailbox several times a day.

One measured comparison: in one synced inbox, a search through every message body finished 5 times out of 5 on SupaMail, while the other connector tested timed out 5 times out of 5 after about 30 seconds. That is one case, not a general speed claim. Method: comparison page.

New mail

New mail reaches search through sync, so it isn't instant. When SupaMail stores a new message, the message is queued for search. Measured over the 7 days to 2 December 2026 (about 4,760 new messages), a new message's full text was searchable a median of about 4 seconds after SupaMail stored it, and within about 20 seconds for 95%. For mail imported when you first connect a mailbox, only 40 messages were measured: a median of about 2 minutes, and within about 3 minutes for 95%. Those clocks start when SupaMail stores the message, not when your mail server received it; the time to sync it from your server comes first.

When you first connect a mailbox, SupaMail imports each folder newest first, and the assistant is told the mailbox is still being set up. If search is unavailable, the assistant is told the request failed and to retry shortly. Nothing falls back silently.

The copy: what is stored, and how it is deleted

Stored mail. SupaMail encrypts stored message content and sensitive metadata at rest with AES-256-GCM, with separate keys for each customer. Attachment files aren't stored; they're fetched from your provider when you open one.

Search text. The subject, sender and recipients, date, folder, attachment names and types, up to 32 KiB of each message's text, and details such as flags, size, IDs and a short snippet are sent over an encrypted connection to SupaMail's search service and kept in a separate index for each customer. SupaMail doesn't encrypt this text before sending it, because the search service has to read it to search it.

Deletion. A message you delete in your mailbox leaves SupaMail's search after the next sync. Deleting your SupaMail account removes your whole search index at once. If a trial lapses, its data is deleted no sooner than 14 days after the trial ends; for a canceled or unpaid plan, no sooner than 60 days after. Either way, SupaMail emails you at least 7 days before. Details: data retention and deletion, Security, subprocessors.

The copy is the trade. It's what lets one search cover every synced folder at once. If you want no copy of your mail stored outside your mail provider, SupaMail is not the right fit.

What it is not

  • Not vector search. Results are ranked by keyword relevance and recency, and a short list of related words can also match, ranked below your own words.
  • Not a live search of your mail server.
  • Not a search inside attachments.

This page describes hosted SupaMail accounts. Accounts that sync into their own Supabase database search with Postgres instead.

Connect a mailbox

Guides: Rackspace Email, other IMAP mailboxes, iCloud Mail, ChatGPT. Price and trial: pricing.