Merge pull request #243289 from SuperSandro2000/nullmailer-group
nixos/nullmailer: allow users in the nullmailer group to send mails
This commit is contained in:
commit
6873b5c7ee
|
@ -203,7 +203,7 @@ with lib;
|
|||
users = {
|
||||
users.${cfg.user} = {
|
||||
description = "Nullmailer relay-only mta user";
|
||||
group = cfg.group;
|
||||
inherit (cfg) group;
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
|
@ -211,10 +211,10 @@ with lib;
|
|||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/spool/nullmailer - ${cfg.user} - - -"
|
||||
"d /var/spool/nullmailer/failed 750 ${cfg.user} - - -"
|
||||
"d /var/spool/nullmailer/queue 750 ${cfg.user} - - -"
|
||||
"d /var/spool/nullmailer/tmp 750 ${cfg.user} - - -"
|
||||
"d /var/spool/nullmailer - ${cfg.user} ${cfg.group} - -"
|
||||
"d /var/spool/nullmailer/failed 770 ${cfg.user} ${cfg.group} - -"
|
||||
"d /var/spool/nullmailer/queue 770 ${cfg.user} ${cfg.group} - -"
|
||||
"d /var/spool/nullmailer/tmp 770 ${cfg.user} ${cfg.group} - -"
|
||||
];
|
||||
|
||||
systemd.services.nullmailer = {
|
||||
|
@ -238,7 +238,7 @@ with lib;
|
|||
program = "sendmail";
|
||||
source = "${pkgs.nullmailer}/bin/sendmail";
|
||||
owner = cfg.user;
|
||||
group = cfg.group;
|
||||
inherit (cfg) group;
|
||||
setuid = true;
|
||||
setgid = true;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue