Self-hosted email solution using NixOS.
Proudly inspired by Docker Mailz.
NixOS Mailz is a NixOS module to preconfigure OpenSMTPD, SpamAssassin and Dovecot in perfect harmony with the bare minimum configuration options.
It's either meant to be directly included in your NixOS configuration or just to show an example of a working configuration of OpenSMTPD, SpamAssassin and Dovecot on NixOS, from which you can find inspiration.
nix-shell -p opensmtpd --command 'smtpctl encrypt'
For each line you'll enter, the encrypted equivalent will be printed.
{ config, pkgs, ... }:
{
imports = [
# ...
/path/to/mailz
# ...
];
services.mailz = {
domain = "example.com";
users = {
foo = {
password = "encrypted";
aliases = [ "postmaster" ];
};
};
};
}