diff options
author | Philipp Kern <pkern@google.com> | 2020-12-25 20:56:41 +0100 |
---|---|---|
committer | Philipp Kern <pkern@google.com> | 2020-12-25 21:00:33 +0100 |
commit | c260905c8060ee8367cac0635a8c87cad4eef7aa (patch) | |
tree | 60f2c737fdfe77f490e73bb9ebd27c05d2ebcf68 | |
parent | 1e2571ac2160aed33b36d67ce6b1b1a84c2d125f (diff) | |
download | nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.tar nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.tar.gz nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.tar.bz2 nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.tar.lz nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.tar.xz nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.tar.zst nixpkgs-c260905c8060ee8367cac0635a8c87cad4eef7aa.zip |
nixos/exim: Make queue runner interval configurable and reduce it to 5m
Exim spawns a new queue runner every n minutes as configured by the argument to -q; up to queue_run_max can be active at the same time. Spawning a queue runner only every 30 mins means that a message that failed delivery on the first attempt (e.g. due to greylisting) will only be retried 30 minutes later. A queue runner will immediately exit if the queue is empty, so it is more a function on how quickly Exim will scale to mail load and how quickly it will retry than something that is taxing on an otherwise empty system.
-rw-r--r-- | nixos/modules/services/mail/exim.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/mail/exim.nix b/nixos/modules/services/mail/exim.nix index 892fbd33214..8927d84b478 100644 --- a/nixos/modules/services/mail/exim.nix +++ b/nixos/modules/services/mail/exim.nix @@ -67,6 +67,13 @@ in ''; }; + queueRunnerInterval = mkOption { + type = types.str; + default = "5m"; + description = '' + How often to spawn a new queue runner. + ''; + }; }; }; @@ -104,7 +111,7 @@ in wantedBy = [ "multi-user.target" ]; restartTriggers = [ config.environment.etc."exim.conf".source ]; serviceConfig = { - ExecStart = "${cfg.package}/bin/exim -bdf -q30m"; + ExecStart = "${cfg.package}/bin/exim -bdf -q${cfg.queueRunnerInterval}"; ExecReload = "${coreutils}/bin/kill -HUP $MAINPID"; }; preStart = '' |