Skip to content

The desktop app ​

The desktop app is the reader app plus accounts and sync. Browsing, searching, reading and exporting work exactly as in the reader app. On top of that, you add accounts, sign in with Google or Microsoft, and sync, without the command line. For a guided first backup, follow Back up your email.

Build the app, then start it with your archive:

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

Without --archive, it shows a start screen. Choose Open archive… for an existing archive, or one of the Recent archives.

Create an archive ​

On the start screen, choose Create archive…, then pick a place and a name in the Save dialog. The app creates the archive and opens it.

The start screen with Open archive… and Create archive….

  • The new archive is ready for accounts (version 2) and has an empty search index, which every sync keeps up to date.
  • A name without the ending .mailarc gets it added.
  • mailarc never overwrites a folder: if the name is taken, the app says so and creates nothing.

Switch to another archive ​

Choose Close archive in the top bar. The app goes back to the start screen, where you open or create another archive. The closed archive stays in Recent archives. A running export must finish or be stopped first.

The desktop app with an archive open. The top bar shows Accounts and Sync now.

Not available yet:

  • Upgrading an older archive to version 2 in the app. Use mailarc upgrade for that.
  • Syncing only one folder, and browsing while a sync runs.

Accounts ​

Accounts in the top bar lists the archive's accounts. For each one you can:

  • Test it: sign in and count the server's folders or messages. Nothing is written.
  • Sync just this account.
  • Rename it, or Disable and Enable it. Both are recorded in the archive.
  • Replace password…, or for a Google or Microsoft account, Sign in again after access was revoked or expired.
  • Remove… it: it leaves the list, and the archive records that it no longer syncs, so the mailbox can be added again later. Archived mail stays, and nothing changes on the server. You can also delete its password or token from the keychain.

The Accounts screen with one account and its actions.

Add an account offers three kinds:

  • Google or Microsoft: enter your address and the client ID (for Google also the client secret) from your app registration. Sign in with … opens the provider's page in your browser. The app waits until you have granted access, then saves the account. If the browser cannot be opened, the app shows the address to copy into a browser on the same computer.
  • Another server, with a password: protocol (IMAP, POP3 or JMAP), server, encryption, optional port, user name and password.

The password goes straight to your system's keychain and is not shown again. A new account is recorded in the archive right away, so it is ready to sync.

The Add an account form for a server with a password.

Syncing ​

Sync now in the top bar, or Sync next to an account, opens the sync screen. Choose all enabled accounts or one, whether to include Spam and Trash, and whether to keep the computer awake until the sync ends, then Start sync. The app remembers that last choice; see Keeping the computer awake.

The Sync screen with its options.

  • While a sync runs, the archive is closed for browsing. The archive allows either readers or one writer at a time. The window shows the sync's progress instead, and opens the archive again when it is done. Adding, renaming, enabling or disabling an account closes it for a moment too.
  • Once the new messages are counted (IMAP and POP3), the screen shows how many of them are archived, with a progress bar and an estimate of the time left from the recent speed. Rechecking flags and labels of archived messages is not counted; JMAP shows only the messages archived so far.
  • Stop halts at the next safe point. Every message archived so far stays, and the next sync continues from there.
  • When the sync is done, the search index is brought up to date, as after mailarc sync. The result lists any accounts or folders that failed, with the reason.

A sync from the app is the same as mailarc sync: the same checks, retries, jobs and saved positions. It cannot start while another program writes to the archive. While the app has the archive open, a sync or import from the command line stops at once with archive_locked; close the app first.

Sync automatically ​

At the bottom of Accounts, Sync automatically sets a schedule: Every hour, Every 6 hours or Once a day. Off removes it. The schedule is kept by your system, so it also runs while the app is closed.

The Accounts screen with Sync automatically set to Every hour, and the last scheduled run.

  • Each run syncs every enabled account like Sync now, without Spam and Trash, and then updates the search index.
  • A run is skipped while the archive is open in mailarc, in this app or the reader app, or while another program writes to it. Nothing changes, and the next run tries again.
  • While the desktop app has the archive open, it syncs a due run itself. When nothing has synced the archive for the chosen interval, and you have not used the app for 5 minutes, the app starts the sync and shows its progress, marked as started automatically. It does this only from the archive view, not while a dialog, an export or a copy is open, and it tries at most once per interval. Stop ends it as usual. The reader app does not do this.
  • If the computer sleeps through a run, the run starts when it wakes. A scheduled run does not keep the computer awake.
  • The Accounts screen shows when the last scheduled run ended and how it went.
  • The schedule belongs to the archive at its current place and to this copy of the app. If you move either one, the Accounts screen says so. Choose the interval again.

Where the schedule is kept:

  • macOS: a LaunchAgent, app.mailarc.desktop.sync.ARCHIVE_ID.plist in ~/Library/LaunchAgents. If macOS asks whether mailarc-desktop may use your keychain, choose Always Allow. After you build a new version of the app, macOS may ask again.
  • Linux: a systemd user timer, mailarc-sync-ARCHIVE_ID.timer in ~/.config/systemd/user. Your keyring must be unlocked in your session.
  • Windows: a task in Task Scheduler, mailarc-sync-ARCHIVE_ID. It runs only while you are signed in to Windows, so it can read your passwords from Credential Manager. Ending the task in Task Scheduler stops the sync at once, not at a safe point. Nothing already saved is lost, and the next run repairs and continues.

To sync on a schedule without the app, use the command line.

Saved searches in the archive ​

Save search … offers Store it in the archive itself. Such a search is part of the archive: it is listed under Saved in this archive, and a copy of the archive folder, a backup or someone you give it to has it too. The reader app shows these searches and runs them, but only the desktop app changes them.

Searches saved without that box stay on this computer, as in the reader app. ⇡ next to one stores it in the archive instead. Storing, renaming or deleting a search in the archive closes the archive for a moment, as an account change does; the list and the message you were reading come back on their own.

Copying to another archive ​

Check messages or conversations in a list, then Copy to archive…. Choose the other archive's folder; the copy runs in the background while you go on browsing.

  • The messages keep their folders, labels and flags there, under accounts marked as copied. A message the other archive has already is not stored twice.
  • This archive is only read. Until the copy ends, you cannot sync or change accounts; the app says that a copy is running.
  • Stop keeps what was copied. Resume copies what is left, including messages that failed, from the same selection.
  • Afterwards the other archive's search index is updated.

It works as mailarc copy does.

Where the settings live ​

Account settings are kept per archive in mailarc/accounts/ARCHIVE_ID.json in your system's settings folder:

SystemFolder
macOS~/Library/Application Support/mailarc/accounts
Linux~/.config/mailarc/accounts
Windows%APPDATA%\mailarc\accounts

It is the same file the command line uses when you leave out --config, so the app and mailarc sync ARCHIVE see the same accounts, for example on a schedule. Passwords and tokens are never in it. To use accounts set up with an earlier --config file, copy that file there under the archive's ID. Recent archives and saved searches are kept apart from the reader app's.