2021-06-09 23:46:26 +00:00
|
|
|
{ config, options, lib, ... }:
|
2010-10-10 10:43:28 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
with 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
|
|
|
|
2010-10-10 10:43:28 +00:00
|
|
|
sendmailSetuidWrapper = mkOption {
|
2021-06-09 23:46:26 +00:00
|
|
|
type = types.nullOr options.security.wrappers.type.nestedTypes.elemType;
|
2010-10-10 10:43:28 +00:00
|
|
|
default = null;
|
2016-03-25 15:08:20 +00:00
|
|
|
internal = true;
|
2010-10-10 10:43:28 +00:00
|
|
|
description = lib.mdDoc ''
|
2016-03-25 15:08:20 +00:00
|
|
|
Configuration for the sendmail setuid wapper.
|
2010-10-10 10:43:28 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
config = mkIf (config.services.mail.sendmailSetuidWrapper != null) {
|
|
|
|
|
2017-01-29 07:58:12 +00:00
|
|
|
security.wrappers.sendmail = config.services.mail.sendmailSetuidWrapper;
|
2010-10-10 10:43:28 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|