Fastmail is a standards-based service: IMAP, JMAP, CalDAV and WebDAV, so an agent can easily build a front end on it, and open-source servers such as Stalwart give you the back end. What you can't copy is the track record of a mail host: servers that big providers trust, spam filtering tuned for years, backups and people on call. Running your own mailbox on a rented IP means weeks of delivery tuning and a mailbox that is down when you are. The sensible DIY projects are a Masked Email tool or a client over a hosted mailbox, not a replacement for the hosting.
Before you buildFastmail has no free plan, only a 30-day trial. If you only want to leave a free provider's ads behind, a hosted mailbox is cheaper than running your own server.
Build me a one-person mail server setup to replace Fastmail, on my own domain. Requirements: - A `docker-compose.yml` and a `Makefile` for one Debian 12 VPS with 2 GB of memory running: Stalwart (`stalwartlabs/stalwart`) for IMAP, SMTP submission, JMAP, CalDAV and CardDAV; Roundcube (`roundcube/roundcubemail`) for webmail; and Caddy for HTTPS on mail. and webmail. subdomains. - Config: DOMAIN and ADMIN_EMAIL in .env. `make init` generates every password and secret into .env and renders the configuration from templates in ./templates. - `make dns` prints the exact records to create: A, MX, SPF, DKIM (public key read from Stalwart), DMARC at p=none, MTA-STS and TLS-RPT, the autodiscovery SRV records and the PTR record to request from the VPS provider. - `make check` verifies that records resolve (`dig`), certificates are valid, IMAP login, SMTP submission and a CalDAV PROPFIND (expect 207) work, then prints the `swaks` command to send a test message and the three Authentication-Results lines to look for in the received headers. - Masked addresses: a CLI `mask` (Node.js 22 + TypeScript, `commander`, better-sqlite3 in ./data/masks.db). `mask new <site>` creates a random alias like `<word>-<4 chars>@DOMAIN` for my account, `mask off <alias>` makes the server reject it, `mask list` shows them with the site and date. Read Stalwart's management API docs first and use the API, not file edits. - Backups: `make backup` runs restic over the volumes to an S3-compatible bucket from .env, and `make restore-test` restores the latest snapshot into a temp folder and checks that mail opens. - Migration: `make import` runs `imapsync` from my current provider with an app password in .env, with a dry-run flag; re-running skips messages already copied. - No telemetry; the only outbound traffic is mail, certificate requests and backups. - Out of scope: several users, shared calendars, a mobile app, spam-filter training, anything that needs 24/7 support. - README: port 25 outbound is blocked by many VPS providers, a plan for warming up the IP over two weeks, and a warning to keep the old mailbox forwarding for 30 days before moving the main address.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own Fastmail.
Add a delivery report to the mail setup in this folder. Requirements: - A weekly job that reads the Stalwart logs and DMARC aggregate reports sent to a dedicated mailbox, and writes a plain-text summary: messages sent, bounces and deferrals by recipient domain, DMARC pass and fail counts by source IP. - Email the summary to ADMIN_EMAIL from the server, with a warning at the top if the bounce rate is above 5% or a source IP fails DMARC. - Keep the last 12 reports in ./reports. - Update the README.
Extend the `mask` tool in this folder. Requirements: - `mask new <site> --folder` also creates an IMAP folder named after the site and a Sieve rule that files mail for that alias into it; check how Stalwart takes Sieve scripts before you start. - `mask off <alias>` keeps the folder but makes new mail bounce, and `mask on` reverses it. - `mask export` writes the alias list as CSV for a password manager import. - Update the README.
Add an archive search tool to the mail setup in this folder. Requirements: - A command `mailsearch index` that reads messages through IMAP with `imapflow` and writes sender, recipients, subject, date and body text to a SQLite FTS5 index in ./data/search.db. - `mailsearch query "invoice from:acme after:2024-01-01"` returns matches with folder and UID. - Index incrementally using UIDVALIDITY and last UID per folder; never store attachments. - Update the README.
People pay so that email, the one account everything else resets through, is run by a company that earns its money from subscriptions, not from ads. They also get 24/7 support, a trusted sending reputation and calendar and contacts that sync everywhere.
Estimate · A small VPS, a domain and a backup bucket cost about $5 to $12 a month, which is near Fastmail's $6, and the time spent on delivery problems is the real price. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Individual | $6 | $5 | One inbox, 60 GB total (50 GB mail, calendar and contacts, 10 GB files), your own domains, Masked Email, Scheduled Send, Snooze, third-party app access. |
| Duo | $10 | $8 | Two private inboxes, 60 GB each, shared calendars and address book. |
| Family | $14 | $11 | A private inbox for each of up to six users, 60 GB each, shared family calendars. |
| Business Basic | $4/user | $3/user | 6 GB per user, shared addresses and calendars; no custom domain, Scheduled Send or third-party apps. |
| Business Standard | $6/user | $5/user | 60 GB per user, custom business addresses on your domain, Scheduled Send, Snooze and third-party apps. |
| Professional | $10/user | $9/user | 150 GB per user (100 GB mail and 50 GB files) and an email retention archive for legal compliance. |
No free plan; a trial of up to 30 days.
Not really. People pay so that email, the one account everything else resets through, is run by a company that earns its money from subscriptions, not from ads. They also get 24/7 support, a trusted sending reputation and calendar and contacts that sync everywhere. The prompt on this page builds the closest honest substitute.
About $6 a month on the Individual plan per seat, $72 a year (checked 2026-10-19).
Mail that other providers reliably accept, from an infrastructure with a long history; Spam and phishing filtering that is maintained for you; 24/7 support from people who can look at your account; Masked Email built into the sign-up flows of password managers such as 1Password; Native iOS and Android apps, with calendar, contacts and offline reading. If any of those matter to you, keep paying.
Yes: Stalwart Mail Server (open source), Mox (open source), mailcow (open source).