Simple NixOS Mailserver

Self-Hosted

Open-source, secure mail server setup for NixOS

Visit Website

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.

docker-compose.template.yml TEMPLATE

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

Gmail Workspace Search Google
Microsoft 365 Search Google

People Also Ask about Simple NixOS Mailserver

Simple NixOS Mailserver vs Gmail WorkspaceSimple NixOS Mailserver vs Microsoft 365 Simple NixOS Mailserver 2025 review Simple NixOS Mailserver docker-compose example

Tool Info

Pricing Free/Open Source
Platform Self-Hosted

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)

More Communication - Email - Complete Solutions Tools