From c260905c8060ee8367cac0635a8c87cad4eef7aa Mon Sep 17 00:00:00 2001 From: Philipp Kern Date: Fri, 25 Dec 2020 20:56:41 +0100 Subject: [PATCH] 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. --- nixos/modules/services/mail/exim.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/mail/exim.nix b/nixos/modules/services/mail/exim.nix index 892fbd33214a..8927d84b478c 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 = ''