# MissionControl-Mail **Repository Path**: yujintong/MissionControl-Mail ## Basic Information - **Project Name**: MissionControl-Mail - **Description**: The first open-source control panel that unifies Postfix, Dovecot and Rspamd into a modern REST API + web interface โ€” deploy in 10 minutes, - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-10-09 - **Last Updated**: 2026-10-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ๐Ÿš€ MissionControl > **The first open-source control panel that unifies Postfix, Dovecot and Rspamd into a modern REST API + web interface โ€” deploy in 10 minutes, zero bloat.** ---
![Status](https://img.shields.io/badge/status-production%20ready-brightgreen) ![OS](https://img.shields.io/badge/os-Debian%2012+%20%7C%20Ubuntu%2022+-blue) ![License](https://img.shields.io/badge/license-Apache%202.0-blue) ![Stack](https://img.shields.io/badge/stack-FastAPI%20%7C%20React%20%7C%20Postfix%20%7C%20Dovecot-purple)
### ๐Ÿ”ฅ Single stack. Single command deploy. Zero lock-in.
--- ## โœจ The Problem Running a mail server has always been **expensive, complex, and fragile**: | Solution | Problem | |---------|----------| | **cPanel / Plesk** | Expensive ($20+/mo), proprietary, bloated | | **ISPConfig** | Legacy PHP, dated UX, technical debt | | **Mailcow / Mailu** | Docker-dependent, extra complexity, container overhead | | **PostfixAdmin** | Admin web only โ€” no API, no monitoring, no anti-spam | | **DIY scripts** | Fragile shell scripts, no API, no UI, painful maintenance | **MissionControl was born from a simple insight:** 1. The Unix mail stack (Postfix + Dovecot + Rspamd) is **battle-tested, decades-proven, and incredibly efficient** โ€” tens of thousands of emails/min with < 256MB RAM. 2. What's missing is **a modern management layer**: REST API, SPA dashboard, auto health repair, and reproducible deployment. --- ## ๐ŸŽฏ What Makes MissionControl Different ### ๐Ÿ”ฌ Technical Innovation | Feature | MissionControl | Mailcow | ISPConfig | cPanel | |---|---|---|---|---| | **Native REST API** (FastAPI) | โœ… First-class | โŒ PHP wrapper | โŒ Legacy PHP | โŒ Proprietary | | **Auto self-healing** | โœ… Detects & restarts failed services | โŒ | โŒ | โŒ | | **Rspamd anti-spam** (state-of-the-art) | โœ… Native + adjustable scores | โœ… | โŒ SpamAssassin | โŒ SpamAssassin | | **DKIM / DMARC / SPF wizard** | โœ… Per-domain auto setup | โœ… Partial | โŒ Manual | โœ… | | **Real-time system metrics** | โœ… CPU, RAM, Disk, Network via API | โŒ | โŒ | โœ… | | **Cloudflare DNS integration** | โœ… Auto wizard | โŒ | โŒ | โœ… (paid) | | **Full audit logging** | โœ… Every action logged | โŒ | โŒ | โœ… | | **Single-command deploy** | โœ… `sudo bash deploy.sh` | โŒ Docker Compose | โŒ Manual | โŒ Installer | | **Disk footprint** | ~150MB + data | ~2GB (Docker images) | ~500MB | ~2GB+ | | **No Docker required** | โœ… Bare-metal performance | โŒ Mandatory | N/A | N/A | | **Zero lock-in** | โœ… Plain configs, easy migration | โŒ Docker-dependent | โœ… | โŒ | ### ๐Ÿ“Š Performance A MissionControl server with **2GB RAM and 2 vCPUs** handles: - **50+ domains** - **500+ mailboxes** - **10,000+ emails/hour** with full Rspamd filtering - API latency < 50ms (p95) - Downtime < 30s on service failures (auto-repair) --- ## ๐Ÿ—๏ธ Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Internet โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ :25/SMTP :80/443 โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Postfix โ”‚ โ”‚ Apache โ”‚ โ”‚ MTA โ”‚ โ”‚ Proxy + SPA โ”‚ โ”‚ + milter โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”‚ โ”‚ :11332โ”‚ โ”‚ :8000โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Rspamd โ”‚ โ”‚ FastAPI (Python) โ”‚ โ”‚ Anti-spam โ”‚ โ”‚ REST API :8000 โ”‚ โ”‚ DKIM signing โ”‚ โ”‚ + Auto-repair โ”‚ โ”‚ Rate limit โ”‚ โ”‚ + Metrics โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”‚ MariaDB โ”‚ โ”‚ + Redis โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Dovecot IMAP/POP3 โ”‚ โ”‚ LMTP delivery โ†’ Maildir โ”‚ โ”‚ SASL auth for Postfix โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ### ๐Ÿ”„ Inbound Mail Flow ``` Remote MTA โ†’ :25 (Postfix) โ†’ Rspamd milter (SPF/DKIM/DMARC/greylist) โ†’ LMTP Dovecot โ†’ Maildir (/var/vmail/domain/user/) ``` ### ๐Ÿ”„ Outbound Mail Flow ``` MUA โ†’ :587 STARTTLS (Postfix) โ†’ SASL Dovecot โ†’ MySQL โ†’ Rspamd DKIM signing โ†’ DNS MX lookup โ†’ Destination MTA ``` --- ## โšก Single-Command Deploy ```bash git clone projects-mc-yournet cd projects-mc-yournet sudo bash deploy.sh ``` The script **prompts only for domain and IP** โ€” everything else is auto-generated: ``` ๐Ÿ” Passwords: openssl rand (DB, JWT, admin) ๐Ÿง‚ Hashes: bcrypt (admin, mailboxes) ๐Ÿ“œ SSL cert: Self-signed (10 years) ๐Ÿ—„๏ธ Database: MariaDB + 16 tables ๐Ÿ“ฆ Packages: Postfix, Dovecot, Rspamd, Apache, Redis โš™๏ธ Configs: Applied + placeholders substituted ๐Ÿงช Health check: Automatic post-deploy verification ``` Output: ``` โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• MissionControl โ€” Deploy completed successfully! โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• Web UI: http://YOUR_SERVER_IP API Docs: http://YOUR_SERVER_IP/docs Admin: admin Password: adminK8sL2pX9zQ (randomly generated) SMTP: YOUR_SERVER_IP:25 SMTPS: YOUR_SERVER_IP:465 Submission: YOUR_SERVER_IP:587 (STARTTLS) IMAP: YOUR_SERVER_IP:143 IMAPS: YOUR_SERVER_IP:993 โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• ``` --- ## ๐Ÿงช Built-in Test Suite ```bash bash tests/run-all-tests.sh ``` | Test | What it verifies | |------|-----------------| | `01-test-smtp.sh` | Ports 25/465/587, STARTTLS, EHLO, send via API | | `02-test-imap.sh` | Ports 143/993, STARTTLS, login, LIST/SELECT/FETCH | | `03-test-api.sh` | 20+ endpoints (health, auth, domains, mailboxes, metrics) | | `04-test-webmail.sh` | Roundcube (if installed) | | `05-test-dns.sh` | MX, SPF, DKIM, DMARC, PTR, delivery via swaks | --- ## ๐Ÿ›ก๏ธ Security - โœ… **Zero .env files in repository** โ€” all secrets generated during install - โœ… **Random admin password** (15+ alphanumeric characters) - โœ… **JWT secret** generated with `openssl rand -hex 32` - โœ… **bcrypt hashing** for all passwords (factor 10) - โœ… **Server .env files** protected with `chmod 600` - โœ… **UFW firewall** auto-configured (minimal port exposure) - โœ… **SQL injection protected** (SQLAlchemy ORM + parameterized queries) - โœ… **Configurable CORS** origins - โœ… **Rate limiting** via Rspamd --- ## ๐Ÿ“ฆ Components | Component | Version | Role | |-----------|---------|------| | **FastAPI** (Python 3.11+) | 0.110+ | Async REST API with auto-generated Swagger docs | | **React SPA** | 18+ | Modern web dashboard (pre-compiled) | | **Postfix** | 3.7+ | MTA โ€” SMTP, virtual domains, SASL auth | | **Dovecot** | 2.3+ | IMAP/POP3, LMTP delivery, SASL auth provider | | **Rspamd** | 3.7+ | Anti-spam, DKIM signing, rate limiting, greylisting | | **MariaDB** | 10.11+ | Primary storage (users, domains, mailboxes) | | **Redis** | 7+ | Cache, sessions, Rspamd history | | **Apache** | 2.4+ | Reverse proxy + static file server | | **systemd** | 252+ | Service supervision, auto-restart | --- ## ๐Ÿ“Š Complete REST API | Resource | Endpoint | Description | |----------|----------|-------------| | **Auth** | `POST /api/v1/auth/login` | JWT authentication | | **Health** | `GET /api/v1/health/check` | Full server health status | | **Domains** | `CRUD /api/v1/domains/` | Domain management | | **Mailboxes** | `CRUD /api/v1/mailboxes/` | Mailbox CRUD + quota | | **Aliases** | `CRUD /api/v1/aliases` | Email forwarding | | **Spam** | `GET /api/v1/spam/stats` | Rspamd statistics | | **Metrics** | `GET /api/v1/metrics/system` | CPU, RAM, Disk, Network | | **DNS** | `POST /api/v1/dns/wizard` | DNS records wizard | | **Audit** | `GET /api/v1/audit/logs` | Full audit trail | | **Swagger** | `GET /docs` | Interactive API documentation | --- ## ๐Ÿ”ง Production Checklist ```bash # Let's Encrypt SSL certbot --apache -d mail.yourdomain.com # Point Postfix and Dovecot to LE certs postconf -e "smtpd_tls_cert_file=/etc/letsencrypt/live/mail.yourdomain.com/fullchain.pem" postconf -e "smtpd_tls_key_file=/etc/letsencrypt/live/mail.yourdomain.com/privkey.pem" ln -sf /etc/letsencrypt/live/mail.yourdomain.com/privkey.pem /etc/dovecot/private/dovecot.key ln -sf /etc/letsencrypt/live/mail.yourdomain.com/fullchain.pem /etc/dovecot/private/dovecot.pem # Configure DNS records # MX โ†’ mail.yourdomain.com (priority 10) # SPF โ†’ "v=spf1 mx ~all" # DKIM โ†’ via MissionControl admin panel # DMARC โ†’ "v=DMARC1; p=quarantine" # Restrict API CORS to your domain sed -i 's/CORS_ORIGINS=\["\*"\]/CORS_ORIGINS=\["https:\/\/mail.yourdomain.com"\]/' \ /opt/missioncontrol/backend/.env ``` --- ## ๐Ÿ“ Repository Structure ``` projects-mc-yournet/ โ”œโ”€โ”€ deploy.sh โ† The only command you need โ”œโ”€โ”€ configs/ โ† Anonymized configs (Postfix, Dovecot, Rspamd, Apache) โ”œโ”€โ”€ backend/ โ† Python API (57 files) โ”‚ โ”œโ”€โ”€ app/api/ โ† 19 REST endpoints โ”‚ โ”œโ”€โ”€ app/models/ โ† 16 SQLAlchemy tables โ”‚ โ””โ”€โ”€ app/services/ โ† Business logic โ”œโ”€โ”€ frontend/ โ† Compiled React SPA โ”œโ”€โ”€ sql/ โ† Schema + seed + reset โ”œโ”€โ”€ tests/ โ† Test suite โ””โ”€โ”€ README.md โ† This file ``` --- ## ๐Ÿ’ก Roadmap - [x] Full REST API + SPA dashboard - [x] Single-command deploy (no Docker) - [x] Auto service repair (self-healing) - [x] Real-time system metrics - [x] Rspamd anti-spam + DKIM/DMARC/SPF - [x] Cloudflare DNS wizard - [x] Complete audit logging - [x] Built-in test suite - [ ] CI/CD pipeline - [ ] Ansible playbook / Terraform module - [ ] Integrated Roundcube webmail - [ ] Mobile app (React Native) - [ ] Prometheus metrics exporter --- ## ๐Ÿค Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines on: - Reporting bugs & feature requests - Submitting pull requests - Development setup - Coding standards - Testing --- ## ๐Ÿ“‹ License Apache 2.0 โ€” See [LICENSE](LICENSE) for full text. ---
**MissionControl โ€” Because managing email shouldn't be the hardest part of your day.**
Built with โค๏ธ by Josรฉ Rinaldi (joserinaldi-l) โ€” for sysadmins who deserve better tools.