Skip to content

Mailyte Email Server Handbook

The complete developer guide to the Mailyte Email Server — the infrastructure behind Mailyte's email hosting platform. Everything from first setup to scaling to millions of emails, explained in plain language.
  • Getting Started


    Install the server, configure your environment, and send your first email in under 15 minutes.

    Jump in

  • Architecture


    How all the pieces fit together — services, data flows, database design, and multi-tenant isolation.

    See the big picture

  • API Reference


    Every REST endpoint documented with parameters, response schemas, and copy-paste examples in 4 languages.

    Explore the API

  • Configuration


    Fine-tune Postfix, Dovecot, Rspamd, SSL certificates, DNS records, and performance knobs.

    Configure it

  • Security


    Authentication, encryption at every layer, intrusion detection, and a pre-launch hardening checklist.

    Lock it down

  • Development


    Set up your dev environment, build custom workers, write tests, and ship releases.

    Start building


What is Mailyte Email Server?

It's a complete, production-ready email system that runs inside Docker containers. It handles the entire lifecycle of an email — from the moment someone clicks "Send" to delivery, spam filtering, tracking, and storage.

Here's what you get out of the box:

Capability What it does Powered by
Send & receive email SMTP inbound/outbound with virtual domains Postfix
Email client access IMAP and POP3 for Thunderbird, Outlook, mobile apps Dovecot
Spam filtering Machine-learning detection, antivirus, greylisting Rspamd + ClamAV
REST API Manage everything programmatically — orgs, domains, mailboxes FastAPI (Python)
Email tracking Open pixels, click-through link rewrites, engagement analytics Tracking worker
AI-powered search Semantic email search using vector embeddings Qdrant + RAG worker
Real-time webhooks Notify your app when emails are sent, delivered, bounced, opened Webhook worker
Auto SSL certificates Free HTTPS/TLS via Let's Encrypt with auto-renewal Cert manager
Monitoring Prometheus metrics, Grafana dashboards, health checks Monitoring stack
Multi-tenant Full data isolation per organization with quota management Built into every layer
Cloud backup Automated backups to AWS S3 or Azure Blob Storage Cloud sync worker
Rate limiting Per-sender, per-domain, and per-org abuse prevention Rate limiter + Redis

The Architecture at a Glance

The server is organized in three layers, all running as Docker containers:

graph TB
    subgraph "<b>API Layer</b>"
        API["REST API<br/><small>:5000 &bull; FastAPI</small>"]
    end

    subgraph "<b>Mail Infrastructure</b>"
        POSTFIX["Postfix<br/><small>:25 :587 :465</small>"]
        DOVECOT["Dovecot<br/><small>:143 :993</small>"]
        RSPAMD["Rspamd<br/><small>:11332</small>"]
    end

    subgraph "<b>Background Workers</b>"
        TRACKING["Tracking"]
        WEBHOOKS["Webhooks"]
        RATELIMIT["Rate Limiter"]
        ANALYTICS["Analytics"]
        RAG["AI Search"]
        QUEUE["Queue Mgr"]
        STORAGE["Storage"]
        BACKUP["Backup"]
    end

    subgraph "<b>Data Stores</b>"
        MYSQL[("MySQL")]
        REDIS[("Redis")]
        QDRANT[("Qdrant")]
        FS["Filesystem"]
    end

    API --> POSTFIX & DOVECOT
    POSTFIX --> RSPAMD
    POSTFIX --> TRACKING & WEBHOOKS & RATELIMIT

    TRACKING --> MYSQL
    WEBHOOKS --> REDIS
    RATELIMIT --> REDIS
    ANALYTICS --> MYSQL
    RAG --> QDRANT
    QUEUE --> MYSQL
    STORAGE --> FS
    BACKUP --> FS

The 30-second version

Postfix sends and receives email. Dovecot lets email clients read it. Rspamd blocks spam. The API manages everything. Workers handle tracking, webhooks, analytics, and more. MySQL stores the data, Redis caches it, and Qdrant powers AI search.


System Requirements

Resource Minimum Recommended High Volume
CPU 2 cores 4 cores 8+ cores
RAM 4 GB 8 GB 16+ GB
Disk 50 GB SSD 200 GB SSD 1 TB+ NVMe
Network 100 Mbps 1 Gbps 10+ Gbps
Docker 24.0+ Latest Latest
Docker Compose v2.20+ Latest Latest

Where to Start

Head to the Installation Guide for a step-by-step walkthrough. You'll have a working server in about 15 minutes.

Start with the Architecture Overview to see the big picture, then dive into How Data Flows to follow an email through the system.

The API Reference has every endpoint documented. Check the Quickstart for ready-to-use snippets in curl, Python, JavaScript, and PHP.

The Development Guide covers your dev environment setup, and Building Custom Workers shows you how to extend the system.

Jump to Troubleshooting for the most common issues, or check Health Checks to diagnose service problems.


Built with :material-heart: by the Mailyte engineering team at TechiesAfrica