lol

postsrsd: additional configuration

fixes #19933

authored by

Gregor Kleen and committed by
Jörg Thalheim
d5ec2a2c cf1ec8ed

+29 -5
+29 -5
nixos/modules/services/mail/postsrsd.nix
··· 20 description = "Whether to enable the postsrsd SRS server for Postfix."; 21 }; 22 23 domain = mkOption { 24 type = types.str; 25 description = "Domain name for rewrite"; 26 }; 27 28 - secretsFile = mkOption { 29 - type = types.path; 30 - default = "/var/lib/postsrsd/postsrsd.secret"; 31 - description = "Secret keys used for signing and verification"; 32 }; 33 34 forwardPort = mkOption { 35 type = types.int; 36 default = 10001; ··· 41 type = types.int; 42 default = 10002; 43 description = "Port for the reverse SRS lookup"; 44 }; 45 46 user = mkOption { ··· 86 path = [ pkgs.coreutils ]; 87 88 serviceConfig = { 89 - ExecStart = ''${pkgs.postsrsd}/sbin/postsrsd "-s${cfg.secretsFile}" "-d${cfg.domain}" -f${toString cfg.forwardPort} -r${toString cfg.reversePort}''; 90 User = cfg.user; 91 Group = cfg.group; 92 PermissionsStartOnly = true;
··· 20 description = "Whether to enable the postsrsd SRS server for Postfix."; 21 }; 22 23 + secretsFile = mkOption { 24 + type = types.path; 25 + default = "/var/lib/postsrsd/postsrsd.secret"; 26 + description = "Secret keys used for signing and verification"; 27 + }; 28 + 29 domain = mkOption { 30 type = types.str; 31 description = "Domain name for rewrite"; 32 }; 33 34 + separator = mkOption { 35 + type = types.enum ["-" "=" "+"]; 36 + default = "="; 37 + description = "First separator character in generated addresses"; 38 }; 39 40 + # bindAddress = mkOption { # uncomment once 1.5 is released 41 + # type = types.str; 42 + # default = "127.0.0.1"; 43 + # description = "Socket listen address"; 44 + # }; 45 + 46 forwardPort = mkOption { 47 type = types.int; 48 default = 10001; ··· 53 type = types.int; 54 default = 10002; 55 description = "Port for the reverse SRS lookup"; 56 + }; 57 + 58 + timeout = mkOption { 59 + type = types.int; 60 + default = 1800; 61 + description = "Timeout for idle client connections in seconds"; 62 + }; 63 + 64 + excludeDomains = mkOption { 65 + type = types.listOf types.str; 66 + default = []; 67 + description = "Origin domains to exclude from rewriting in addition to primary domain"; 68 }; 69 70 user = mkOption { ··· 110 path = [ pkgs.coreutils ]; 111 112 serviceConfig = { 113 + ExecStart = ''${pkgs.postsrsd}/sbin/postsrsd "-s${cfg.secretsFile}" "-d${cfg.domain}" -a${cfg.separator} -f${toString cfg.forwardPort} -r${toString cfg.reversePort} -t${toString cfg.timeout} "-X${concatStringsSep "," cfg.excludeDomains}"''; 114 User = cfg.user; 115 Group = cfg.group; 116 PermissionsStartOnly = true;