MCPSERV.CLUB
WildDuck Mail Server

WildDuck Mail Server

Self-Hosted

Scalable, Unicode‑first IMAP/POP3 mail server

Active(100)
2.0kstars
0views
Updated 2 days ago

Overview

Discover what makes WildDuck Mail Server powerful

WildDuck is a high‑performance, horizontally scalable IMAP/POP3 mail server written in **Node.js**. It stores every piece of mailbox data—users, folders, messages and metadata—in a **sharded‑replicated MongoDB** cluster. This design eliminates the single‑point‑of‑failure typical of traditional MTA/Dovecot stacks and allows a developer to add or remove nodes without downtime. The server exposes a **RESTful JSON API** that mirrors the full set of IMAP commands, making it trivial to integrate with webmail clients, mobile apps or custom tooling.

Runtime

Database Layer

API Layer

Email Delivery

Overview

WildDuck is a high‑performance, horizontally scalable IMAP/POP3 mail server written in Node.js. It stores every piece of mailbox data—users, folders, messages and metadata—in a sharded‑replicated MongoDB cluster. This design eliminates the single‑point‑of‑failure typical of traditional MTA/Dovecot stacks and allows a developer to add or remove nodes without downtime. The server exposes a RESTful JSON API that mirrors the full set of IMAP commands, making it trivial to integrate with webmail clients, mobile apps or custom tooling.

Architecture

  • Runtime: Node.js (v18+), leveraging asynchronous I/O for low latency.
  • Database Layer: MongoDB (sharded + replica sets). Each mailbox is a collection of documents; message bodies are stored as GridFS objects, while headers and flags reside in the main collection.
  • API Layer: Express‑like router that auto‑generates OpenAPI 3.0 docs (openapidocs.json). The API is stateless and supports pagination, filtering, and WebSocket push for real‑time updates.
  • Email Delivery: Designed to be paired with Haraka or ZoneMTA; WildDuck itself does not send mail, only receives via SMTP (via the partner MTA) and serves it to clients.
  • Extensibility: Hooks for custom authentication (JWT, LDAP), rate limiting, and message hooks (e.g., virus scanning) are exposed through middleware.

Core Capabilities

  • Full IMAP/POP3 compliance: Supports UID, EXISTS, FETCH, STORE, COPY, EXPUNGE, and all modern extensions (e.g., IMAP IDLE, QUOTA, UIDPLUS).
  • Unicode‑first: Handles UTF‑8 mailbox names and email addresses without workarounds.
  • API‑driven configuration: Users, mailboxes, quotas and ACLs can be created, updated or deleted via HTTP calls—no need for dovecot.conf‑style files.
  • Message Search: Full‑text search powered by MongoDB’s text indexes, enabling fast keyword queries across all messages.
  • Webhooks: Clients can subscribe to mailbox events (new message, flag change) via WebSocket or HTTP callbacks.

Deployment & Infrastructure

  • Container‑friendly: Official Docker images are available; the server can be run behind a reverse proxy (NGINX, Traefik) with TLS termination.
  • Horizontal scaling: Add MongoDB shards or node instances behind a load balancer; the API is stateless, so any instance can serve any request.
  • Self‑hosted prerequisites: Node.js runtime, a MongoDB cluster (or single node for testing), and an SMTP relay such as Haraka or ZoneMTA.
  • Monitoring: Exposes Prometheus metrics (/metrics) and supports OpenTelemetry tracing.

Integration & Extensibility

  • Plugin system: Custom middleware can be injected into the request pipeline to implement Sieve-like filtering, DKIM signing or custom authentication.
  • SDKs: Official JavaScript client libraries simplify consuming the REST API; community has bindings for Python, Go and others.
  • Webhooks & Callbacks: External services can react to mailbox changes in real time, enabling mail‑based workflows (e.g., ticketing systems).
  • Custom UI: The React‑based webmail demo can be forked; developers can replace it with any front end that talks to the API.

Developer Experience

  • Documentation: Comprehensive docs (docs.wildduck.email) cover API usage, authentication flows, and deployment scenarios. The OpenAPI spec is machine‑readable for auto‑generation of SDKs.
  • Community: Active Gitter channel, GitHub issues, and a permissive EU‑Public license encourage contributions.
  • Configuration: Environment variables control all runtime parameters—no complex config files, making CI/CD pipelines straightforward.

Use Cases

  • Enterprise mail hosting: 1 000+ accounts with large per‑user quotas, requiring horizontal scaling and zero downtime.
  • Custom mail clients: Mobile or web apps that need a lightweight backend; the REST API removes the need for IMAP libraries on the client side.
  • Mail‑based automation: Integrate with CI/CD pipelines or ticketing systems where email triggers actions via webhooks.
  • Hybrid deployments: Combine WildDuck with Haraka/ZoneMTA to replace Dovecot while keeping existing SMTP infrastructure.

Advantages Over Alternatives

FeatureWildDuckTraditional Dovecot/Postfix
Horizontal scalingNative sharded MongoDB backendRequires manual sharding or third‑party solutions
API‑firstFull REST/WS APIMostly file‑based config and IMAP only
Unicode supportFirst‑class, no workaroundsLimited in some deployments
ExtensibilityMiddleware hooks, webhooksCustom scripts only
LicenseEU‑Public License 1.2 (free for open source)GPL or proprietary
Developer toolingAuto‑generated SDKs, OpenAPI specManual client implementation

For developers prioritizing scalability, API‑driven workflows and a modern JavaScript ecosystem, WildDuck offers a compelling alternative to legacy MTA/Dovecot stacks.

Open SourceReady to get started?

Join the community and start self-hosting WildDuck Mail Server today

Weekly Views

Loading...
Support Us

Featured Project

$30/month

Get maximum visibility with featured placement and special badges

Repository Health

Loading health data...

Information

Category
apis-services
License
EUPL-1.2
Stars
2.0k
Technical Specs
Pricing
Open Source
Database
MongoDB
Docker
Community
Supported OS
LinuxWindowsmacOSDocker
Author
zone-eu
zone-eu
Last Updated
2 days ago