Simple NixOS Mailserver
Self-HostedOpen-source, secure mail server setup for NixOS
Overview
Simple NixOS Mailserver is a declarative NixOS module that simplifies setting up a secure, full-featured mail server. It integrates Postfix (SMTP), Dovecot (IMAP/POP3), SpamAssassin (anti-spam), ClamAV (anti-virus), and supports TLS encryption, DKIM, DMARC, and SPF. Deployment is done via NixOS configuration—define your domains, users, and settings in a config file, then rebuild your system for a reproducible setup. Ideal for users who want privacy and control over their email infrastructure without manual service configuration.
Self-Hosting Resources
Below is a reference structure for docker-compose.yml.
⚠️ Do NOT run blindly. Replace placeholders with official values.
version: '3'
services:
simple_nixos_mailserver:
image: <OFFICIAL_IMAGE_NAME>:latest
container_name: simple-nixos-mailserver
ports:
- "8080:<APP_INTERNAL_PORT>"
volumes:
- ./data:/app/data
restart: unless-stopped Key Features
- Declarative NixOS module integration
- Full-stack mail services (SMTP/IMAP/POP3)
- Built-in spam/antivirus protection
- TLS encryption & email authentication (DKIM/DMARC)
Frequently Asked Questions
? Is Simple NixOS Mailserver hard to install?
It requires basic familiarity with NixOS and declarative configuration. You define your mail server settings (domains, users, security features) in your NixOS config file, then rebuild your system—no manual setup of individual services like Postfix or Dovecot is needed.
? Is it a good alternative to Gmail Workspace?
Yes, if you prioritize data privacy and control. It provides core email functionality (send/receive) with security features, but lacks SaaS conveniences like a pre-built webmail interface or customer support—you’ll need to manage your server and add tools like Roundcube separately.
? Is it completely free?
Yes! Simple NixOS Mailserver is open-source under the MIT License, with no licensing fees. You only incur costs for the server hardware or cloud instance you use to host it.
Top Alternatives
People Also Ask about Simple NixOS Mailserver
Tool Info
Pros
- ⊕ Privacy-focused self-hosting
- ⊕ No subscription costs
- ⊕ Reproducible deployments via Nix
- ⊕ Simplified service management
Cons
- ⊖ Requires NixOS expertise
- ⊖ Technical server maintenance
- ⊖ No built-in webmail (needs separate setup)