WildDuck Email Server Documentation

website·Indexed 34 days ago

https://docs.wildduck.email

Documentation for WildDuck, an IMAP email server. Includes comprehensive API references for managing users, mailboxes, messages, and domains, as well as guides for installation and server configuration.

Tokens
27.4K
Snippets
184
Records
277
Agent score
65%

What's inside WildDuck

  1. Overview of WildDuck Email Server Auditing

    WildDuck provides built-in auditing capabilities that allow email administrators to enable auditing for specific accounts. Key characteristics include:

    • Data Isolation: Audited messages are copied rather than linked; deleting an email from the original account does not remove it from the audit record.
    • Time-Limited Access: Audits are restricted to a specific time frame. Once the audit expires, all copied messages are automatically deleted and auditor access is revoked.
    • Secure Credential Handling: Admins create access credentials encrypted with PGP keys. Admins cannot access email content directly through this interface.
    • Auditor Capabilities: Once credentials are decrypted into a CSV file, the auditor can access message listings, metadata, search emails by address/date/subject, and download individual emails or ZIP bundles.
  2. Overview of WildDuck mail server architecture

    WildDuck is a modern IMAP/POP3 server built on Node.js and MongoDB. It is specifically designed for horizontal scaling and is best suited for environments with 1000+ accounts. To create a complete mail server, WildDuck should be bundled with Haraka for inbound SMTP and ZoneMTA for outbound SMTP.
  3. Overview of WildDuck Webhooks

    WildDuck provides a real-time event notification system that sends HTTP POST requests to registered URLs when specific events occur (e.g., new messages, authentication attempts, or account changes). The system is powered by BullMQ (Redis-based job queue) and implements exponential backoff for failed deliveries. To ensure events are processed and not queued indefinitely in Redis, at least one WildDuck instance must have webhooks.enabled = true in its configuration.
  4. Use DuckyPanel as a domain admin control panel for WildDuck

    DuckyPanel, used in combination with DuckyAPI, provides a domain administration control panel for WildDuck. It supports multi-tenancy where different users can own specific domains and maintain full control over the accounts and forwarders within those domains.
    # DuckyPanel Repository: https://github.com/louis-lau/DuckyPanel
    # DuckyAPI Repository: https://github.com/louis-lau/DuckyAPI
  5. Retrieve stored audit information via WildDuck API

    Use the GET /audit/:audit endpoint to retrieve detailed information about a specific stored audit record. The :audit path parameter specifies the identifier of the audit record to be retrieved. A successful request returns a 200 Success response.
    curl -X GET "https://<your-wildduck-domain>/audit/<audit_id>"
  6. IMAP Extensions supported by WildDuck

    WildDuck supports the following IMAP extensions:

    • IDLE (RFC2177): Notifies about new/deleted messages and flag updates.
    • CONDSTORE (RFC4551) & ENABLE (RFC5161): Supports most of the spec (metadata is ignored).
    • STARTTLS (RFC2595): Secure connection initiation.
    • NAMESPACE (RFC2342): Minimal support; lists a single user namespace with hierarchy separator.
    • UNSELECT (RFC3691): Deselects the current mailbox.
    • UIDPLUS (RFC4315): Enhanced UID operations.
    • SPECIAL-USE (RFC6154): Identifies special-use mailboxes.
    • ID (RFC2971): Server identification.
    • MOVE (RFC6851): Moving messages between mailboxes.
    • AUTHENTICATE PLAIN (RFC4616) & SASL-IR (RFC4959): Authentication mechanisms.
    • APPENDLIMIT (RFC7889): Advertises maximum global allowed message size in CAPABILITY.
    • UTF8=ACCEPT (RFC6855): Native support for unicode email usernames.
    • QUOTA (RFC2087): Global account quota based on the sum of RFC822 sources (not actual disk bytes).
    • COMPRESS=DEFLATE (RFC4978): Traffic compression between client and server.
  7. Understand WildDuck no-SPOF architecture

    WildDuck is designed as a no-SPOF (Single Point of Failure) architecture. Every component of the mail server can be replicated to ensure high availability and eliminate potential failure points. It is typically used as part of the Zone Mail Suite alongside Haraka (inbound SMTP) and ZoneMTA (outbound SMTP).
  8. Deploy WildDuck in a stateless high-availability configuration

    WildDuck instances are completely stateless, storing all session state in MongoDB and Redis. This architecture allows multiple instances to run simultaneously behind a TCP load balancer (e.g., HAProxy) without requiring sticky sessions.

    Session state management:

    • Mailbox UID lists are loaded from MongoDB upon opening.
    • Changes (new/deleted messages, flag updates) are tracked in a journal collection.
    • Redis pub/sub is used to propagate change notifications between instances to keep mailbox views current.
  9. Retrieve information for a specific user address

    Use the GET /users/:user/addresses/:address endpoint to request detailed information about a specific email address associated with a given user. A successful request returns a 200 Success response.
    GET /users/:user/addresses/:address
  10. Understand WildDuck Webmail architecture

    WildDuck Webmail is a Node.js reference implementation that demonstrates how to build a webmail interface using the WildDuck HTTP API. Unlike traditional webmail clients that rely on IMAP, it reads pre-parsed data directly from the API to achieve faster page loads.