{ config, ... }: { imports = [ (builtins.fetchTarball { url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-21.11/nixos-mailserver-nixos-21.11.tar.gz"; sha256 = "1i56llz037x416bw698v8j6arvv622qc0vsycd20lx3yx8n77n44"; }) ]; security.acme = { email = "rnhmjoj@inventati.org"; acceptTerms = true; }; mailserver = { enable = true; fqdn = "mail.eurofusion.eu"; domains = [ "eurofusion.eu" ]; loginAccounts = config.secrets.emailAccounts; extraVirtualAliases = { "abuse@eurofusion.eu" = "rnhmjoj@eurofusion.eu"; }; mailboxes = { # default IMAP folders Sent = { specialUse = "Sent"; auto = "subscribe"; }; Drafts = { specialUse = "Drafts"; auto = "subscribe"; }; Spam = { specialUse = "Junk"; auto = "subscribe"; }; Trash = { specialUse = "Trash"; auto = "no"; }; }; # Use Let's Encrypt certificate certificateScheme = 3; # There is one already (pdns-recursor) localDnsResolver = false; # Enable IMAP, SMTP enableImapSsl = true; enableSubmissionSsl = true; }; services.dovecot2.extraConfig = '' # Improve hashing speed auth_cache_verify_password_with_worker = yes ''; services.postfix.extraConfig = '' # Prefer IPv6 smtp_address_preference = ipv6 # Prevent binding on temporary addresses smtp_bind_address6 = 2001:470:c8e8:0:230:48ff:fefa:91e1 ''; }