diff options
author | Nathan Bijnens <nathan@nathan.gs> | 2016-07-23 18:00:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-23 18:00:10 +0200 |
commit | cf3867a5efbbc36743cc7009e33c872cfe3fa232 (patch) | |
tree | 41c4e5df88ed57b69761cd8e03594f488eb90764 /nixos | |
parent | b56a379fb6537fc4329fbbf1e16eae21bfba2969 (diff) | |
download | nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.tar nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.tar.gz nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.tar.bz2 nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.tar.lz nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.tar.xz nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.tar.zst nixlib-cf3867a5efbbc36743cc7009e33c872cfe3fa232.zip |
Fix #9759 SSMTP sendmail wrapper
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/ssmtp.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/programs/ssmtp.nix b/nixos/modules/programs/ssmtp.nix index 7b00efbb4686..ee5ac02d1316 100644 --- a/nixos/modules/programs/ssmtp.nix +++ b/nixos/modules/programs/ssmtp.nix @@ -100,6 +100,12 @@ in Password used for SMTP auth. (STORED PLAIN TEXT, WORLD-READABLE IN NIX STORE) ''; }; + + setSendmail = mkOption { + type = types.bool; + default = true; + description = "Whether to set the system sendmail to ssmtp's."; + }; }; @@ -122,6 +128,13 @@ in ''; environment.systemPackages = [pkgs.ssmtp]; + + services.mail.sendmailSetuidWrapper = mkIf networking.defaultMailServer.setSendmail { + program = "sendmail"; + source = "${pkgs.ssmtp}/bin/sendmail"; + setuid = false; + setgid = false; + }; }; |