frostmail

module
v0.4.1-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: MIT

README

Frostmail

CI

A mail client that works like Apple Mail.app, without looking like a GNOME or KDE app. It runs on Linux and on Windows, and its daemon can also serve a phone and any browser on the owner's tailnet as the mail app of lodge (M8; built, and in progress). Pre-release: it syncs, reads, searches and sends generic IMAP, Gmail, iCloud and Outlook.com accounts, and is the owner's daily mail client (M4). Contacts, calendars and tasks over CardDAV, CalDAV, Google Tasks and Microsoft Graph, invitations answered from the reader, events and contacts edited in place, and a To-Do bar beside the inbox are built (M4.5, M5.5), with Mail.app's rules, smart mailboxes, VIPs, Send Later and Remind Me (M5). See the roadmap.

Dark mode, reading a conversation
Replying in a compose window Account settings
The Calendar's week with an event's details
An invitation answered from the reader The Calendar's month

The screenshots show made-up mail (app/e2e/showcase) in the real app; make screenshots retakes them.

  • maild is a per-user Go daemon that owns sync, a SQLite cache with full-text search, and a JSON-RPC socket.
  • The app is Tauri v2 with a React UI in the system WebKitGTK.
  • mailctl is a command-line client of the same socket.

Develop

Requirements: Go 1.27 and mise install (golangci-lint) on the host; nsl for the app toolchain; incus for the test mail server.

nsl create frostmail --distro debian:13
nsl run -m frostmail --root bash dev/nsl/provision.sh "$(id -un)"
dev/incus/mailtest.sh up
make check          # host: generated files, vet, lint, unit tests
make engine-it      # integration tests against the test mail server
make ui-test        # nsl: typecheck and UI tests
make app-run        # nsl: maild plus the built app

make help lists every target. Architecture starts at docs/design/overview.md; agents start at AGENTS.md.

License

MIT. third_party/go-imap is MIT, from emersion/go-imap, with the patches in its FROSTMAIL-PATCHES.md.

Directories

Path Synopsis
Package api is the maild RPC contract: JSON-RPC 2.0 over a Unix socket, specified in docs/specs/rpc-protocol.md.
Package api is the maild RPC contract: JSON-RPC 2.0 over a Unix socket, specified in docs/specs/rpc-protocol.md.
cmd
mailctl command
Command mailctl is the command-line client for maild: it speaks the same RPC API as the app (docs/specs/rpc-api.md).
Command mailctl is the command-line client for maild: it speaks the same RPC API as the app (docs/specs/rpc-api.md).
maild command
Command maild is the frostmail engine: a per-user daemon that owns mail sync, the local store and the RPC socket the app and mailctl use (docs/design/overview.md).
Command maild is the frostmail engine: a per-user daemon that owns mail sync, the local store and the RPC socket the app and mailctl use (docs/design/overview.md).
internal
blob
Package blob stores raw messages by content: each blob is a file named by the hex SHA-256 of its bytes, under <dir>/<first two hex digits>/<sha> (docs/design/storage.md).
Package blob stores raw messages by content: each blob is a file named by the hex SHA-256 of its bytes, under <dir>/<first two hex digits>/<sha> (docs/design/storage.md).
calendar
Package calendar reads iCalendar events and expands their occurrences (docs/design/pim.md, Calendars; ADR-0018).
Package calendar reads iCalendar events and expands their occurrences (docs/design/pim.md, Calendars; ADR-0018).
compose
Package compose builds outgoing mail: the rules for replies and forwards (this file) and the message builder (docs/design/send.md).
Package compose builds outgoing mail: the rules for replies and forwards (this file) and the message builder (docs/design/send.md).
config
Package config resolves where maild keeps its files (docs/design/overview.md#configuration).
Package config resolves where maild keeps its files (docs/design/overview.md#configuration).
contentline
Package contentline reads and patches the content lines of vCard (RFC 6350) and iCalendar (RFC 5545) objects.
Package contentline reads and patches the content lines of vCard (RFC 6350) and iCalendar (RFC 5545) objects.
datalock
Package datalock is the one-maild-per-data-directory lock: an exclusive flock on <data dir>/maild.lock, held for the life of the process or until released.
Package datalock is the one-maild-per-data-directory lock: an exclusive flock on <data dir>/maild.lock, held for the life of the process or until released.
davsession
Package davsession scripts the write sessions that are recorded against a provider's servers and replayed in tests (docs/design/testing.md, DAV and Tasks recordings).
Package davsession scripts the write sessions that are recorded against a provider's servers and replayed in tests (docs/design/testing.md, DAV and Tasks recordings).
davtest
Package davtest is an in-process CardDAV and CalDAV server for tests, as imapxtest is for IMAP (docs/design/pim.md): memory collections, ETags, sync tokens over a change log, conditional writes, and hooks to change objects as another client would and to make requests fail.
Package davtest is an in-process CardDAV and CalDAV server for tests, as imapxtest is for IMAP (docs/design/pim.md): memory collections, ETags, sync tokens over a change log, conditional writes, and hooks to change objects as another client would and to make requests fail.
davx
Package davx is Frostmail's WebDAV client for CardDAV (RFC 6352) and CalDAV (RFC 4791): discovery, collections, sync-collection (RFC 6578), multiget, and conditional writes of raw objects (ADR-0017).
Package davx is Frostmail's WebDAV client for CardDAV (RFC 6352) and CalDAV (RFC 4791): discovery, collections, sync-collection (RFC 6578), multiget, and conditional writes of raw objects (ADR-0017).
dbustest
Package dbustest runs a private D-Bus daemon for tests of code that talks to session services (the Secret Service, notifications).
Package dbustest runs a private D-Bus daemon for tests of code that talks to session services (the Secret Service, notifications).
devgw
Package devgw serves maild's RPC over a WebSocket on loopback, so the UI can be developed in an ordinary browser against a real maild (docs/design/app.md, Dev and test).
Package devgw serves maild's RPC over a WebSocket on loopback, so the UI can be developed in an ordinary browser against a real maild (docs/design/app.md, Dev and test).
discover
Package discover finds an address's mail servers (docs/design/accounts.md, Discovery): provider profiles, Mozilla autoconfig documents (also served by the ISPDB) and RFC 6186 SRV records.
Package discover finds an address's mail servers (docs/design/accounts.md, Discovery): provider profiles, Mozilla autoconfig documents (also served by the ISPDB) and RFC 6186 SRV records.
engine
Package engine implements the maild API domains over the store; the sync engine joins it in M1 (docs/design/overview.md).
Package engine implements the maild API domains over the store; the sync engine joins it in M1 (docs/design/overview.md).
events
Package events fans committed events out to subscribed connections and replays the durable log for subscribers that resume (docs/specs/rpc-protocol.md).
Package events fans committed events out to subscribed connections and replays the durable log for subscribers that resume (docs/specs/rpc-protocol.md).
graph
Package graph is Frostmail's client for the part of Microsoft Graph that Microsoft accounts' contacts and calendars need (ADR-0039, ADR-0040; docs/design/pim.md, Microsoft Graph): listing calendars and contact folders, delta rounds, reading events, series and contacts, and turning them into the iCalendar and vCard sources the rest of maild reads.
Package graph is Frostmail's client for the part of Microsoft Graph that Microsoft accounts' contacts and calendars need (ADR-0039, ADR-0040; docs/design/pim.md, Microsoft Graph): listing calendars and contact folders, delta rounds, reading events, series and contacts, and turning them into the iCalendar and vCard sources the rest of maild reads.
graphtest
Package graphtest is an in-process Microsoft Graph for tests of Graph sync (docs/design/pim.md, Microsoft Graph), as davtest is for DAV: the account's calendars and contact folders in memory, delta rounds with tokens and pages, series read with their exceptions, contact photos, Graph's writes, and hooks that play another client's changes.
Package graphtest is an in-process Microsoft Graph for tests of Graph sync (docs/design/pim.md, Microsoft Graph), as davtest is for DAV: the account's calendars and contact folders in memory, delta rounds with tokens and pages, series read with their exceptions, contact photos, Graph's writes, and hooks that play another client's changes.
gtasks
Package gtasks is a client of the Google Tasks API (v1) for pimsync (docs/design/pim.md, Tasks): task lists, tasks with their JSON kept as sent, and the writes Frostmail makes.
Package gtasks is a client of the Google Tasks API (v1) for pimsync (docs/design/pim.md, Tasks): task lists, tasks with their JSON kept as sent, and the writes Frostmail makes.
gtasks/gtaskstest
Package gtaskstest is an in-process Google Tasks API (v1) for tests, as davtest is for DAV (docs/design/pim.md, Testing): task lists and tasks in memory with Google's JSON, paging, updatedMin, hidden and deleted tasks, positions among siblings, a bearer token, and hooks to change tasks as another client would and to make requests fail.
Package gtaskstest is an in-process Google Tasks API (v1) for tests, as davtest is for DAV (docs/design/pim.md, Testing): task lists and tasks in memory with Google's JSON, paging, updatedMin, hidden and deleted tasks, positions among siblings, a bearer token, and hooks to change tasks as another client would and to make requests fail.
httprec
Package httprec records HTTP sessions and replays them in tests (docs/design/testing.md, DAV and Tasks recordings), as imapx's trace and replay do for IMAP.
Package httprec records HTTP sessions and replays them in tests (docs/design/testing.md, DAV and Tasks recordings), as imapx's trace and replay do for IMAP.
imapx
Package imapx is frostmail's only door to IMAP.
Package imapx is frostmail's only door to IMAP.
imapx/imapxtest
Package imapxtest runs go-imap's in-memory IMAP server for unit tests.
Package imapxtest runs go-imap's in-memory IMAP server for unit tests.
imapx/replay
Package replay serves a recorded IMAP session back to a client (docs/design/testing.md, transcript replay).
Package replay serves a recorded IMAP session back to a client (docs/design/testing.md, transcript replay).
itip
Package itip reads iTIP messages that arrive in mail (RFC 5546, RFC 6047) and writes the user's answers: the REPLY mailed to an organizer and the PARTSTAT patch of a stored event (ADR-0019; ADR-0018's patches).
Package itip reads iTIP messages that arrive in mail (RFC 5546, RFC 6047) and writes the user's answers: the REPLY mailed to an organizer and the PARTSTAT patch of a stored event (ADR-0019; ADR-0018's patches).
lodge
Package lodge serves maild as lodge's mail app on its app socket (docs/specs/lodge-app.md, ADR-0041): /health, the /api WebSocket as caller session, and /content/ for reader pages, parts and whole messages, which lodge-content serves to the reader's frame and to downloads.
Package lodge serves maild as lodge's mail app on its app socket (docs/specs/lodge-app.md, ADR-0041): /health, the /api WebSocket as caller session, and /content/ for reader pages, parts and whole messages, which lodge-content serves to the reader's frame and to downloads.
mailgen
Package mailgen generates reproducible synthetic mail: threads, MIME variety and flags, for load tests (make mailtest-seed) and the app's fixture data (tools/uifixture).
Package mailgen generates reproducible synthetic mail: threads, MIME variety and flags, for load tests (make mailtest-seed) and the app's fixture data (tools/uifixture).
mailsync
Package mailsync keeps each account's local store in step with its IMAP server: one actor per account runs the reconcile pass, watches INBOX with IDLE, polls the other mailboxes and fetches bodies on demand (docs/design/sync.md).
Package mailsync keeps each account's local store in step with its IMAP server: one actor per account runs the reconcile pass, watches INBOX with IDLE, polls the other mailboxes and fetches bodies on demand (docs/design/sync.md).
mcpserver
Package mcpserver serves the user's mail to agents over the Model Context Protocol, behind lodge's /mcp/mail (docs/specs/lodge-app.md, /mcp; ADR-0041).
Package mcpserver serves the user's mail to agents over the Model Context Protocol, behind lodge's /mcp/mail (docs/specs/lodge-app.md, /mcp; ADR-0041).
mimex
Package mimex parses and normalizes mail messages for frostmail; the x marks it as frostmail's layer over the standard mime packages.
Package mimex parses and normalizes mail messages for frostmail; the x marks it as frostmail's layer over the standard mime packages.
notify
Package notify announces new mail on the desktop (docs/design/desktop.md, Notifications): the texts (notes.go) and, later, the D-Bus sender.
Package notify announces new mail on the desktop (docs/design/desktop.md, Notifications): the texts (notes.go) and, later, the D-Bus sender.
oauth
Package oauth signs maild in to OAuth providers (docs/design/accounts.md, Sign-in; ADR-0011): the protocol pieces (protocol.go), provider endpoints, and later the loopback flow and the token manager.
Package oauth signs maild in to OAuth providers (docs/design/accounts.md, Sign-in; ADR-0011): the protocol pieces (protocol.go), provider endpoints, and later the loopback flow and the token manager.
pimsync
Package pimsync keeps each account's address books, calendars and task lists in step with its servers (docs/design/pim.md, ADR-0017): one loop per account with a service on, beside mail's actor and independent of it, polling every 5 minutes, at once on request and after a local change.
Package pimsync keeps each account's address books, calendars and task lists in step with its servers (docs/design/pim.md, ADR-0017): one loop per account with a service on, beside mail's actor and independent of it, polling every 5 minutes, at once on request and after a local change.
providers
Package providers holds what Frostmail knows about mail providers: their servers, the sign-in kinds they accept, and the quirks the sync engine honors (docs/design/accounts.md, Provider profiles).
Package providers holds what Frostmail knows about mail providers: their servers, the sign-in kinds they accept, and the quirks the sync engine honors (docs/design/accounts.md, Provider profiles).
reminders
Package reminders fires calendar reminders when their alarms come due (docs/design/pim.md, Reminders): it records them as fired, tells the app, and, while the app is away, shows desktop notifications.
Package reminders fires calendar reminders when their alarms come due (docs/design/pim.md, Reminders): it records them as fired, tells the app, and, while the app is away, shows desktop notifications.
render
Package render prepares stored messages for the reader: sanitized HTML whose images are embedded as data: URLs (WebKitGTK does not load the app's mailpart:// scheme inside the reader's frame), inline parts decoded into the parts cache, and remote images fetched only on request (docs/design/rendering.md, ADR-0005).
Package render prepares stored messages for the reader: sanitized HTML whose images are embedded as data: URLs (WebKitGTK does not load the app's mailpart:// scheme inside the reader's frame), inline parts decoded into the parts cache, and remote images fetched only on request (docs/design/rendering.md, ADR-0005).
rpcserver
Package rpcserver serves the maild API on lodge's kit (github.com/frostyard/lodge/kit/jsonrpc): rpc.hello, events.subscribe, a caller per connection and whether the app attends.
Package rpcserver serves the maild API on lodge's kit (github.com/frostyard/lodge/kit/jsonrpc): rpc.hello, events.subscribe, a caller per connection and whether the app attends.
rpctest
Package rpctest runs a real maild API server (store, broker, views, engine, rpcserver and optionally sync) on a temporary socket, for tests of clients such as mailctl and for end-to-end sync tests.
Package rpctest runs a real maild API server (store, broker, views, engine, rpcserver and optionally sync) on a temporary socket, for tests of clients such as mailctl and for end-to-end sync tests.
search
Package search parses the search language (docs/specs/search.md) into a Query the store turns into SQL over messages and messages_fts.
Package search parses the search language (docs/specs/search.md) into a Query the store turns into SQL over messages and messages_fts.
secrets
Package secrets keeps account credentials out of the database (docs/design/storage.md#credentials): the Secret Service over D-Bus on Linux, a file sealed with DPAPI on Windows, and a plain File for development.
Package secrets keeps account credentials out of the database (docs/design/storage.md#credentials): the Secret Service over D-Bus on Linux, a file sealed with DPAPI on Windows, and a plain File for development.
smtpx
Package smtpx is frostmail's only door to SMTP: it hands one built message to an account's submission server (docs/design/send.md, Outbox) and says whether a failure is worth retrying.
Package smtpx is frostmail's only door to SMTP: it hands one built message to an account's submission server (docs/design/send.md, Outbox) and says whether a failure is worth retrying.
smtpx/smtpxtest
Package smtpxtest runs an in-process SMTP submission server for tests of sending: it records accepted messages and can refuse or hold them.
Package smtpxtest runs an in-process SMTP submission server for tests of sending: it records accepted messages and can refuse or hold them.
store
Package store is maild's SQLite database: migrations, the single writer, the durable event log and the queries (docs/design/storage.md).
Package store is maild's SQLite database: migrations, the single writer, the durable event log and the queries (docs/design/storage.md).
unsubscribe
Package unsubscribe works out how a list message can be left and sends RFC 8058 one-click requests (ADR-0027): an HTTPS POST that carries nothing of the user's and never reaches the user's own network.
Package unsubscribe works out how a list message can be left and sends RFC 8058 one-click requests (ADR-0027): an HTTPS POST that carries nothing of the user's and never reaches the user's own network.
vcardx
Package vcardx reads the fields Frostmail shows from vCards (RFC 2426 version 3.0 and RFC 6350 version 4.0) over internal/contentline, and builds the vCard Add to Contacts creates (docs/design/pim.md).
Package vcardx reads the fields Frostmail shows from vCards (RFC 2426 version 3.0 and RFC 6350 version 4.0) over internal/contentline, and builds the vCard Add to Contacts creates (docs/design/pim.md).
view
Package view keeps live, ordered message lists for clients (the view domain in docs/specs/rpc-api.md).
Package view keeps live, ordered message lists for clients (the view domain in docs/specs/rpc-api.md).
workflowcheck
Package workflowcheck holds the tests that keep the GitHub Actions workflows within frostyard/core ADR-0021: external actions pinned to a full commit SHA, permissions declared at the top, and checkouts that do not keep the token.
Package workflowcheck holds the tests that keep the GitHub Actions workflows within frostyard/core ADR-0021: external actions pinned to a full commit SHA, permissions declared at the top, and checkouts that do not keep the token.
tools
catprobe command
Command catprobe measures Gmail's categories for the categories spike (docs/plans/0008-m5-mail-app-parity.md, Phase 7).
Command catprobe measures Gmail's categories for the categories spike (docs/plans/0008-m5-mail-app-parity.md, Phase 7).
davprobe command
Command davprobe compares, read-only, what a DAV server says of one of an account's collections each way maild asks (docs/design/pim.md, Operational notes): a PROPFIND at depth 1 (verify's listing), a sync-collection from no token and from the stored token (sync's), and a multiget of what each sync calls deleted.
Command davprobe compares, read-only, what a DAV server says of one of an account's collections each way maild asks (docs/design/pim.md, Operational notes): a PROPFIND at depth 1 (verify's listing), a sync-collection from no token and from the stored token (sync's), and a multiget of what each sync calls deleted.
davrec command
Command davrec scrubs recorded DAV and Google Tasks sessions for replay.
Command davrec scrubs recorded DAV and Google Tasks sessions for replay.
davsession command
Command davsession records a scripted write session (internal/davsession) against a provider's servers, for a replay test (docs/design/testing.md, DAV and Tasks recordings).
Command davsession records a scripted write session (internal/davsession) against a provider's servers, for a replay test (docs/design/testing.md, DAV and Tasks recordings).
flatpakgo command
Command flatpakgo prints the Go modules maild and mailctl need as flatpak-builder `file` sources, so a Flatpak builds offline (docs/adr/0046-the-desktop-flatpak-carries-its-own-maild.md).
Command flatpakgo prints the Go modules maild and mailctl need as flatpak-builder `file` sources, so a Flatpak builds offline (docs/adr/0046-the-desktop-flatpak-carries-its-own-maild.md).
imaprec command
Command imaprec turns a session trace from maild (MAILD_IMAP_TRACE) into a replay script that can be checked in (docs/design/testing.md, transcript replay).
Command imaprec turns a session trace from maild (MAILD_IMAP_TRACE) into a replay script that can be checked in (docs/design/testing.md, transcript replay).
lodgeprobe command
Command lodgeprobe checks a maild serving lodge's mail app socket the way lodge reaches it, for smoke tests of maild --lodge (dev/lodge/run.sh, a deployment; docs/specs/lodge-app.md): GET /health, a session over /api that lists the mailboxes and renders the newest inbox message for the content route, and that page from /content/ as caller content.
Command lodgeprobe checks a maild serving lodge's mail app socket the way lodge reaches it, for smoke tests of maild --lodge (dev/lodge/run.sh, a deployment; docs/specs/lodge-app.md): GET /health, a session over /api that lists the mailboxes and renders the newest inbox message for the content route, and that page from /content/ as caller content.
mailgen command
Command mailgen writes a reproducible Maildir of N synthetic messages for load tests (make mailtest-seed); the generator is internal/mailgen.
Command mailgen writes a reproducible Maildir of N synthetic messages for load tests (make mailtest-seed); the generator is internal/mailgen.
msprobe command
Command msprobe finds out how a Microsoft account (Outlook.com, Hotmail) behaves for Frostmail before maild speaks to it (ADR-0039; plan 0010, Phase 1): which scopes sign in to IMAP, SMTP and Graph from one consent, what Outlook's IMAP offers, and what Graph serves for calendars and contacts.
Command msprobe finds out how a Microsoft account (Outlook.com, Hotmail) behaves for Frostmail before maild speaks to it (ADR-0039; plan 0010, Phase 1): which scopes sign in to IMAP, SMTP and Graph from one consent, what Outlook's IMAP offers, and what Graph serves for calendars and contacts.
rpcgen command
Command rpcgen generates the maild RPC contract from schema/rpc/*.yaml: the Go half of package api, the TypeScript client for the app, and the API reference.
Command rpcgen generates the maild RPC contract from schema/rpc/*.yaml: the Go half of package api, the TypeScript client for the app, and the API reference.
schedprobe command
Command schedprobe finds out whether a CalDAV provider tells invitees about an event a client writes as its organizer, and whether SCHEDULE-AGENT keeps it quiet (ADR-0034's SchedulesOrganizer; plan 0009, Phase 5).
Command schedprobe finds out whether a CalDAV provider tells invitees about an event a client writes as its organizer, and whether SCHEDULE-AGENT keeps it quiet (ADR-0034's SchedulesOrganizer; plan 0009, Phase 5).
searchbench command
Command searchbench times searches the way the app runs them: view.open with the search text over maild's socket, which builds the view's whole snapshot (docs/plans/0006-m4-daily-driver.md, exit evidence 3).
Command searchbench times searches the way the app runs them: view.open with the search text over maild's socket, which builds the view's whole snapshot (docs/plans/0006-m4-daily-driver.md, exit evidence 3).
smtpsink command
Command smtpsink is an SMTP submission server for the app's end-to-end tests: it accepts AUTH PLAIN with any credentials over plain TCP and writes each accepted message to DIR/N.eml with its envelope in DIR/N.json.
Command smtpsink is an SMTP submission server for the app's end-to-end tests: it accepts AUTH PLAIN with any credentials over plain TCP and writes each accepted message to DIR/N.eml with its envelope in DIR/N.json.
taskrun command
Command taskrun runs task cards (docs/tasks) through an executor (Codex, or opencode with a local model) and enforces the card's contract: only the listed files change, the given tests stay byte-identical, the acceptance command and make check pass.
Command taskrun runs task cards (docs/tasks) through an executor (Codex, or opencode with a local model) and enforces the card's contract: only the listed files change, the given tests stay byte-identical, the acceptance command and make check pass.
uifixture command
Command uifixture builds a maild data directory for the app's tests: one account whose INBOX holds N mailgen messages with their bodies stored, and a Hostile mailbox holding the hostile-HTML corpus (docs/plans/0004, Phase 4).
Command uifixture builds a maild data directory for the app's tests: one account whose INBOX holds N mailgen messages with their bodies stored, and a Hostile mailbox holding the hostile-HTML corpus (docs/plans/0004, Phase 4).
zonesgen command
Command zonesgen generates internal/calendar/zones_gen.go, the Windows time zone names Outlook writes in TZID mapped to IANA zones, from CLDR's windowsZones.xml at a pinned release whose SHA-256 it checks (ADR-0018; frostyard/core ADR-0023).
Command zonesgen generates internal/calendar/zones_gen.go, the Windows time zone names Outlook writes in TZID mapped to IANA zones, from CLDR's windowsZones.xml at a pinned release whose SHA-256 it checks (ADR-0018; frostyard/core ADR-0023).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL