Exporting
Exports write the original message bytes, never a reformatted copy. The archive is not changed.
From the command line
mailarc export ARCHIVE 'QUERY' --format eml|mbox|maildir --out NEW_FOLDER [--include-spam] [--progress]The query uses the search syntax; '' exports everything except spam. As in a search, spam is left out unless the query says is:spam or names its folder with in:. Add --include-spam to export the spam a query matches too, for example everything with '' --include-spam. --out must be a new folder outside the archive.
| Format | Result | Re-import with |
|---|---|---|
eml | One .eml file per message | --format eml |
mbox | One messages.mbox file, in the mboxrd variant | --format mboxrd |
maildir | A Maildir with flags in the file names | --format maildir |
Every export also writes:
messages.jsonl: lists every selected message with its hash and where it went;manifest.json: written last, so its presence means the export finished.
A message that fails its integrity check is listed as failed, never silently left out, and the export exits with code 1.
Notes:
- mbox cannot represent two rare cases exactly: a message without a final line break, and a header line beginning with
From. Such messages are exported and markedround_trip: false. - Maildir file names use
:2,on macOS and Linux and;2,on Windows. Choose with--maildir-separator colon|semicolon. - Exported files are readable only by you.
Interrupting and resuming
Press Ctrl-C to stop (exit code 130), then run the same command with --resume to finish. The selection is fixed when the export starts, and files already written are checked, not trusted.
From the reader app
Select messages or conversations, press s or choose Export …, pick a format and a folder. See The reader app.