Importing mail files
mailarc import ARCHIVE PATH [--format FORMAT] [--progress]PATH can be a single file or a folder. mailarc never changes or deletes the source.
| Format | What it reads |
|---|---|
auto (default) | Detects Maildir folders, Thunderbird profiles, EML files and mbox files, also inside folders |
eml | Single messages, one per .eml file |
mbox | An mbox file, guessing its variant |
mboxrd, mboxo, mboxcl2 | An mbox file of that exact variant |
maildir | A Maildir folder (cur, new, tmp) |
thunderbird | A Thunderbird profile or local folders |
Tips:
- Use
--format emlfor a folder that contains only EML files, and name the mbox variant when you know it. Exports from mailarc itself usemboxrd. - Maildir file names carry flags after
:2,, or;2,on Windows.--maildir-separator colon|semicolonpicks one when a Maildir moved between systems. - mbox files carry no reliable delivery date. mailarc keeps each message's own
Dateheader and records the delivery date as unknown, with a warning in the report.
Interrupting and repeating
Messages are written in batches of up to 256, and each batch is saved durably at once. Press Ctrl-C to stop: the import writes the messages it has read so far and exits with code 130. Run the same command again to continue. Messages already archived are recognized by their content and stored only once, so repeating an import is always safe.
The report
The import ends with a summary: how many messages it processed, how many were new, already archived (unchanged) or failed, plus any warnings. A message mailarc cannot fully parse is still stored with its original bytes; it is only marked for later parsing. Exit code 1 means some inputs failed, while everything else was committed. --json gives the full report.