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
| Feature | WildDuck | Traditional Dovecot/Postfix |
|---|---|---|
| Horizontal scaling | Native sharded MongoDB backend | Requires manual sharding or third‑party solutions |
| API‑first | Full REST/WS API | Mostly file‑based config and IMAP only |
| Unicode support | First‑class, no workarounds | Limited in some deployments |
| Extensibility | Middleware hooks, webhooks | Custom scripts only |
| License | EU‑Public License 1.2 (free for open source) | GPL or proprietary |
| Developer tooling | Auto‑generated SDKs, OpenAPI spec | Manual 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
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
QST
Secure, open‑source assessment platform for scalable quizzes and exams
Mafl
Customizable, privacy‑first homepage organizer
Limbas
Low‑code database framework for rapid business apps
MeshCentral
Open source remote device management platform
W-CMS
Spontaneous lightweight CMS for artists and experimental sites
RobustIRC
Stable IRC without netsplits