mail_index_ids
Builds or refreshes a Message-ID sidecar for SQLite mail access on macOS 15 and earlier by harvesting headers from local .emlx files, enabling message citation without opening or altering Mail data.
Instructions
Build/refresh the Message-ID sidecar that enables the sqlite mail plane on
macOS 15 (Sequoia) and earlier (#201). Those systems' Envelope Index never stored
the RFC822 Message-ID (#199); this harvests it headers-only from the .emlx files
at rest into this server's own sidecar — never launches Mail, never writes in
Mail's data. On macOS 26+ the index has the column natively and this build is
unnecessary. Safe to re-run: a re-run harvests only what is missing and retries
messages whose files had not been downloaded yet; rebuild=True starts from
scratch. A full first build reads every message's headers — about a minute per
35k messages on a slow disk. Returns {harvested, mapped, total_ids, coverage,
skipped_no_file, skipped_no_message_id, rows_without_local_store,
high_water_rowid, index_rebuilt}. coverage is the number that matters:
messages it could not map stay uncitable, exactly as they would be on macOS 26
until Mail backfills its own column. Read-only for Mail; needs Full Disk Access
(it reads .emlx at rest), NOT Automation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rebuild | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||