Merge pull request #33227 from Ekleog/fcron-opensmtpd

fcron module: be compatible with non-wrapped sendmail's, like opensmt…
This commit is contained in:
Jörg Thalheim 2018-01-02 09:26:53 +01:00 committed by GitHub
commit 54b16bcd11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,16 +90,24 @@ in
[ (allowdeny "allow" (cfg.allow)) [ (allowdeny "allow" (cfg.allow))
(allowdeny "deny" cfg.deny) (allowdeny "deny" cfg.deny)
# see man 5 fcron.conf # see man 5 fcron.conf
{ source = pkgs.writeText "fcron.conf" '' { source =
fcrontabs = /var/spool/fcron let
pidfile = /var/run/fcron.pid isSendmailWrapped =
fifofile = /var/run/fcron.fifo lib.hasAttr "sendmail" config.security.wrappers;
fcronallow = /etc/fcron.allow sendmailPath =
fcrondeny = /etc/fcron.deny if isSendmailWrapped then "/run/wrappers/bin/sendmail"
shell = /bin/sh else "${config.system.path}/bin/sendmail";
sendmail = /run/wrappers/bin/sendmail in
editor = ${pkgs.vim}/bin/vim pkgs.writeText "fcron.conf" ''
''; fcrontabs = /var/spool/fcron
pidfile = /var/run/fcron.pid
fifofile = /var/run/fcron.fifo
fcronallow = /etc/fcron.allow
fcrondeny = /etc/fcron.deny
shell = /bin/sh
sendmail = ${sendmailPath}
editor = ${pkgs.vim}/bin/vim
'';
target = "fcron.conf"; target = "fcron.conf";
gid = config.ids.gids.fcron; gid = config.ids.gids.fcron;
mode = "0644"; mode = "0644";