How email previews are stored
This is an advanced reference for administrators. Most setups do not need it. The everyday page is How quickly email synchronizes.
MailDesk keeps the body and attachment list of a message in a temporary cache, so the reading pane opens without waiting for the mail provider. MailDesk Pro fills that cache before you click.
Who this is for: administrators who want to understand or tune message preparation.
You need: MailDesk Pro. To change settings, administrator access and developer mode for Settings ▸ Technical. MailDesk Basic keeps the same cache on demand but does not prepare it in advance.
How it works
flowchart LR
A[New mail synced] -->|priority 1| Q[Prefetch queue]
B[Folder opened] -->|priority 5, top messages| Q
Q --> W[Warming job<br/>every minute]
W --> C[Message cache<br/>body + attachment list]
U[You open a message] --> C
C -->|already warm| R[Opens quickly]
- Queue. Each message that needs preparing gets one queue entry per account, folder and message. A message is never queued twice. Newly synced mail (priority 1) goes before mail queued because you opened a folder (priority 5).
- Warming. A scheduled action, MailDesk: Warm Message Body Cache, runs every minute. It takes a small batch and fetches the bodies into the cache.
- Opening. If the body is in the cache, it is shown at once. If not, MailDesk fetches it when you open the message. Preparation only speeds things up. Nothing depends on it.
When you open a folder, the newest 30 messages (default) are queued.
Safeguards
| Guard | Default |
|---|---|
| Messages per run | 5 |
| Time per run | About 10 seconds, then the job stops and continues next minute |
| Limit per account | 200 messages per hour |
| Retry after a failure | Waits grow from 10 seconds through minutes to 2 hours |
| Giving up | After 8 failed attempts the entry is dropped. If the message no longer exists on the server, it is dropped at once. |
A failed preparation never breaks anything. The body is fetched when you open the message.
How long bodies stay cached
The cache is a temporary copy. The message and its data stay in MailDesk's own records. The retention is set in Settings ▸ MailDesk as Email Cache Retention (days), with a default of 30 days. A daily job removes expired cache entries.
Settings
Normally you change nothing. These system parameters exist, under Settings ▸ Technical ▸ Parameters ▸ System Parameters:
| Parameter | Default | Meaning |
|---|---|---|
maildesk.prefetch.enabled |
1 |
Master switch. 0 turns preparation off. |
maildesk.prefetch.batch_per_run |
5 |
Messages prepared per run |
maildesk.prefetch.max_per_account_per_hour |
200 |
Hourly limit per account |
maildesk.prefetch.folder_open_top_n |
30 |
Messages queued when a folder opens |
Leave the defaults unless you have a reason
The defaults are chosen to be gentle on providers. Lower the hourly limit or the batch size only if a provider reports rate-limit problems.
What you can see
- Scheduled Actions. Find MailDesk: Warm Message Body Cache under Settings ▸ Technical ▸ Scheduled Actions. Its run log shows that it is active.
- Diagnostic snapshot. Administrators can create a per-account snapshot for a support request. It reports sync times, the sync profile, push health and failed-queue counts. It contains no message content, recipients, subjects, tokens or secrets.
If it does not work
| Symptom | Likely cause | Safe next step |
|---|---|---|
| The first message you open pauses briefly | It was not prepared yet | Normal. It is fetched on demand. |
| Bodies are never prepared | Preparation is off, or the job is not running | Check that maildesk.prefetch.enabled is 1 and that the warming job is active. |
| One IMAP account is slow under heavy load | The hourly limit was reached | Expected. Opening still works. |
| The provider reports rate-limit pressure | Too many requests for that provider | Lower maildesk.prefetch.max_per_account_per_hour or batch_per_run. |
If new mail does not appear at all, see Fix missing or delayed emails.