Tools and alternatives

A MailStore Home Alternative for Linux: mailmd

Updated 6 min read

On this page
  1. Why Linux users consider mailmd
  2. mailmd email providers and sync options
  3. MailStore Home vs. mailmd archives
  4. When to choose mailmd or MailStore Home
  5. Test mailmd before switching
  6. mailmd for Linux: key points
  7. Conclusion

Linux users who want a local copy of their email can use mailmd, a free, open-source command-line tool that saves messages as Markdown files on the computer. MailStore Home is built for Windows. mailmd runs on Linux and connects to email accounts through IMAP, a protocol for accessing mailboxes, or provider APIs, which let mailmd access an account through the provider’s service.

mailmd suits users who want to copy mailbox messages into files they can keep and read. It does not import an existing MailStore Home archive, and it does not reproduce every MailStore Home feature. Whether mailmd fits depends on your current archive, how you search, and whether you can still access the original mailbox.

Why Linux users consider mailmd #

MailStore Home is built for Windows, which makes it a less direct fit for someone who wants to manage an email archive from Linux. mailmd copies messages from an online mailbox into a local folder, with one Markdown file per message.

That format keeps the archive accessible without a mailmd-specific viewer. Each file starts with its headers. HTML messages become readable Markdown. Attachments sit next to their messages. The format also makes it straightforward to search or back up the files with tools already available on Linux.

The distinction matters if you already have a MailStore Home archive. mailmd does not import that archive. It creates a new copy by connecting to a mailbox, so a switch requires access to the account that holds the messages or another way to make those messages available through a supported mailbox.

mailmd email providers and sync options #

mailmd works on Linux, macOS, and Windows through Git Bash. It supports IMAP mailboxes, including Gmail configured for IMAP, iCloud, Fastmail, Yahoo, and self-hosted mail. It also connects to Gmail through the Gmail API and to Outlook.com and Microsoft accounts through Microsoft Graph. Those API connections require an OAuth app: a provider registration that lets mailmd request permission to access the account. Create it in Google Cloud or Microsoft Entra.

For an IMAP mailbox, install mailmd using its official shell installer, connect the account, and start a sync:

mailmd connect imap --email you@example.com
mailmd sync

Many providers require an app password for IMAP, and mailmd indicates when one is needed. Gmail can also connect through its API:

mailmd connect gmail --client-secret client_secret.json

For Outlook.com or Microsoft accounts, connect through Microsoft Graph with an OAuth app ID:

mailmd connect outlook --client-id <id>

Each sync adds new messages and updates whether messages are marked as read or starred in the local archive. mailmd accesses the mailbox in read-only mode: it does not mark messages as read, move or delete them, or send mail. If a sync stops, saved files remain, and the next run continues. Mail goes under ~/mail/<account> by default. mailmd stores folders and years as directories, and index.jsonl gives scripts an index of the messages. Use --keep-raw to save each original .eml message alongside its Markdown file.

By default, mailmd skips spam and trash. For Gmail over IMAP, mailmd syncs All Mail, which includes archived messages. Use --folder, --exclude, or --since to control which mail it copies. Schedule mailmd sync --quiet with a Linux scheduler such as cron or systemd to keep the archive current.

MailStore Home vs. mailmd archives #

The main difference is how mailmd and MailStore Home store and provide access to archived messages. mailmd produces ordinary files in a local folder. MailStore Home is designed for Windows. mailmd does not provide a direct migration path from a MailStore Home archive, and its documentation does not establish feature-by-feature parity with MailStore Home.

Linux support and setup #

mailmd has a Linux setup path and runs from the command line. Once connected, a sync command copies messages into the local archive. Gmail and Microsoft accounts connected through their APIs need an OAuth app; IMAP accounts use the provider’s IMAP access settings.

If Linux support is your deciding factor, mailmd is the more direct fit because it runs on Linux. Before switching, check whether any MailStore Home feature you depend on has an equivalent in your intended mailmd workflow.

Import, search, and export #

mailmd copies messages from supported mailboxes; it does not import a MailStore Home archive or create PST or PDF files from mail. If the existing messages remain in an online mailbox, connect that mailbox and sync it. If they exist only in a MailStore Home archive, mailmd does not provide a direct route to bring them across.

mailmd has no built-in search engine. You can search the archive in a text editor or note app, use rg or grep for text searches, or use jq, a command-line tool for working with JSON, to filter index.jsonl. HTML messages are converted to readable Markdown, with links and tables retained; tracking images and hidden preview text are dropped. Attachments are saved next to the message. The original .eml file is also available when syncing with --keep-raw.

Storage, backups, and control #

mailmd stores the archive on your computer, in a folder under ~/mail. Back up that folder with your normal Linux backup method or keep it in Git if that suits your needs. You can inspect the archive files without a mailmd-specific viewer.

mailmd never deletes files from the archive. If someone later deletes a message from the mailbox, its local file remains, marked as deleted on the server. mailmd stores logins outside the archive. Only your user account can read them, but they are not encrypted. Protect the account’s local files and backups accordingly. mailmd sends no telemetry and does not use a mailmd server.

When to choose mailmd or MailStore Home #

Choose mailmd if you use Linux and want a local, file-based copy of mail from an IMAP, Gmail, Outlook.com, or Microsoft account. It suits people who want files they can open directly, searches they can run with scripts, and control over the archive folder. It is not a mail client and does not upload messages back to a mailbox or free mailbox storage on its own. You must delete mail from the mailbox yourself if storage reduction is the goal.

MailStore Home fits people who already use it on Windows and depend on its features. mailmd is not a like-for-like replacement for those features, and it cannot directly open or convert an existing MailStore Home archive. If Linux compatibility is the main requirement and the mailbox is still accessible, mailmd offers a direct way to build a separate local archive.

Test mailmd before switching #

mailmd cannot import part of a MailStore Home archive for a trial. First, try mailmd demo. It writes sample messages without connecting to a mailbox. To test real mail, connect an account and limit the initial sync with options such as --folder or --since.

Inspect the resulting Markdown files and attachments, and confirm that the message dates and headers match the mailbox. Try searching the folder with rg or grep, then copy the archive to your normal backup location and verify that the copied files open. These steps test the parts of the switch that mailmd supports without changing or deleting mail on the server.

mailmd for Linux: key points #

  • Use mailmd for a Linux-based local archive: It copies mailbox messages into Markdown files and stores them on your computer.
  • Connect to the mailbox, not the old archive: mailmd syncs supported IMAP or API-connected accounts but does not import MailStore Home archives.
  • Test the file-based workflow first: Use the demo or a limited mailbox sync, then inspect messages, attachments, searches, and a backup copy.
  • Keep its limits in mind: mailmd has no built-in search engine, does not convert to PST or PDF, and does not free mailbox storage by itself.

Conclusion #

mailmd gives Linux users a local archive of messages from an accessible mailbox. It stores them as readable Markdown files that are easy to inspect and back up. It creates a new archive workflow. It does not migrate an existing MailStore Home archive.

Test the sync and backup setup with non-critical mail before you rely on it for important messages. If your messages are in a supported mailbox and plain files meet your storage needs, mailmd gives you a direct Linux route to a local copy.

Free and open source

Try mailmd

mailmd is a free command-line tool that copies your email into Markdown files on your computer, one file per message. It works with any IMAP mailbox, and with Gmail and Outlook through their own APIs.

Install

$ curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh

Set it up with your coding agent

Set up mailmd so you can read my email. Use https://github.com/vincentsch/mailmd: read its AGENTS.md and follow the steps. Connect my mailbox and run the first sync. Then show me where the files are.

More on tools and alternatives