Self-hosted webmail · Cloudflare-native

Your mailboxes.
Your domain.
One calm inbox.

WhelkMail turns the IMAP and SMTP accounts you already own into a fast, familiar inbox. No mail server to run, no third-party inbox in the middle, no lock-in.

  • MIT licensed
  • No telemetry
  • IMAP + SMTP
  • Optional TOTP 2FA
WhelkMail inbox showing multiple accounts, shared labels and a message list

Everything you need

One client. Every mailbox.

Gmail-style organization on top of the accounts you already use, with the flexibility of a self-hosted tool.

Every account, one view

Gmail, Outlook, iCloud, Fastmail, Yahoo and custom domains side by side, with colored account labels and a shared address book.

Labels and filters

Create labels shared across accounts, apply them manually or automatically, and forward matching mail with the original EML attached.

Fast, automatic sync

Folder lists open from a local D1 mirror while a resumable background sync keeps metadata and read state current. The optional cron worker extends this to background notifications.

Fast opens, optional archive

Recent bodies are cached briefly so opening a message does not wait for IMAP. Keep bodies on your provider or archive them to Cloudflare R2 or Google Drive.

HTML on your terms

HTML email is rendered in a sandboxed frame with scripts disabled. Remote images and tracking pixels stay blocked until you enable them for a message.

Inbox actions

Select one or many messages to delete, move between Inbox, Spam and Trash, or mark as spam. A dedicated Spam folder is included.

Send-only domains

Relay accounts for domains without SMTP, with SMTP2GO, Resend, Mailgun, Brevo, SendGrid, Mailjet and Postmark support.

Contacts and signatures

A shared address book with CSV import/export and autocomplete, plus one shared signature or a different signature per account.

A look inside

Real screens, real workflow.

A familiar Gmail-style interface on top of the accounts you already own. Every screenshot below is a functional part of WhelkMail.

Privacy by default

Your mail stays yours.

WhelkMail reads from your provider. HTML is rendered in a sandboxed frame with scripts and forms disabled; remote images and tracking pixels stay blocked until you enable them for a message. A short-lived D1 cache keeps recent bodies for fast opens, and long-term archiving remains opt-in.

  • Sandboxed HTML with scripts blocked and remote images opt-in
  • Short-lived body cache with automatic cleanup
  • Credentials encrypted at rest with AES-256-GCM
  • Optional TOTP two-factor authentication
  • Server-side sessions, revocable on logout
  • Login and 2FA rate limiting per IP
  • One-time OAuth state and PKCE for Google and Microsoft
  • CSP, HSTS and strict security headers
Not a mail server

You keep using the providers you already trust. WhelkMail is the client.

No telemetry

No analytics, no third-party inbox, no data broker in the loop.

Open source

MIT licensed. Inspect it, fork it, self-host it on your own Cloudflare account.

Runs on Cloudflare

Deploy in minutes, not weekends.

Pages Functions, D1 and cloudflare:sockets. No VPS, no containers, no mail server to patch.

01

Connect your mailboxes

Add Gmail, Outlook, iCloud, Yahoo or any IMAP/SMTP account. Credentials stay encrypted in your own D1 database.

02

Deploy to your account

Use the template, create a D1 database, set your secrets and connect the Pages project. The guide walks you through it.

03

Optional: background worker

Folder opens already sync automatically. Deploy the cron worker for periodic sync, new-mail notifications, forwarding and provider cleanup.

Quick startbash
git clone https://github.com/WhelkMail/WhelkMail.git
cd WhelkMail
npm install
cp wrangler.toml.example wrangler.toml
npm run db:local

See the Cloudflare deployment guide for bindings, secrets and OAuth setup.

Take your inbox back

Ready to run your own mail client?