Skip to content
ZIDAN44Public

About

MailCraft: a free, open-source email client that works like Outlook. Local-first, clean-room, in pure Rust, for Windows, macOS, Linux and the browser.

Topics

Resources

Security policy

Stars

235 stars

Watchers

9 watching

Forks

Repository files navigation

MailCraft

Local-first email: an open-source, clean-room alternative to Microsoft Outlook, written in Rust.
By Zinadin Zidan and the MailCraft contributors.

CI License: MIT OR Apache-2.0

mailcraft.dev · Download · Changelog · Roadmap

MailCraft with the sample mailbox: folder pane, ribbon, the Inbox grouped by date and the reading pane

Dark mode with a search across all mailboxes Writing a reply in the reading pane

MailCraft gives you the everyday Outlook mail workflow with your own mail servers. It keeps a copy of your mail on your computer, so it works offline.

Features

  • Familiar: three panes, a ribbon and the usual Outlook shortcuts. Drag messages onto folders.
  • Accounts: IMAP or POP with SMTP, JMAP, and Exchange Online (Graph) or on-premises (EWS). Sign in with Gmail or Microsoft 365, see All Inboxes, and open or export .pst files.
  • Works offline: every folder is kept on disk and synced in the background. Changes you make offline go to the server when you reconnect.
  • Reading and writing: conversations, formatted HTML, picture thumbnails, rich-text replies, signatures, drafts, an Outbox, Print and Save as PDF.
  • Organising: archive, flag, pin, snooze, categories, Focused and Other, rules, and Undo.
  • Search: works offline, with from:, subject:, has:attachment, is:unread and more.
  • Calendar and people: day, week and month views, meeting invitations, tasks, a To-Do Bar beside the mail, an address book, and CalDAV/CardDAV, with a mail account or on their own, from any such server (Nextcloud, Baïkal, SOGo, Radicale and others).
  • Private and secure: MailCraft talks only to your servers, always over TLS. Passwords stay in the system keychain. Remote pictures load only when you ask. S/MIME and OpenPGP sign and encrypt, and the message you're writing says whether everyone in it can receive it encrypted.
  • Everywhere: Windows, macOS, Linux and the browser (JMAP accounts only), in 19 interface languages.
  • Scriptable: every action is a command with an id. The ribbon, shortcuts, the CLI and --cmd all run the same commands.

Install

Download an installer from mailcraft.dev, which offers the file for your system, or from the Releases page:

  • Windows: .msi, or a portable zip.
  • macOS: .dmg.
  • Linux: AppImage, .deb, .rpm, Flatpak or .tar.gz.
  • FreeBSD: a tarball.

To run MailCraft portably, put a portable.txt file beside the app. It then keeps its data in a MailCraftData folder next to it. Passwords are never in that folder: a portable copy asks for them at each start, unless Remember on this computer was ticked when it asked, which keeps that password in this computer's system keychain (another computer asks again).

Uninstall

  1. In MailCraft, remove each account (File › Info › Remove account). This also deletes the passwords MailCraft kept in the system keychain.

  2. Remove the app:

    • Windows: in Settings › Apps, choose MailCraft, then Uninstall. For the portable zip, delete its folder.
    • macOS: drag MailCraft from Applications to the Bin.
    • Linux: with the package manager it came from (sudo apt remove mailcraft, sudo dnf remove mailcraft, flatpak uninstall --delete-data io.github.zidan44.MailCraft), or delete the AppImage.
  3. To remove your mail and settings too, delete these two folders:

    • the data files: MailCraft Files in your Documents folder, unless you moved them elsewhere;
    • the settings: %APPDATA%\MailCraft on Windows, ~/Library/Application Support/MailCraft on macOS, ~/.local/share/mailcraft on Linux.

    A portable copy keeps both in the MailCraftData folder beside it.

Build and run

cargo run --release -p mailcraft -- --sample   # local sample mailbox; drop --sample to add an account
cargo run -p mailcraft-cli -- commands         # CLI: add, sync, list, read, search, send, run
cd apps/mailcraft-web && trunk serve           # browser: http://127.0.0.1:8774/?sample
  • English spelling uses the SCOWL dictionaries from storytold/craft-i18n, an optional build input as in the other Craft apps. To build with them, check it out at the commit in craft-i18n.rev and point CRAFT_I18N_DIR at it (an absolute path): git clone https://github.com/storytold/craft-i18n ../craft-i18n, git -C ../craft-i18n checkout "$(cat craft-i18n.rev)", then CRAFT_I18N_DIR="$PWD/../craft-i18n" cargo run -p mailcraft -- --sample. Without it MailCraft builds and English uses a smaller built-in word list.
  • The CLI reads your password from MAILCRAFT_PASSWORD, or asks for it. It never stores it.
  • MailCraft keeps its data in %APPDATA%\MailCraft (Windows), ~/Library/Application Support/MailCraft (macOS) or ~/.local/share/mailcraft (Linux). To use another folder, pass --data DIR or set MAILCRAFT_DATA.
  • To back MailCraft up, copy two folders: that one (the account list and settings) and MailCraft Files in Documents, where each account's mail, contacts and calendar are in a .mailcraft file of its own. File › Options › Data files shows both, with Open folder for each; a portable copy has everything in MailCraftData. Copy them with MailCraft closed (File › Exit: closing the window can leave it running), or with a backup program that copies from a snapshot of the disk, as Time Machine does: a copy taken while MailCraft writes may not open. To bring a backup back, put both folders where they were, on that computer or another, before MailCraft starts; passwords aren't in them, so it asks for each again. File › Open & Export › Export to Outlook data file also saves an account as a .pst other mail programs open. MailCraft doesn't back itself up on a schedule.
  • An attachment opened in another app, a message printed through a PDF viewer, and a video attachment written out for its picture are handed over as files in a temporary folder of your own (mailcraft-open, mailcraft-print, mailcraft-thumbs and mailcraft-frames in your temporary folder on Windows and macOS; mailcraft in $XDG_RUNTIME_DIR or ~/.cache on Linux). MailCraft clears them when it closes, but for those handed over in the last two minutes, which their app may not have opened yet, and on Windows a file an app still has open; what's left goes at a later close, or at a start once it's a day old. A portable copy, or one keeping an account online only, leaves nothing there.
  • To put the web build on your own site, see hosting the web build.

Documentation

Contribute

  • Start with how MailCraft is built.
  • Follow the project rules in AGENTS.md: no crashes, no Microsoft assets, clean room.
  • Run cargo xtask ci before every commit.
  • To fuzz the parsers, see fuzzing.
  • The installer scripts live in packaging/. The Release workflow (release.yml) runs them and publishes a release.

License and credits

MailCraft is dual-licensed under MIT OR Apache-2.0.

It is built on mail-parser, mail-builder, imap-proto, rustls, html2text, hayro and egui. .pst files go through MailCraft's own crate, written from Microsoft's published specification.

Microsoft Outlook is a trademark of Microsoft. MailCraft is not affiliated with Microsoft and uses none of its code, icons or assets.

About

MailCraft: a free, open-source email client that works like Outlook. Local-first, clean-room, in pure Rust, for Windows, macOS, Linux and the browser.

Topics

Resources

Security policy

Stars

235 stars

Watchers

9 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages