Architecture at a glance
Zinq Mail combines a Next.js webmail & admin application with a built-in Node.js mail daemon handling inbound SMTP, authenticated SMTP submission, and IMAP4rev1/2 with IDLE push.
Self-hosting is free under AGPL-3.0, and you run the server. Zinq Cloud at zinqmail.com is the hosted version, and we run it.
| Component | Protocol / Port | Purpose |
|---|---|---|
| Webmail & Admin UI | HTTPS (443) / HTTP (3000) | Inbox, composer, /settings, /admin, /docs |
| Inbound SMTP | TCP 25 / 2525 | Receives external mail, checks SPF/DKIM/DMARC |
| SMTP Submission | TCP 587 (STARTTLS) / 465 (TLS) | Authenticated sending from desktop/mobile apps |
| IMAP4rev1/2 | TCP 993 (TLS) / 143 (STARTTLS) | Mailbox sync, folder moves, and IDLE push |
Run locally in 3 steps
- 1Clone and install dependencies
Requires Node.js 22+ (uses built-in node:sqlite).
git clone https://github.com/mrrifat/Zinq-Mail.git && cd Zinq-Mail && npm install - 2Start the webmail app and mail daemon
Run both processes in separate terminals or via a process manager.
npm run dev # Webmail on http://localhost:3000 npm run smtp # SMTP + Submission + IMAP daemon - 3Register the owner account and add your domain
The first registered user becomes the workspace owner. Open Admin Console (/admin) or Domains & DNS to generate your 2048-bit RSA DKIM keypair.
First-send checklist
- Verify your domain's MX, A, strict SPF (-all), DKIM, DMARC, MTA-STS, and TLS-RPT records.
- Configure MAILGUN_API_KEY or SMTP_RELAY_HOST if your host blocks outbound port 25.
- Enable TOTP 2FA under Settings -> Security for all owner and admin accounts.