IMAP autopilot — capability profiles A–D
Generic IMAP servers differ enormously: some are modern and efficient, some are old and limited, and a few report capabilities they don't actually honour. IMAP also has no dependable "tell me the instant new mail arrives" channel that MailDesk can trust. So for IMAP accounts MailDesk does not pretend to push. Instead it runs an autopilot: it detects what each server can do, picks the cheapest correct sync strategy for that server, and pre-loads the message bodies you are most
Generic IMAP servers differ enormously: some are modern and efficient, some are old and limited, and a few report capabilities they don't actually honour. IMAP also has no dependable "tell me the instant new mail arrives" channel that MailDesk can trust. So for IMAP accounts MailDesk does not pretend to push. Instead it runs an autopilot: it detects what each server can do, picks the cheapest correct sync strategy for that server, and pre-loads the message bodies you are most likely to open next.
The result is an inbox that feels fast where it matters — new mail surfaces within the poll interval, and opening a message is instant because its body was already warmed.
Status — 4.2.0 is near-release, not yet in the shipped build
IMAP autopilot ships as part of the 4.2.0 realtime work, which is complete and test-covered but not
yet merged into the shipped 18.0 line. It lives on the branches MailDesk-889-realtime-sync-v18 and
MailDesk-prefetch-cache-v18, tracked by merge requests !237 (engine) and !124 (Pro). Today's
shipped builds (4.1.x) sync IMAP on the scheduled background jobs. See the
Realtime overview for the full status picture.
Available in: Pro. IMAP autopilot is part of the Pro realtime layer; it builds on the engine's IMAP sync without changing it.
What it does
For each IMAP account, MailDesk runs a quick capability probe and sorts the server into one of four profiles, A through D. The profile decides how MailDesk syncs that account most efficiently — for example, whether it can ask the server "what changed since last time?" cheaply, or whether it must do a fuller scan. MailDesk then prioritises the folders you actually use (Inbox, Sent, Drafts, and whatever folder is open) and skips folders that have not changed, so each sync run is fast and light.
On top of that, the autopilot pre-loads message bodies into a short-lived cache so the messages at the top of your inbox open instantly.
Why it matters
- You get the best your server can do, automatically. A modern server gets fast incremental deltas; an older server gets a careful, budgeted strategy that still keeps the inbox current.
- No tuning, no guesswork. There are no knobs. The classification is deterministic and re-checked on a schedule, so it adapts if your server is upgraded.
- The inbox opens instantly. Body prefetch means the messages you are most likely to read are already loaded when you click them.
The four capability profiles
MailDesk reads the server's advertised IMAP capabilities and classifies the account. These are the exact profiles shown on the account record:
| Profile | Server capability | What MailDesk does |
|---|---|---|
| A — Modern | IDLE + CONDSTORE + QRESYNC (modern Dovecot / mailcow and similar) | Cheapest deltas: asks the server only for what changed, and skips unchanged folders via a quick status check |
| B — IDLE only | IDLE works, but no CONDSTORE | Still skips unchanged folders, then scans flags efficiently |
| C — Basic IMAP | No reliable change-tracking (no MODSEQ) | Detects new mail by message number; conservative, correct, slightly more work per run |
| D — Broken / unreliable server | The server reports capabilities it does not actually honour | Strict, safe fallback: behaves like the engine's standard sync and does not trust the unreliable signals |
Profiles A and B run the smart path; C and D run the safe path
MailDesk only uses the cheap "ask what changed" shortcuts on profiles A and B, where they are reliable. On profile C (no dependable change-tracking) and profile D (server misreports), it falls back to the proven standard sync so correctness is never compromised. Either way, your mail is complete.
The exact labels on the mailbox account record are: A — Modern (IDLE + CONDSTORE + QRESYNC), B — IDLE only (no CONDSTORE), C — Basic IMAP (no MODSEQ), D — Broken / unreliable server. A freshly added account shows Unknown until the first probe runs.
It is fully automatic — there is nothing to configure
This is the important part: IMAP autopilot has no settings. You do not choose a profile, set a poll interval, or pick a strategy. MailDesk decides everything from the detected capabilities.
- The capability probe runs automatically on a schedule (about once a day) and re-classifies each account, so the profile stays correct even if your server is upgraded or changed.
- The sync strategy is chosen per folder, per run, based on the current profile.
- Body prefetch warms the cache automatically for new mail and for the folder you open.
The only manual control is convenience, not configuration: an administrator can press Probe IMAP capabilities on an IMAP mailbox account to re-detect the profile immediately instead of waiting for the scheduled probe — useful right after a server change.
How a profile is detected
When the probe runs, MailDesk opens an IMAP session, reads the server's CAPABILITY list, and matches it
against the four profiles. It records the detected profile and the time of the last successful probe on the
account. If the probe cannot connect or fails, the account keeps its previous profile — MailDesk never
guesses or downgrades on a transient hiccup.
flowchart TD
A[Probe runs - scheduled or manual] --> B[Read server CAPABILITY list]
B --> C{IDLE + CONDSTORE + QRESYNC?}
C -- yes --> PA[Profile A - Modern]
C -- no --> D{IDLE only, no CONDSTORE?}
D -- yes --> PB[Profile B - IDLE only]
D -- no --> PC[Profile C - Basic IMAP]
PA --> S[Smart sync: ask only what changed, skip unchanged folders]
PB --> S
PC --> L[Safe standard sync]
note[Profile D is set when a server misreports in practice] --> L
Body prefetch on IMAP
Detecting new mail is only half the experience; opening it quickly is the other half. The autopilot warms a short-lived body cache so the top messages in your inbox are ready before you click them:
- When sync brings in new mail, those messages are queued for warming at high priority.
- When you open a folder, the newest visible messages (the top 30 by default) are queued for warming.
A background job warms those bodies into the cache, throttled per account so it never overloads the server. If you open a message before it is warmed, the body is fetched on demand — instantly enough, and prefetch simply makes the common case feel immediate.
Requirements
- MailDesk Pro on Odoo 17, 18, or 19.
- A connected IMAP/SMTP mailbox account. (Gmail and Outlook use true push instead — see the Realtime overview.)
- Nothing else. Autopilot detects and adapts on its own.
Permissions required
No user action is required at all — autopilot runs in the background. The optional Probe IMAP capabilities button is on the mailbox account record, which is an administrator surface. Standard MailDesk access rules apply throughout: prefetch only ever warms bodies for accounts and folders the user already has access to.
Expected result
- New IMAP mail appears within the account's poll interval, automatically.
- Opening your inbox and recent folders feels instant, because the top messages' bodies are pre-loaded.
- The account record shows the detected profile (A, B, C, or D) and when it was last checked.
- You never had to configure any of it.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| Account profile shows Unknown | The first capability probe has not run yet, or could not connect | Press Probe IMAP capabilities on the account; check the IMAP credentials and connectivity |
| Profile is D — Broken / unreliable server | The server advertises capabilities it does not honour | This is handled automatically with the safe sync path; mail is still complete, just synced more conservatively |
| New mail is slow to appear | The server is a limited profile, or the poll interval has not elapsed | This is expected for IMAP — it is polling, not push; consider Gmail/Outlook push if available for that account |
| A message takes a moment to open | Its body was not warmed yet | It is fetched on demand; the next time the folder is open it will be pre-loaded |
| Profile looks wrong after a server upgrade | The daily probe has not re-run since the change | Press Probe IMAP capabilities to re-detect immediately |
Related
- Realtime sync (4.2.0) — what it means per provider
- Realtime & synchronization architecture — the full technical flow
- Gmail OAuth setup — true push for Gmail
- Outlook / Microsoft 365 setup