diff options
author | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-01-26 02:00:04 -0800 |
---|---|---|
committer | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-01-26 02:00:04 -0800 |
commit | a26a796d5c7fa305e007c2b5229e0521c8b3fb0f (patch) | |
tree | 6c35defae305b0da581f757b72b461a8f6052620 /nixos/modules/services/mail/dovecot.nix | |
parent | ad8fde5e5d9bc25a54ac238f485e28b37d6d185a (diff) | |
parent | 142696de884213e01cc518af813a20d2e2ece3cc (diff) | |
download | nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.tar nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.tar.gz nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.tar.bz2 nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.tar.lz nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.tar.xz nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.tar.zst nixlib-a26a796d5c7fa305e007c2b5229e0521c8b3fb0f.zip |
Merging against master - updating smokingpig, rebase was going to be messy
Diffstat (limited to 'nixos/modules/services/mail/dovecot.nix')
-rw-r--r-- | nixos/modules/services/mail/dovecot.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index 1d427429b9cd..6b37a8a4ea2c 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -241,6 +241,9 @@ in RuntimeDirectory = [ "dovecot2" ]; }; + # When copying sieve scripts preserve the original time stamp + # (should be 0) so that the compiled sieve script is newer than + # the source file and Dovecot won't try to compile it. preStart = '' rm -rf ${stateDir}/sieve '' + optionalString (cfg.sieveScripts != {}) '' @@ -248,11 +251,11 @@ in ${concatStringsSep "\n" (mapAttrsToList (to: from: '' if [ -d '${from}' ]; then mkdir '${stateDir}/sieve/${to}' - cp "${from}/"*.sieve '${stateDir}/sieve/${to}' + cp -p "${from}/"*.sieve '${stateDir}/sieve/${to}' else - cp '${from}' '${stateDir}/sieve/${to}' + cp -p '${from}' '${stateDir}/sieve/${to}' fi - ${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/sieve/${to}' + ${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/sieve/${to}' '') cfg.sieveScripts)} chown -R '${cfg.mailUser}:${cfg.mailGroup}' '${stateDir}/sieve' ''; |