Skip to content

Getting started ​

This page explains how to install mailarc and how to use it from the command line. For a guided first backup with the desktop app, follow Back up your email.

Install mailarc ​

Not available yet: installers. You build mailarc from its source code for now. Installers for each system are planned.

You need:

  • rustup. The source code names its Rust version, and rustup installs it on first use.
  • For the apps, Deno 2.
  • On Linux, the development packages for OpenSSL, D-Bus and pkg-config. For the apps, also WebKitGTK 4.1 and GTK 3 (libwebkit2gtk-4.1-dev, librsvg2-dev).
  • On Windows, the Build Tools for Visual Studio with "Desktop development with C++".

In the mailarc source folder, install the command line tool:

sh
cargo install --path apps/cli --locked

This puts mailarc into ~/.cargo/bin. Check it with mailarc --help.

Build the apps:

sh
deno task --config apps/reader/web/deno.json ci
cargo build --release -p mailarc-desktop-app -p mailarc-reader-app
AppFileWhat it does
Desktop apptarget/release/mailarc-desktopReads the archive, adds accounts and syncs
Reader apptarget/release/mailarc-readerOnly reads the archive

On Windows, the files end in .exe.

Your first archive from the command line ​

  1. Create an archive and prepare it for accounts. The parent folder must exist; the archive folder must not.

    sh
    mkdir -p ~/Mail
    mailarc init ~/Mail/Archive.mailarc
    mailarc upgrade ~/Mail/Archive.mailarc --to-version 2
  2. Add mail in one of two ways.

    From mail files (see Importing):

    sh
    mailarc import ~/Mail/Archive.mailarc ~/Downloads/old-mail.mbox

    From a mail account (see Accounts and Syncing):

    sh
    mailarc account add ~/Mail/Archive.mailarc --host imap.example.com --username [email protected]
    mailarc account register ~/Mail/Archive.mailarc ACCOUNT_ID
    mailarc account test ~/Mail/Archive.mailarc ACCOUNT_ID
    mailarc sync ~/Mail/Archive.mailarc --progress --keep-awake

    account add asks for the password twice and prints the account's ID. The later commands take that ID. The account settings go into the same file the desktop app uses.

  3. Build the search index and search:

    sh
    mailarc reindex ~/Mail/Archive.mailarc
    mailarc search ~/Mail/Archive.mailarc 'from:anna invoice after:2024'

    After the first build, imports and syncs keep the index up to date.

  4. Open the archive in an app:

    sh
    target/release/mailarc-desktop --archive ~/Mail/Archive.mailarc
    target/release/mailarc-reader --reader ~/Mail/Archive.mailarc

    Without the archive argument, both apps show a start screen with Open archive…. The desktop app also offers Create archive…, which does step 1 for you.

Good habits ​

  • Keep the archive on a disk you back up, and keep at least one independent copy. See Backups and Take your archive on a flash drive.
  • Run mailarc verify now and then. It re-checks every stored message.
  • Close the apps before you import or sync from the command line. Otherwise the command stops with archive_locked.