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.
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user