NodeMailServer

NodeMailServer

A self-hosted mail stack that receives mail on port 25, sends it from port 587 or a JSON API, handles bounces and serves mailboxes over IMAP.

NodeMailServer started as a fun experiment and has grown into a small mail platform you run yourself. It receives mail for your domains, checks who sent it, accepts mail from your own apps and mail clients, delivers it to the rest of the internet, and processes the bounces that come back.

Under development

Receiving mail, sending mail and IMAP mailboxes are implemented. Some plugins are not connected to the mail pipeline yet. Each page says what is ready and what is not.

What is in the box

PartFolderPortWhat it does
Mail server (Node + TypeScript)server/25 and 587Receives mail on 25 and checks it with rules you set in JSON. Accepts authenticated mail on 587 or through the JSON API, signs it with DKIM and queues it for delivery.
Bounce server and JSON APIserver/2525, 8025 and 8080Reads bounce reports, keeps a suppression list, and sends mail from one HTTP request. Both are off until you set a token.
Go MTAserver/go-mta/2580Optional delivery service written in Go.
Sending MTA (KumoMTA)outbound/587Optional delivery engine with SMTP AUTH, per-domain rate limits, DKIM and delivery webhooks. The Node server can use it through SMTP or its HTTP API.
IMAP server (Go + Gluon)server/imap/143 and 993Lets mail clients such as Thunderbird, Outlook and phone apps read mailboxes. Mail received on port 25 is stored in it. See IMAP.
Documentationdocs/3000This site.

How mail flows

Receiving
  Internet ──25──▶ IncomingServer ──▶ DNS checks ──▶ DKIM / SPF / DMARC
                                      ──▶ ARC seal ──▶ PGP encryption ──▶ store

Sending
  Mail client or app ──587 + AUTH──▶ OutgoingServer ──┐
  Your app ──HTTP + token──▶ JSON send API ──────────┴──▶ headers ──▶ DKIM sign ──▶ outbound queue
                                      ──▶ recipient's MX server (Node or Go MTA)
                                      ──▶ or KumoMTA, by SMTP or HTTP

Bounces
  Remote server ──▶ bounce+<id>@your bounce domain ──▶ DSN processor
                                      ──▶ suppression list, sender notice, webhook

Where to start

On this page