The short version

  • RFC 9586 lets a client ENABLE UIDONLY, after which an IMAP server refuses message sequence numbers and answers with UIDFETCH and VANISHED responses keyed by UIDs. It deletes a volatile translation table. It does not hand you a complete mailbox snapshot.
  • A UID only means something inside a mailbox generation: mailbox name plus UIDVALIDITY plus UID. Capability advertisement, enablement, command completion, cache application and downstream synchronization are five different receipts.

Picture a theatre where every seat is numbered, and every time a patron leaves, the ushers renumber everyone behind them. That is an IMAP mailbox running on message sequence numbers. Expunge one message near the front of an 80,000-message mailbox and every later ordinal shifts down by one, while unsolicited changes keep arriving. The client spends its life translating a moving seat number into something durable. RFC 9586 walks in and says: stop counting seats. Use the ticket stub.

The intervention is narrower than the name “UIDONLY” whispers. A server first advertises the capability. A client must then issue ENABLE UIDONLY; only after enablement do message-number commands become invalid. Plain FETCH, STORE, SEARCH, COPY and MOVE are rejected in favour of UID-prefixed forms. Responses come back as UIDFETCH; removals arrive as VANISHED. Cross the boundary with a forbidden identifier and the server hands you UIDREQUIRED.

What UIDONLY actually switches off

Message sequence numbers are relative positions, not names. Expunge one message and every later position is renumbered, which is why a client otherwise maintains a live map between two namespaces and prays no delayed response lands on the wrong ordinal. UIDONLY removes that map from the protocol path. That is a genuine simplification, and it is worth saying so plainly.

But the surviving identifier is not absolute, and this is where cheerful dashboards go to die.

A UID is a passport number, not a passport

IMAP defines a UID inside a mailbox generation. The durable reference is the triple: mailbox name, UIDVALIDITY, and UID. If the server cannot preserve the old namespace, UIDVALIDITY changes and the client must stop treating its old UIDs as current identities — the passport number survived, the passport did not. A bare UID copied into an audit log is therefore incomplete evidence, not a receipt.

Nor is UIDNEXT a promised next object. It marks a lower boundary for later arrivals, not a guarantee that a message with that exact number will ever exist. UIDs may contain gaps; messages may be expunged; the same message’s mutable flags may change while its identity holds steady. Stable identity and settled state are separate properties, and conflating them is the oldest mistake in the book.

Cleaner addressing, not automatic history

RFC 9586 keeps that separation visible. It does not touch EXISTS or RECENT. It can coexist with CONDSTORE and QRESYNC, with modification sequences carried inside UIDFETCH, but it does not require those synchronization mechanisms. QRESYNC’s optional message-sequence match data is prohibited in UIDONLY mode precisely because it would smuggle the discarded namespace back through the side door. The result is cleaner addressing — not automatic historical completeness.

Where copy and move expose the seam

COPYUID can connect a source UID to a destination UID and the destination’s UIDVALIDITY. The tagged result can show that the IMAP command completed. Neither receipt proves that a later indexer, archive, search view or mobile cache committed the destination object. Those are downstream claims, made by downstream systems, and they need their own evidence.

Why the spec chose a loud break over a quiet zero

The rejected design alternative is instructive. An earlier draft considered keeping ordinary FETCH shapes and parking a zero in the message-number slot. The specification rejected it because clients that believed the placeholder would quietly corrupt their caches. Syntactic compatibility would have hidden a semantic break. A loud new response form is safer, because it makes the change of authority observable instead of invisible.

The evidence chain operators should actually keep

For operators, the correct chain is explicit and boring on purpose: the server advertised UIDONLY; this connection enabled it; the mailbox was selected with this UIDVALIDITY; these UIDs and modification states were observed; these changes vanished or arrived; this tagged command completed; the client durably applied the delta; and the consuming application reconciled its own result. No single green indicator gets to impersonate the whole chain.

The number was never the asset. The reproducible chain that proves what the number meant is.

Sources