From 759ed58c8f3a5678110982652a7a1fe4b9c80852 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 11 Jul 2022 10:35:04 +0200 Subject: ... --- modules/postfix-mta-sts-resolver.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'modules') diff --git a/modules/postfix-mta-sts-resolver.nix b/modules/postfix-mta-sts-resolver.nix index 86804758..fcbd9390 100644 --- a/modules/postfix-mta-sts-resolver.nix +++ b/modules/postfix-mta-sts-resolver.nix @@ -11,6 +11,7 @@ in { package = mkPackageOption pkgs "postfix-mta-sts-resolver"; redis = mkEnableOption "redis cache" // { default = true; example = false; }; + proactive-policy-fetching = mkEnableOption "proactive policy fetching" // { default = true; example = false; }; loglevel = mkOption { type = types.enum ["debug" "info" "warn" "error" "fatal"]; @@ -27,11 +28,15 @@ in { services.postfix-mta-sts-resolver.settings = { path = "/run/postfix-mta-sts-resolver/map.sock"; mode = 432; # 0o0660 - } // (optionalAttrs cfg.redis { cache = { - type = "redis"; - options.url = "unix://${toString config.services.redis.servers.postfix-mta-sts-resolver.unixSocket}"; - }; - }); + } // (optionalAttrs cfg.redis { + cache = { + type = "redis"; + options.url = "unix://${toString config.services.redis.servers.postfix-mta-sts-resolver.unixSocket}"; + }; + }) + // (optionalAttrs cfg.proactive-policy-fetching { + proactive_policy_fetching.enabled = true; + }); services.redis.servers.postfix-mta-sts-resolver = mkIf cfg.redis { enable = true; -- cgit v1.2.3