opensmtpd nixos module: chmod & chown until the daemon's heart's content

This commit is contained in:
obadz 2016-08-30 02:12:15 +01:00
parent dab32a1fa6
commit 03b9a159fe

View File

@ -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}";