mailnest — my own mail server
Mail on my own domains without all-in-one bundles: Postfix, Dovecot, Rspamd and Roundcube on my own Dockerfiles, managed from Django
- My role
- Author
- Period
- 2026 — now
A mail server, mail.mailnest.uz, for my own domains and my family's projects. I am not using bundles like Mailcow or docker-mailserver: every component is built from my own Dockerfile on Debian 13, so that I understand and control the whole chain — from accepting a message to IMAP.
Domains, mailboxes and aliases live in Django, and Postfix and Dovecot read them from PostgreSQL through a separate role that only sees views. The schema is designed from day one for a future mailnest.uz service where customers add their own domains and create mailboxes. The specification, documentation for every component, DNS and the PTR record are done; the server is now being built stage by stage, with a check after each one.
What I did
- My own Dockerfiles for Postfix, Dovecot 2.4, Rspamd and Roundcube; official images only for PostgreSQL, Redis and nginx
- Django owns the mail schema: tables are models, views and triggers are migrations; Postfix and Dovecot only see the views
- Sending limits through a Postfix policy service: rules in the database, counters in Redis
- Django generates DKIM keys when a domain is added, and they reach Rspamd through Redis
- Outgoing port 25 is open only to the Postfix container, so neighbouring projects on the server cannot send spam
- SPF -all, DMARC p=reject and PTR from day one
- Documentation: the path of a message, DNS and every component, with a study route matched to the work stages