summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWout Mertens <Wout.Mertens@gmail.com>2016-07-26 10:52:19 +0200
committerGitHub <noreply@github.com>2016-07-26 10:52:19 +0200
commit62d11a6961fdae096de947f4971d078159f7b218 (patch)
tree5b2523177a34ffbb75601cdba7c12537bcb6a530 /nixos
parent66ca9b91467cead5aab5d4d375a92ab9665d4eaa (diff)
parentbb528e714d677f619db732fc66795bf0f6375204 (diff)
downloadnixpkgs-62d11a6961fdae096de947f4971d078159f7b218.tar
nixpkgs-62d11a6961fdae096de947f4971d078159f7b218.tar.gz
nixpkgs-62d11a6961fdae096de947f4971d078159f7b218.tar.bz2
nixpkgs-62d11a6961fdae096de947f4971d078159f7b218.tar.lz
nixpkgs-62d11a6961fdae096de947f4971d078159f7b218.tar.xz
nixpkgs-62d11a6961fdae096de947f4971d078159f7b218.tar.zst
nixpkgs-62d11a6961fdae096de947f4971d078159f7b218.zip
Merge pull request #17206 from nathan-gs/patch-2
Fix #9759 SSMTP sendmail wrapper
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/programs/ssmtp.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/programs/ssmtp.nix b/nixos/modules/programs/ssmtp.nix
index 7b00efbb468..f5d1873cc5c 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 cfg.setSendmail {
+      program = "sendmail";
+      source = "${pkgs.ssmtp}/bin/sendmail";
+      setuid = false;
+      setgid = false;
+    };
 
   };