Skip to content

Importing mail files ​

sh
mailarc import ARCHIVE PATH [--format FORMAT] [--progress]

PATH can be a single file or a folder. mailarc never changes or deletes the source.

FormatWhat it reads
auto (default)Detects Maildir folders, Thunderbird profiles, EML files and mbox files, also inside folders
emlSingle messages, one per .eml file
mboxAn mbox file, guessing its variant
mboxrd, mboxo, mboxcl2An mbox file of that exact variant
maildirA Maildir folder (cur, new, tmp)
thunderbirdA Thunderbird profile or local folders

Tips:

  • Use --format eml for a folder that contains only EML files, and name the mbox variant when you know it. Exports from mailarc itself use mboxrd.
  • Maildir file names carry flags after :2,, or ;2, on Windows. --maildir-separator colon|semicolon picks one when a Maildir moved between systems.
  • mbox files carry no reliable delivery date. mailarc keeps each message's own Date header 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.