2021-06-10 01:46:26 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
options,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2010-10-10 10:43:28 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2010-10-10 10:43:28 +00:00
|
|
|
services.mail = {
|
2011-09-14 18:20:50 +00:00
|
|
|
|
2024-08-24 22:05:33 +02:00
|
|
|
sendmailSetuidWrapper = lib.mkOption {
|
|
|
|
type = lib.types.nullOr options.security.wrappers.type.nestedTypes.elemType;
|
2010-10-10 10:43:28 +00:00
|
|
|
default = null;
|
2016-03-25 16:08:20 +01:00
|
|
|
internal = true;
|
2010-10-10 10:43:28 +00:00
|
|
|
description = ''
|
2016-03-25 16:08:20 +01:00
|
|
|
Configuration for the sendmail setuid wapper.
|
2010-10-10 10:43:28 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2024-08-24 22:05:33 +02:00
|
|
|
config = lib.mkIf (config.services.mail.sendmailSetuidWrapper != null) {
|
2010-10-10 10:43:28 +00:00
|
|
|
|
2017-01-29 01:58:12 -06:00
|
|
|
security.wrappers.sendmail = config.services.mail.sendmailSetuidWrapper;
|
2010-10-10 10:43:28 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|