Skip to content

About

Open-source, privacy-focused email service for custom domains. Free email forwarding, encrypted mailboxes (IMAP/POP3), SMTP sending, calendars and contacts (CalDAV/CardDAV), webhooks, and an email API. Self-host it with Docker. A private alternative to Gmail, Mailchimp, and SendGrid.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.7k stars

Watchers

13 watching

Forks

Latest commit

 

History

5,227 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forward Email: private, encrypted email for your own domain. 100% open source.

build status code style styled with prettier license

Start free  ·  Watch the tour  ·  Pricing  ·  Apps  ·  FAQ  ·  API  ·  Self-host

Forward Email is a 100% open-source, privacy-focused email service for custom domains. Point your domain at us and you get you@yourdomain.com in a few minutes. Forward that mail to Gmail, Outlook, iCloud, or any inbox you already use, for free. When you want more, upgrade to encrypted mailboxes that work in Apple Mail, Outlook, Thunderbird, and our own apps.

This repository is the code that runs the service: the website, the API, and every mail server. You can read it, audit it, and run it on your own server.

Table of Contents

Start here

Find what you want to do in the left column and follow the link.

I want to… Go here
Get email at my own domain (no coding) Create a free account
Forward my domain's mail to Gmail, Outlook, or iCloud Step-by-step setup
Send mail as me@mydomain.com from Gmail Send Mail As with Gmail
Set up Apple Mail, Outlook, Thunderbird, or my phone Email client setup guides
Read my mail in an app Download the apps
Compare plans and prices Pricing
Send email from my app or website Email API and SMTP guide
Run Forward Email on my own server Self-hosting guide
Check if the service is up status.forwardemail.net
Ask a question or get help FAQ or Get help
Report a security issue Security
Work on this code Developer guide

Watch the 2-minute tour

Play the video: Forward Email in two minutes (1:58)

Click the picture to play the video on forwardemail.net. It has captions, so you can watch with the sound off.

What you get

Email at your own domain

  • Unlimited domains on every plan, and unlimited aliases on paid plans, with no per-user fees.
  • Forward mail to any inbox, or keep it in an encrypted mailbox with 10 GB of storage.
  • Catch-all addresses, regex filters, disposable addresses, and webhooks.
  • Send as your domain over SMTP, with SPF, DKIM, DMARC, MTA-STS, and DANE support.
  • Set up your DNS records in one click at supported providers with Domain Connect.

Private by design

  • We process forwarded mail in memory and never write it to disk.
  • Each mailbox is its own encrypted SQLite file that only your password can open.
  • Quantum-resistant encryption, plus OpenPGP and Web Key Directory (WKD) support.
  • No third-party analytics or telemetry. Read our privacy policy for the details.

Works on your devices

  • Use any email client over IMAP, POP3, and SMTP: Apple Mail, Gmail, Outlook, Thunderbird, and more.
  • Sync calendars and contacts over CalDAV and CardDAV.
  • Let email clients find your server settings on their own with autodiscovery.
  • Use our open-source apps in a browser, on desktop and mobile, or in your terminal.
  • Write mail filters with Sieve and manage them over ManageSieve.

Built for developers

  • Everything the dashboard does is a REST API call.
  • Receive mail as JSON webhooks.
  • Send over SMTP or the API. Your daily sending limit grows with your sender reputation.
  • Connect AI assistants with the MCP server, or manage domains with the Terraform provider.
  • Self-host the whole stack with Docker.

Plans

Plan Price Good for
Free $0 Forwarding mail from your domain to an inbox you already have
Enhanced Protection $3/mo Sending and receiving as you@yourdomain.com, with unlimited aliases, 10 GB of storage, the apps, and the API
Team $9/mo Families and organizations: unlimited team members, permissions, and priority support
Enterprise $250/mo Education, government, and healthcare, with dedicated support and onboarding

Every plan includes unlimited domains. See pricing for the full comparison.

Who uses Forward Email

More than 1.6 million domains use Forward Email, including:

  • Open source: The Linux Foundation, Ubuntu, Canonical, jQuery, and LineageOS
  • Education: University of Cambridge, Carnegie Mellon, University of Maryland, Tufts, and Swarthmore
  • Government: US Naval Academy, Government of South Australia, and Government of the Dominican Republic
  • Business: Netflix Games, Disney Ad Sales, Fox News Radio, and RCD Hotels

Read the case studies for The Linux Foundation, Canonical and Ubuntu, and university alumni email.

Why open source

Your email holds your most private conversations. You shouldn't have to take a company's word for what happens to it. Every line of code that runs Forward Email lives in this repository, so you, or anyone you trust, can check our privacy claims against the code.

What's in this repository

Forward Email runs as a set of small Node.js services. Each one has an entry point in the root of this repository:

Service What it does Start it locally Local port
Web Website and dashboard npm start web 3000
API REST API used by the dashboard, the apps, and developers npm start api 4000
MX Receives inbound mail, filters spam, and forwards it npm start mx 2525
SMTP Sends outbound mail for users npm start smtp 2432
IMAP Mailbox access for email clients npm start imap 2113
POP3 Mailbox download for email clients npm start pop3 2115
SQLite Stores each mailbox in its own encrypted SQLite file npm start sqlite 3456
CalDAV Calendar sync npm start caldav 5000
CardDAV Contact sync npm start carddav 6000
ManageSieve Mail filter management for email clients node managesieve.js 4190
Bree Background jobs (billing, reports, cleanup, and checks) npm start bree None

The rest of the code lives in these folders:

Folder Contents
app Models, controllers, and Pug views for the website and the API
helpers Shared code used by every service
jobs Background jobs run by Bree
config Configuration and environment defaults
routes Website and API routes
emails Templates for the emails we send you
locales Translations
test Test suite
ansible Server provisioning playbooks
self-hosting Docker setup for running your own instance

Related projects

Repository What it is
mail.forwardemail.net Webmail, desktop, mobile, and terminal apps
mcp-server MCP server that connects AI assistants to your account
terraform-provider-forwardemail Manage domains and aliases with Terraform
forwardemail-api-go Go client for the API
status.forwardemail.net Status page
spamscanner Our open-source spam and phishing filter
bree Job scheduler for Node.js
tangerine DNS over HTTPS resolver for Node.js
caldav-adapter CalDAV server for Node.js and Koa
email-templates Create, preview, and send email templates from Node.js
supertest and superagent HTTP testing and client libraries we maintain

See all of our repositories.

Developer guide

Requirements

macOS

  1. Install n and Node v18.20.4:

    curl -L https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -y 18.20.4
  2. Make sure you are running Node v18.20.4:

    node --version
    v18.20.4
  3. Install brew and the following dependencies using the brew command:

    brew tap mongodb/brew
    brew install mongodb-community redis libtool automake autoconf nasm
    brew services start mongodb-community
    brew services start redis
  4. Install pnpm:

    corepack enable
    corepack prepare pnpm@9.15.9 --activate
  5. Fork the repository on GitHub.

  6. Clone your fork (replace YOUR_USERNAME with your GitHub username):

    git clone git@github.com:YOUR_USERNAME/forwardemail.net.git
    cd forwardemail.net
  7. Install npm dependencies:

    pnpm install
  8. Install wkhtmltopdf (optional: only used for generating PDF receipts).

Ubuntu

  1. Install n and Node v18.20.4:

    curl -L https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -y 18.20.4
  2. Make sure you are running Node v18.20.4:

    node --version
    v18.20.4
  3. Install pnpm:

    corepack enable
    corepack prepare pnpm@9.15.9 --activate
  4. Fork the repository on GitHub.

  5. Clone your fork (replace YOUR_USERNAME with your GitHub username):

    git clone git@github.com:YOUR_USERNAME/forwardemail.net.git
    cd forwardemail.net
  6. Install npm dependencies:

    pnpm install
  7. Install fonts:

    echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
    sudo apt-get install xfonts-75dpi fontconfig libxrender1 xfonts-base ttf-mscorefonts-installer libfontconfig fonts-powerline
  8. Install wkhtmltopdf (optional: only used for generating PDF receipts):

    wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.$(lsb_release -c -s)_$(dpkg --print-architecture).deb"
    sudo dpkg -i "wkhtmltox_0.12.6.1-2.$(lsb_release -c -s)_$(dpkg --print-architecture).deb"
  9. Install MongoDB by following the guide at https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition.

  10. Install Redis by following the guide at https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04.

Run it locally

Once you have the requirements installed, start the website:

npm start webAndWatch

It builds the assets, starts the web server, and opens http://localhost:3000 in your browser. The terminal shows logs from consola.

Start any other service with the commands in What's in this repository. All of them use nps. To start the web, API, Bree, SMTP, IMAP, POP3, and SQLite servers at once:

npm start all

Local servers don't require TLS. You can connect to the local SMTP, IMAP, POP3, CalDAV, and CardDAV servers with Thunderbird, telnet, or openssl.

If http://localhost:3000 loads without styles or images, run the build first:

npm run build

To stop every Node process at once, run killall node.

Run the tests

pnpm test

This lints the code, builds the assets, and runs the test suite. The tests start an in-memory MongoDB and a mock Redis, so you don't need either service running.

For verbose error logs, set these environment variables:

AXE_SILENT=false AXE_SHOW_STACK=true AXE_SHOW_META=true pnpm test

Push notifications

PUSH_NOTIFICATIONS.md documents backend setup for APNs, FCM HTTP v1, and UnifiedPush. It explains how to get every environment value, deploy file-based credentials, copy the required public values to mail.forwardemail.net, and validate the setup.

APNs reuses the existing APPLE_TEAM_ID, APPLE_KEY_ID, and APPLE_KEY_PATH values used for Sign in with Apple. Do not create separate APNs-specific credential variables.

Production deployment

DEPLOYMENT.md covers running Forward Email in production: server naming, provisioning with Ansible, deploying with pm2, certificates and DANE, bare metal setup, storage mirroring, and Domain Connect.

For server tuning, monitoring, and database operations, see ansible/README.md.

To run a single-server instance with Docker instead, see the self-hosting guide.

Get help

Security

Please don't report security issues in public issues, discussions, or pull requests. Email security@forwardemail.net instead. See SECURITY.md, our security page, and our signed security.txt.

Contributing

We welcome bug reports and pull requests. Before you open a pull request:

  1. Follow the developer guide to set up the project.
  2. Write commit messages in the Conventional Commits format.
  3. Run pnpm test and make sure it passes.

License

(BUSL-1.1 AND MPL-2.0) © Forward Email LLC

Forward Email

About

Open-source, privacy-focused email service for custom domains. Free email forwarding, encrypted mailboxes (IMAP/POP3), SMTP sending, calendars and contacts (CalDAV/CardDAV), webhooks, and an email API. Self-host it with Docker. A private alternative to Gmail, Mailchimp, and SendGrid.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.7k stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages