1 { pkgs, lib, config, ... }:
4 inherit (config.services) postfix;
9 tls_server_sni_maps = lib.mkOption {
10 type = types.attrsOf (types.listOf types.path);
12 apply = m: pkgs.writeText "sni" (lib.concatStringsSep "\n" (lib.mapAttrsToList
14 ${domain} ${lib.concatStringsSep " " x509}
21 systemd.services.postfix = {
23 install -m 400 -o root -g root ${postfix.tls_server_sni_maps} /run/keys/postfix-sni
24 ${pkgs.postfix}/bin/postmap -F hash:/run/keys/postfix-sni
29 submissions-header-cleanup = {
36 ("header_checks=pcre:" + pkgs.writeText "submission_header_cleanup_rules" ''
37 # Removes sensitive headers from mails handed in via the submission or smtps port.
38 # See https://thomas-leister.de/mailserver-debian-stretch/
39 # Uses "pcre" style regex.
45 /^X-Originating-IP:/ IGNORE