Configuration¶
Everything you need to set up and customize Mailyte's email server components. Whether you're doing a first-time setup or fine-tuning a production deployment, this section has you covered.
How Configuration Works¶
Mailyte runs as a set of Docker containers, each handling a specific part of the email pipeline. Most settings come from environment variables defined in your .env file or passed into Docker Compose. These variables get injected into service-specific config files at container startup.
For deeper customization, you can mount your own config files directly into the containers. The pages below explain both approaches.
flowchart LR
ENV[".env file"] --> DC["Docker Compose"]
DC --> PF["Postfix Config"]
DC --> DV["Dovecot Config"]
DC --> RS["Rspamd Config"]
DC --> DB["MySQL Init"]
DC --> SSL["Cert Manager"]
DC --> PR["Prometheus"]
CUSTOM["Custom Config Files\n(volume mounts)"] -.->|"override"| PF
CUSTOM -.->|"override"| DV
CUSTOM -.->|"override"| RS Components at a Glance¶
| Component | Role | Default Port(s) |
|---|---|---|
| Postfix | SMTP — sends and receives email | 25, 465, 587 |
| Dovecot | IMAP/POP3 — lets users read their mail | 143, 993, 110, 995 |
| Rspamd | Anti-spam, DKIM signing, virus scanning | 11332, 11334 |
| ClamAV | Virus detection (integrated with Rspamd) | 3310 |
| MySQL | Stores domains, mailboxes, aliases, and metadata | 3306 |
| Redis | Caching, rate limiting, Rspamd backend | 6379 |
| FastAPI | Management API | 5000 |
| Prometheus | Metrics collection and alerting | 9090 |
| cert-manager | SSL certificate auto-renewal via Let's Encrypt | — |
In This Section¶
-
Environment Variables
The complete reference for every env var, grouped by category. Start here if you're setting up for the first time.
-
Postfix Configuration
SMTP settings, virtual domains, TLS, SASL authentication, relay hosts, and rate limiting.
-
Dovecot Configuration
IMAP/POP3 authentication, quotas, virtual users, namespaces, and Sieve filtering.
-
Rspamd Configuration
Spam filtering thresholds, DKIM signing, ClamAV integration, greylisting, and Bayesian training.
-
SSL Certificates
Let's Encrypt auto-renewal, manual certificate installation, and SNI for multiple domains.
-
DNS Setup
MX, SPF, DKIM, DMARC, MTA-STS, and SRV records — explained with copy-paste examples.
-
Performance Tuning
Queue tuning, connection limits, memory settings, and worker counts for high-throughput setups.
-
Multi-Tenant Configuration
Per-organization settings, quota defaults, rate limits, and webhook routing.
-
Monitoring Configuration
Prometheus scrape targets, metric endpoints, and alert rule definitions.
-
Prometheus Setup
Full
prometheus.ymlconfig, scrape intervals, retention policies, and storage sizing.
Quick Start¶
If you just want to get running, here's the minimum you need:
Set your environment variables — at minimum, your domain name and database passwords.
See Environment Variables for the full list.
Configure your DNS records before starting the server. You need at least an MX record and an A record.
See DNS Setup for all required records.
Start with the defaults
Mailyte ships with sensible settings for most deployments. Only dive into per-service tuning once you have traffic flowing and can see what needs adjusting.
File paths
All file paths in this documentation are relative to the container filesystem unless stated otherwise. When mounting custom configs, map your host paths accordingly in docker-compose.yml.
Related Sections¶
- Deployment — Production setup, Docker Compose, and Kubernetes guides
- Monitoring — Dashboards, alerts, and health checks
- Reference — CLI commands, database schema, and env var lookup