Mailflare: Self-Hosted Email, Calendar and Drive
GitHub Repo
AGPL-3.0
December 1, 2026 at 01:58 PM
0 views

Mailflare: Self-Hosted Email, Calendar and Drive

@hieunc229Project Author

What Mailflare is

Mailflare is a self-hosted mail application with a calendar, file storage, booking pages and an AI assistant attached. The README pitches it as "a self-hosted alternative to Google Workspace: custom domain email, calendar, Drive, booking and built-in AI agents", aimed at "people and teams who want their own mail on Cloudflare, Docker or Vercel." The GitHub description is shorter: "Email for professionals and teams".

The interesting design choice is that Mailflare is not a classic mail server stack in a box. On Cloudflare it leans on Cloudflare Email Routing to receive mail and on Cloudflare Email Sending, Resend or Amazon SES to send it, with the app itself running as a Worker on D1 and R2. On a plain server it runs as one Node.js process that includes its own SMTP listener on port 25, a SQLite database, local file storage, in-memory job queues and a backup scheduler. On Vercel it uses a hosted database, Vercel Blob or S3, Vercel Queues and a separate relay Worker for inbound mail. The same TypeScript code base, built on Next.js through the vinext runtime, serves all three.

The repository is hieunc229/mailflare, written in TypeScript and licensed under AGPL-3.0. It was created on 26 May 2026, the date of the 0.1.0 entry in its changelog, and the current package.json version is 0.5.7. There is also a hosted service, Mailflare Cloud at mailflare.co, which the README offers to anyone who does not want to manage a deployment. This write-up is about the self-hosted code.

Who it is for: developers, freelancers and small teams who own a domain, want mailboxes on it without paying per seat for a hosted suite, and are comfortable owning DNS records, deliverability and backups. It is a particularly natural fit if the domain already sits on Cloudflare, because the Workers deployment can configure Email Routing and the sending subdomain automatically through a scoped API token.

How Mailflare works

The docs describe three deployment targets that share one application. What changes between them is where mail comes in, where state lives and how background work is scheduled.

PieceCloudflare WorkersDocker / NodeVercel
App runtimeWorker named mailflare (wrangler.jsonc)One Node 22 process, dist/server.mjsFunctions with 300 s limits
DatabaseD1 by defaultSQLite file in DATA_DIRA hosted database, such as Turso
FilesR2 bucket mailflare-raw/data/blobs or B2 / S3Vercel Blob (private), S3 or B2
ReceivingCloudflare Email RoutingBuilt-in SMTP listener, or the relay WorkerRelay Worker, Resend or SES
SendingCloudflare Email Sending, Resend or SESAny SMTP relay, Cloudflare REST API, Resend or SESResend, SES or Cloudflare
Queues and schedulesCloudflare Queues; crons 0 2 * * * and */5 * * * *In-process queues and schedulerVercel Queues (beta) plus a self-rescheduling five-minute job

The self-hosted entrypoint, server/index.ts, says it plainly in a comment: it serves "the Next app, the realtime WebSocket, the SMTP listener, the job queues and the backup schedule, the same jobs worker.ts spreads across Cloudflare products." On start it applies pending SQL migrations, wires three queue consumers (inbound mail, outbound mail and webhook retries, and AI draft jobs), starts Next, attaches a WebSocket server on /api/realtime, and then opens the SMTP listener unless SMTP_INBOUND_PORT is 0. CalDAV and CardDAV requests are served before Next because, as the code notes, PROPFIND and REPORT cannot be Next route handlers.

The server/runtime/env.ts file builds a Cloudflare-shaped environment object for Node: a SQLite database in place of D1, a file bucket in place of R2, an SMTP mailer in place of the Email binding, in-memory rate limiters (20 logins a minute, 10 device logins, 600 DAV requests, 120 agent requests) and so on. Application code calls the same getEnv() everywhere and does not know which platform it is on. Switching the database is a matter of DATABASE_URL: the databases guide lists D1, libSQL / Turso, SQLite files, Bun SQLite, PostgreSQL (node-postgres, postgres.js, Neon, PGlite) and MySQL (mysql2, PlanetScale), with separate migration folders for each dialect under drizzle/. If the D1-versus-hosted-SQL trade-off is new to you, the Cloudflare D1 vs PlanetScale and SQLite vs PostgreSQL comparisons cover the background.

Mail clients get a JMAP endpoint (RFC 8620 and 8621) at /.well-known/jmap, authenticated with app passwords. External AI tools get an MCP server at /mcp over Streamable HTTP with a bearer key, and scripts get a REST API under /api/v1 with scoped API keys, plus outgoing webhooks for events such as inbound mail.

Key features

  • Mailboxes on your own domains. Personal and shared inboxes, aliases, masked addresses that hide your name, mailboxes that answer on all your domains ("Use all domains"), signatures and out-of-office replies.
  • Routing rules. Store, forward, reject or file incoming mail by sender, recipient or subject, plus a single rule type for newsletters and promotions that matches on headers such as List-Unsubscribe and List-Id.
  • Spam scoring. A 0 to 100 score from sender checks, sender relationship, reputation, learned words, links and attachments, with Strict (55, the default), Normal (70) and Relaxed (85) thresholds and per-mailbox learning from your own reports.
  • Deliverability tools. A bounce and complaint suppression list, DMARC aggregate report parsing, MTA-STS and TLS-RPT support, and read receipts when APP_URL or a tracking host is set.
  • Calendar and booking. Repeating events with time zones and email invitations, plus public booking links that let anyone pick a free slot.
  • Drive. File storage and sharing on the same bucket as mail, with resumable uploads in 64 MB parts and per-account storage limits.
  • AI assistant and MCP. A chat assistant that can search mail, draft replies, propose up to 50 emails at once and manage events, using Cloudflare Workers AI or any OpenAI-compatible endpoint. Outside tools connect to /mcp with a scoped key; the docs stress that MCP keys cannot send directly, only create a send request that a person confirms.
  • Imports. Mail from IMAP, Gmail Takeout, .eml and .mbox; calendar events, contacts and Drive files from Google Takeout.
  • Admin and API. Users, API keys, webhooks, audit logs and backups (daily at 02:00 UTC plus on demand), with backups that the docs say can be restored across database types.
  • Account security. Passkeys, two-step sign-in, recovery codes, app passwords limited to chosen protocols and mailboxes, and fresh identity checks before creating keys that reach mail.
  • 34 interface languages, including right-to-left Arabic, Urdu and Persian. The repository has 33 locale files in public/locales plus the English catalogue, which matches the README count.

Community edition versus Pro and Team keys

This is the part most readers will want to know before installing, and the README does not mention it. The whole repository is AGPL-3.0, but the running app has a licence-key system. Without a key an installation runs as the community plan. With a Pro or Team key, validated against the Paymug licensing API at app.paymug.co, it unlocks extra entitlements. The gate is getLicenseEntitlements() in src/lib/licenses/service.ts:

EntitlementCommunity (no key)ProTeam
Manage other accounts (Admin → Accounts)NoYes, up to the key's seat limitYes, unlimited
Shared inboxes, and managing booking hostsNoNoYes
Account-level forwarding addressNoYesYes
Custom app name and iconNoYesYes

The docs do say it, just not on the front page: docs/usage/admin-users.md lists "A Pro or Team license for account management. Shared inboxes need Team" as a prerequisite, and docs/deployment.md has a short "Branding license" section noting that only a one-way hash of the key is stored. In the hands-on run below, a fresh install reported "plan":"community", and GET /api/accounts returned 403 with A Pro or Team license is required to manage accounts. Routing-rule forwarding and personal mailboxes and aliases for the primary admin were not gated in the code paths checked.

What this means in practice: a solo user with several addresses on one or more domains gets a complete product without a key. A team that wants separate logins per person, or a shared support@ inbox, needs a paid key from upstream. Because the entitlement checks sit in AGPL-licensed source, the licence terms apply to them like any other file. Anyone weighing the AGPL itself, including its network-use clause for modified versions, can start with the open-source licences compared glossary entry.

Getting started

The README gives three routes. The Cloudflare route is a deploy button: keep the app name mailflare, supply a runtime CF_TOKEN, open /setup, create the admin account, add a domain from the same Cloudflare account and send a test message. The name matters because wrangler.jsonc has the Worker call itself through a service binding to a service named mailflare. Wrangler, which the deploy scripts call, is covered in the Cloudflare Workers SDK write-up, and Cloudflare Workers vs Vercel Edge Functions compares the two serverless targets.

For Docker, the README's self-host block is:

git clone https://github.com/hieunc229/mailflare && cd mailflare
cp .env.docker.example .env.docker
docker compose up -d --build

To skip the local build and pull the multi-arch image that every push to main publishes to GHCR:

docker compose -f docker-compose.image.yml up -d

Before starting, edit .env.docker to choose how mail arrives and leaves. The Docker guide's example for a host that receives on port 25 and sends through an SMTP relay, behind an HTTPS reverse proxy:

APP_URL=https://mail.example.com
TRUST_PROXY=1
SMTP_INBOUND_PORT=25
MAIL_HOSTNAME=mail.example.com
SMTP_URL=smtps://user:[email protected]:465

Then open http://your-host:3000/setup, create the admin account and add a domain. If you want the same thing without Docker, the guide documents a plain Node path (Node.js 22 required):

npm ci
npm run build:node
MAILFLARE_RUNTIME=node NODE_ENV=production DATA_DIR=./data node dist/server.mjs

For development, the README's local loop runs against Wrangler's local D1:

cp .dev.vars.example .dev.vars
npm install
npm run db:migrate:local
npm run dev

Once the app is up, npm run db:seed loads sample data. Updating the prebuilt container is a pull and recreate, and the guide warns that migrations only move forward, so back up the volume first:

docker compose -f docker-compose.image.yml pull && docker compose -f docker-compose.image.yml up -d

The mailflare-data volume holds the database, files and backups. A generic tool such as docker-volume-backup can copy it off the host alongside the app's own daily backup. Sending through the API, once a key exists, looks like this in docs/api.md:

curl https://mail.example.com/api/v1/send \
  -H "Authorization: Bearer $MAILFLARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mailboxId": "<mailbox id>",
    "from": "[email protected]",
    "to": "[email protected]",
    "subject": "Report",
    "text": "Hello."
  }'

Hands-on: Mailflare 0.5.7 on a Linux VM

On 1 December 2026 a copy of the repository at commit 4bfd814 ("Update agent instructions", committed 30 November 2026, package.json version 0.5.7) was installed and run on an x86-64 Linux VM with Node.js v22.23.5 and npm 10.9.9. Everything ran locally against a scratch data directory. No Cloudflare, Vercel, Resend, SES or Paymug account was used, no real domain or DNS was touched, and no mail left the machine. The VM's network blocks most sites other than package registries and GitHub, which shaped what could be tested.

Installing dependencies and running the test suite

StepObserved
npm ci (first attempt)Failed after about 83 s. better-sqlite3 13.0.3 ran node-gyp rebuild, which tried to download Node headers from nodejs.org and got a 403 from the VM's proxy. The package does ship prebuilt .node files for linux-x64, linux-arm64, musl, macOS and Windows, but npm's default install step still compiled.
npm ci with npm_config_nodedir pointed at the local Node headersadded 955 packages, and audited 956 packages in 37s; node_modules came to 1.6 GB
npm audit summary36 advisories in the dependency tree on that day: 1 low, 21 moderate, 13 high, 1 critical (the critical one is a Windows-only cross-spawn issue pulled in transitively). Advisory counts move daily, so treat this as a snapshot.
npm run db:bundleGenerated the migration and docs bundles without errors
node --test tests/*.test.mjs (the command the CI workflow runs)333 test files, 2,160 tests: 2,137 passed, 21 failed, 2 skipped, in about 9 minutes

The 21 failures fall into a few groups. Some are environmental: a performance assertion in the vCard parser ("took 103.87 ms" against its budget), IMAP fetch tests that hit fetch failed in this sandboxed network, and UI tests that needed a ResizeObserver the test DOM did not provide. Others look like tests trailing recent refactors: one asserts on route-group layout files ("expected the admin, dashboard and settings layouts, checked 2"), one on app-shell safe-area classes, and the i18n test reported that the pt-BR catalogue's keys differ from English. The newest commits on main include "open settings in a modal on mail pages", which fits. The CI run results themselves were not checked.

Docker: config inspected, not run

The Docker CLI (29.9.3, with Compose v5.7.1) was present but there was no daemon (docker info could not reach /var/run/docker.sock), so no image was built or started. docker compose config does not need a daemon, and after copying the example env file it resolved to:

  • One service, mailflare, image mailflare:local built from the repo's Dockerfile, restart policy unless-stopped.
  • Ports 3000 and 25 both published on all host interfaces.
  • A named volume mailflare-data mounted at /data.
  • No environment variables at all, because every line of .env.docker.example is commented out. Out of the box the container starts with image defaults and no way to send mail.

The image variant resolves to ghcr.io/hieunc229/mailflare:latest with the same ports and volume. Reading the Dockerfile: it builds on node:22-bookworm-slim, sets NEXT_TELEMETRY_DISABLED=1, drops the Workers toolchain from production dependencies, runs as the unprivileged node user, and has a health check that fetches /api/setup/status every 30 seconds.

Production build: blocked by Google Fonts

npm run build:node, the step the Dockerfile and the no-Docker guide both use, failed after about 69 seconds with Failed to fetch Geist from Google Fonts (and the same for Geist Mono). src/app/layout.tsx imports both from next/font/google, so a production build needs to reach fonts.googleapis.com. That is invisible on a normal machine but will break air-gapped or tightly firewalled CI builds; the Next.js error message itself suggests self-hosting the fonts with next/font/local.

Running the self-hosted server in development mode

The self-hosted entrypoint was bundled with node scripts/build-server.mjs (esbuild produced a 4.4 MB dist/server.mjs in 743 ms) and started without NODE_ENV=production, which makes it run Next in development mode and skip the production build. It was started with HOST=127.0.0.1, PORT=3000, SMTP_INBOUND_PORT=2525, a scratch DATA_DIR and AWS credentials removed from the environment. Startup output:

  • Applied 111 migration(s): 0000_flowery_smasher.sql, ..., creating 89 tables in mailflare.sqlite. Three migration number prefixes are used twice (0021, 0047, 0050), and the log shows 0021_add_api_keys_prefix_index.sql and 0041 to 0050 applied after 0108, so the runner evidently orders by something other than the numeric prefix.
  • Mailflare listening on http://127.0.0.1:3000 (data in ...)
  • SMTP inbound listening on 0.0.0.0:2525. The SMTP listener ignored HOST and bound to all interfaces; the code reads a separate SMTP_INBOUND_HOST variable that the configuration reference does not list.

Requests before signing in:

RequestResult
GET /api/setup/status200, "hasAdminAccount":false, platform "runtime":"node","managesDns":false,"mailer":"none","relay":false
GET /api/auth/me401 {"error":"Unauthorized"}
GET /mcp401, plain-text Unauthorized
GET /api/v1/storage401
GET /.well-known/caldav and /dav/404 Not found, matching the docs: CalDAV and CardDAV stay off until an admin enables them
GET /api/inbound405 (the relay endpoint takes signed POSTs only)
GET /api/licenses403 {"error":"Forbidden"}

Seed data, sign-in and licence status

npm run db:seed posts to /api/seed and returned {"ok":true,"credentials":{"email":"[email protected]","password":"demo-password-change-me"},"seeded":{"messageCount":21}}. The route refuses with 403 when NODE_ENV is production, so the well-known demo password cannot be planted on a production install this way. With those throwaway credentials:

CheckObserved
POST /api/auth/login with a wrong password401 {"error":"Invalid email or password.","code":"invalid_credentials"}
Correct password200 {"ok":true,"token":"sess_...","redirect":"/inbox"}, and two HttpOnly cookies (ep_session, ep_accounts) expiring 31 December 2026, i.e. 30 days out. Over plain HTTP in dev mode the cookies were not marked Secure.
GET /api/auth/me"role":"admin","isPrimaryAdmin":true, "canForwardEmail":false, "canManageUsers":false, "spamStrictness":"strict", "mfaEnabled":false
GET /api/licenses"plan":"community","state":"inactive" with a random instanceId UUID
GET /api/accounts403 {"error":"A Pro or Team license is required to manage accounts"}
GET /api/mailboxes200, seeded personal mailboxes such as [email protected] and [email protected], each with "permission":"full_access"
GET /.well-known/jmap301 to http://localhost:3000/jmap/session (with APP_URL unset, the host became localhost even though the request went to 127.0.0.1); /jmap/session with bad Basic credentials returned 401
Response headers on /inboxA Content-Security-Policy with default-src 'self' (scripts also allow 'unsafe-inline', 'unsafe-eval' and challenges.cloudflare.com for Turnstile), Strict-Transport-Security: max-age=31536000; includeSubDomains, X-Frame-Options: SAMEORIGIN, a strict referrer policy and a Permissions-Policy that disables camera, microphone, geolocation, payment and USB. These were seen in dev mode; production headers were not checked.

The built-in SMTP listener

A short Python smtplib session against 127.0.0.1:2525, using only reserved test domains:

SMTP stepReply
EHLO250 with PIPELINING, 8BITMIME, SMTPUTF8, SIZE 37748736 (36 MiB, the documented SMTP_MAX_SIZE). No STARTTLS, as expected with no SMTP_TLS_KEY / SMTP_TLS_CERT. The greeting named the VM's hostname, vm, not mail.example.com.
RCPT TO an unmanaged domain550 Relay access denied, refused before the message body, as docs/security.md describes
RCPT TO:&lt;[email protected]&gt; (a seeded mailbox)250 Accepted
DATA250 OK: message queued; the server log printed {"messageId":"msg_...","spamScore":0,"verdict":"inbox","signals":[]} and the message appeared in the messages table

After the run the data directory held 5.5 MB: mailflare.sqlite with its WAL and SHM files, and blobs/inbound and blobs/seed folders. That is the whole state of a self-hosted install, which makes backups and moves simple to reason about.

What was not tested

The Docker image (no daemon), the production Next build (Google Fonts blocked), any Cloudflare or Vercel deployment, real DNS, MX and port 25 exposure, outbound sending (the mailer was none and no provider credentials were supplied), the AI assistant (no model key), passkeys and the browser UI (no GUI on the VM), JMAP with a real client (app passwords need a fresh identity check in the UI), the MCP tools behind a key, and licence activation (a paid Paymug key).

Configuration defaults worth knowing

The Docker guide's configuration reference is thorough. These are the defaults that most affect a first deployment, taken from that table and checked against server/index.ts and server/runtime/env.ts:

VariableDefaultWhy it matters
APP_URLRequest originRequired for password reset; JMAP and passkeys depend on it; the same-origin check uses it
TRUST_PROXYUnsetBehind a proxy, leaving it unset puts every user on one login rate limit; when exposed directly it must stay unset or clients can spoof their IP
HOST (code only)0.0.0.0The HTTP server listens on all interfaces unless told otherwise
SMTP_INBOUND_PORT250 disables the listener, for example when using the Cloudflare relay Worker
SMTP_TLS_KEY, SMTP_TLS_CERTUnsetWithout them there is no STARTTLS, so inbound encryption in transit depends on the sender
SMTP_URLUnsetNo outbound relay means no sending unless Cloudflare, Resend or SES is configured
AI_MODELgpt-4o-mini (Docker); Workers AI on CloudflareChat appears once a provider is set; auto-drafts stay off per mailbox until enabled
MCP_ENCRYPTION_KEYUnsetEncrypts saved tokens for outside MCP servers the assistant uses
INBOUND_REQUIRE_SIGNED_HEADERSUnsetSet to 1 to refuse old relay Workers whose requests can be replayed
SPAM_DOMAIN_AGE_CHECKOnDomain-age lookups to rdap.org run unless disabled in Admin or forced off with this variable

For storage, a complete set of B2_* or S3_* variables replaces local files or R2 everywhere, and B2 wins if both are set. The deployment guide warns that switching does not copy existing objects. The Cloudflare R2 vs Backblaze B2 and AWS S3 vs Cloudflare R2 comparisons help pick one.

Security model and outbound connections

The security notes are candid. The first line of the attachments section reads "Mailflare has no antivirus." It blocks one-click downloads of risky file types (executables, macro-enabled Office files, double extensions, HTML, SVG, disk images, archives) and inspects ZIP file names without unpacking, but it "cannot find malware in a normal-looking PDF or image", and the docs suggest putting ClamAV or a provider scan in front. Deleting an attachment does not rewrite the original message, so the raw download still contains it.

Other points from docs/security.md:

  • The self-hosted SMTP listener checks SPF, DKIM and DMARC itself and never trusts authentication headers written by the sender. If DNS takes over 10 seconds, there is no result and the mail is delivered.
  • App passwords are 16 random characters stored as SHA-256 hashes and limited to chosen protocols and mailboxes. JMAP Basic sign-in still works over plain HTTP for old LAN clients, so a TLS proxy is advised.
  • Changing a password or two-step settings deletes every key on the account, including API, MCP and app passwords. Version 0.5.7 made that stricter, per its changelog.
  • Webhooks must point at public https:// hosts, redirects are not followed, and creating or redirecting one needs a fresh identity check, since a webhook copies mail content out.
  • On Cloudflare, the docs note that "no limit applies" to app-password guessing without the rate-limit bindings; the Node runtime creates its own in-memory limiters, so Docker installs have them.

There is no product telemetry in the code that was searched: the Dockerfile disables Next.js telemetry, and a grep of src/lib and server/ for outbound hosts turned up only functional calls. Those are worth knowing:

  • rdap.org for sender domain age, on by default per the spam guide, which says message bodies never leave the installation but the sender IP and sender and link domains can.
  • Spamhaus DQS and abuse.ch URLhaus, only with your own keys.
  • gravatar.com, queried with a SHA-256 hash of a contact's address when contacts are added.
  • cloudflare-dns.com for DNS-over-HTTPS lookups.
  • app.paymug.co, only when activating, validating or deactivating a licence key.
  • api.github.com, for the admin update button, which dispatches a workflow in your own repository.
  • AI providers you configure (OpenAI, Anthropic, Groq, OpenRouter, Workers AI), and only with the content the assistant reads through its tools.

Use cases

  • Personal domain mail on Cloudflare's free tiers. Receive through Email Routing, send through Resend's free tier or SES, and run the app as a Worker. The README's cost table claims receiving and sending can both be free, with Cloudflare Email Sending needing the $5/month Paid Workers plan. If you are choosing a sending API anyway, see Resend vs SendGrid vs Postmark.
  • A single-container mail host on a VPS. Point MX at the server, open port 25 (the guide notes many clouds block it, while Hetzner and most VPS providers do not), add an SMTP relay for sending, and keep everything in one volume.
  • Several addresses for one person. Masked aliases, routing rules and the newsletter rule make it a reasonable inbox for a freelancer with a few domains, all within the community plan.
  • Agent access to a real mailbox. Give an AI tool a scoped MCP key for one mailbox with read and draft rights; sends still wait for a human. The MCP stdio vs Streamable HTTP comparison explains the transport Mailflare uses.
  • Booking links without a separate scheduling service. Public booking pages read free time from the same calendar that receives invitations.

How Mailflare compares

No other self-hosted mail suite is covered on this site yet, so the table sets Mailflare against the options a team in this position usually weighs. The Mailflare column comes from its repository and the hands-on run; the other columns stay at the level of each product's category and the linked pages.

MailflareNextcloudTempFastMailGoogle Workspace (with gws CLI)
What it isSelf-hosted domain mail with calendar, Drive, booking and an AI assistantSelf-hosted file sync and collaboration platformSelf-hosted temporary email inbox in DockerHosted, proprietary productivity suite; gws is a command-line client for it
Centre of gravityEmailFilesDisposable receive-only addressesWhole suite, run by Google
Where it runsCloudflare Workers, one Docker container or VercelYour own serverYour own serverGoogle's cloud
Mail deliveryOwn SMTP listener or Cloudflare / Resend / SES; outbound via relay or APISee the linked comparisonSee the linked pageHandled by Google
LicenceAGPL-3.0, with paid Pro/Team keys for multi-account featuresSee the linked comparisonSee the linked pageCommercial subscription
Pick it whenMail on your domain is the main need and you accept running deliverability yourselfFiles and sharing are the main needYou need throwaway inboxes for testing sign-up flowsYou want nobody on your team to run mail infrastructure

The practical split: Nextcloud is the incumbent self-hosted answer to "Google Drive and friends", whereas Mailflare starts from the inbox and adds files and calendar around it. TempFastMail solves a narrower testing problem. Staying on Google Workspace keeps deliverability and uptime someone else's job. On a hosting-platform level, if a VPS is the plan, the Caddy vs Traefik comparison covers the TLS proxy that the Docker guide expects in front of port 3000.

Where the README, docs and code disagree

  • Team features and licence keys. The README features table offers "personal or shared mailboxes on your domain" and "Users" under Admin, and the tagline is "for professionals and teams". It does not say that account management, shared inboxes, account forwarding and branding need a paid Pro or Team key. The usage docs and src/lib/licenses/ do, and the running app returned 403 for account management.
  • Port 25 in Compose. .env.docker.example says to "Uncomment the "25:25" port mapping in docker-compose.yml". Both Compose files already publish port 25, which docker compose config confirmed. Anyone using the relay Worker instead should remove the mapping rather than add it.
  • SMTP banner hostname. The configuration reference gives MAIL_HOSTNAME a default of mail.&lt;domain&gt;. With it unset, the listener greeted with the machine's hostname (vm) in this run. Set it explicitly.
  • Bind addresses. The HTTP server reads HOST (default 0.0.0.0) and the SMTP listener reads SMTP_INBOUND_HOST; neither appears in the configuration reference. Setting HOST=127.0.0.1 still left SMTP on all interfaces.
  • Cloudflare token permissions. The README, docs/deploy-cloudflare.md and the CF_TOKEN description in package.json give three different permission lists. The deploy guide carries an unresolved maintainer note asking whether the "DNS Settings: Edit" and "Email Routing Addresses: Edit" permissions listed in the README are actually required.
  • Mail app protocols. docs/usage/mail-apps.md carries an unresolved maintainer note saying the app password screen lists IMAP, SMTP and CalDAV/CardDAV, "but the technical docs say only JMAP is served". The security notes confirm that the DAV endpoints answer discovery only: "Calendars and address books are not served yet."
  • Cloudflare DNS as a prerequisite. The getting-started guide lists "A domain that uses Cloudflare DNS". That is true for the Workers path, but the Docker guide says that without a suitable CF_TOKEN the DNS page simply lists the records to add by hand.
  • Test suite at HEAD. CI runs node --test tests/*.test.mjs; in this VM 21 of 2,160 tests failed, including layout and i18n checks that do not depend on the environment.

Limits and trade-offs: when not to use it

  • You need IMAP or SMTP submission for desktop clients. Mail apps connect over JMAP only, and few mainstream clients speak JMAP. If people on your team live in Outlook, Apple Mail or Thunderbird over IMAP, this is the deciding limit.
  • You need several users but will not buy a key. The community plan is effectively single-account. Teams need Pro (seat-limited) or Team (unlimited, plus shared inboxes).
  • You cannot lose queued mail. On Docker, "jobs live in memory and are lost on restart". Unsent scheduled and undo-send mail is not sent, and incoming mail whose job is lost stays unparsed, with its raw file deleted after 24 hours. On Cloudflare, incoming mail that needs a missing migration is retried for about an hour and then lost, so migrations must follow deploys promptly.
  • You need malware scanning. There is no antivirus; add one in front.
  • You want hands-off deliverability. You own MX, SPF, DKIM, DMARC and IP reputation, or you rent them from Cloudflare, Resend or SES. New SES accounts start in a sandbox, per the README.
  • Vercel Hobby. The README says Hobby is non-commercial, and the Vercel guide warns that Blob's Hobby limits (1 GB, 10,000 simple and 2,000 advanced operations a month) can be used up by a few hundred messages, after which "you lose Blob for 30 days and mail stops."
  • You customise the code on Cloudflare. The in-app updater "replaces the whole tracked file tree of your installation branch", removing your own changes. On Docker the in-app update button is disabled.
  • Maturity. The project is about six months old, at version 0.5.7, with no GitHub releases (versions live in changelog/ and GHCR tags), 15 changelog versions so far, and two security-focused releases in November 2026 alone. Migrations only move forward, so rollbacks mean restoring a backup.
  • Restricted build networks. Production builds fetch Google Fonts, and better-sqlite3 may try to download Node headers during install.
  • Search on PostgreSQL or MySQL. The databases guide says SQLite and D1 get a full-text index, while PostgreSQL and MySQL fall back to unindexed substring scans; TiDB and PlanetScale also lose change logs and calendar sync because they lack triggers.

Project activity

Checked 1 December 2026: current version 0.5.7 in package.json (changelog entry dated 29 November 2026), no GitHub releases published, licence AGPL-3.0, last push 1 December 2026, and 8,206 stars with 1,477 forks on GitHub.

The repository was created on 26 May 2026 and is written mainly in TypeScript. Of the 50 most recent commits, 43 are by the author, Hieu Nguyen, and the rest by two outside contributors, and the newest add JMAP query caching, a settings modal and docs-aware assistant answers. Prebuilt images are published to ghcr.io/hieunc229/mailflare on every push to main, tagged latest, by version and by commit SHA. Documentation lives in the repo under docs/ (deployment, providers, security, API) and docs/usage/ (end-user guides); the hosted service is at mailflare.co. The frontend toolchain runs on Vite+ (vp dev, vp build), and the Postgres options include Supabase and Neon.

Enjoying this project?

Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.

Project
mailflare
Created
December 1
Last Updated
December 1, 2026 at 01:58 PM

Maintain Mailflare: Self-Hosted Email, Calendar and Drive? Add the badge to your README

Show that the project is featured on TechLogHub and send readers to this write-up.

Featured on TechLogHub
[![Featured on TechLogHub](https://techloghub.com/badge-neutral.svg)](https://techloghub.com/open-source/mailflare?utm_source=techloghub_badge&utm_medium=referral&utm_campaign=readme)

Find more projects like this

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.