From 03b9a159fe6620924dd8d00f7f8cdcbeee583b71 Mon Sep 17 00:00:00 2001 From: obadz Date: Tue, 30 Aug 2016 02:12:15 +0100 Subject: [PATCH] opensmtpd nixos module: chmod & chown until the daemon's heart's content --- nixos/modules/services/mail/opensmtpd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/mail/opensmtpd.nix b/nixos/modules/services/mail/opensmtpd.nix index e773cdedaea2..fb94560e10aa 100644 --- a/nixos/modules/services/mail/opensmtpd.nix +++ b/nixos/modules/services/mail/opensmtpd.nix @@ -109,12 +109,14 @@ in { after = [ "network.target" ]; preStart = '' mkdir -p /var/spool/smtpd + chmod 711 /var/spool/smtpd mkdir -p /var/spool/smtpd/offline chown root.smtpq /var/spool/smtpd/offline chmod 770 /var/spool/smtpd/offline mkdir -p /var/spool/smtpd/purge + chown smtpq.root /var/spool/smtpd/purge chmod 700 /var/spool/smtpd/purge ''; serviceConfig.ExecStart = "${opensmtpd}/sbin/smtpd -d -f ${conf} ${args}";