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:
cargo install --path apps/cli --lockedThis puts mailarc into ~/.cargo/bin. Check it with mailarc --help.
Build the apps:
deno task --config apps/reader/web/deno.json ci
cargo build --release -p mailarc-desktop-app -p mailarc-reader-app| App | File | What it does |
|---|---|---|
| Desktop app | target/release/mailarc-desktop | Reads the archive, adds accounts and syncs |
| Reader app | target/release/mailarc-reader | Only reads the archive |
On Windows, the files end in .exe.
Your first archive from the command line
Create an archive and prepare it for accounts. The parent folder must exist; the archive folder must not.
shmkdir -p ~/Mail mailarc init ~/Mail/Archive.mailarc mailarc upgrade ~/Mail/Archive.mailarc --to-version 2Add mail in one of two ways.
From mail files (see Importing):
shmailarc import ~/Mail/Archive.mailarc ~/Downloads/old-mail.mboxFrom a mail account (see Accounts and Syncing):
shmailarc 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-awakeaccount addasks 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.Build the search index and search:
shmailarc 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.
Open the archive in an app:
shtarget/release/mailarc-desktop --archive ~/Mail/Archive.mailarc target/release/mailarc-reader --reader ~/Mail/Archive.mailarcWithout 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 verifynow 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.