anchor.diff:          StartLimitInterval = "1min";
           RuntimeDirectory = [ "dovecot2" ];
         };
  +
  +      preStart = ''
  +        rm -rf ${stateDir}/sieve
  +      '' + optionalString (cfg.sieveScripts != {}) ''
  +        mkdir -p ${stateDir}/sieve
  +        ${concatStringsSep "\n" (mapAttrsToList (to: from: ''
  +          if [ -d '${from}' ]; then
  +            mkdir '${stateDir}/sieve/${to}'
  +            cp ${from}/*.sieve '${stateDir}/sieve/${to}'
  +          else
  +            cp '${from}' '${stateDir}/sieve/${to}'
  +          fi
  +           ${pkgs.dovecot_pigeonhole}/bin/sievec '${stateDir}/sieve/${to}'
  +        '') cfg.sieveScripts)}
  +        chown -R '${cfg.user}:${cfg.group}' ${stateDir}/sieve
  +      '';
       };
   
       environment.systemPackages = [ dovecotPkg ];
  
positive.code:       passdb {
          driver = pam
          args = ${optionalString cfg.showPAMFailure "failure_show_msg=yes"} dovecot2
        }
      '')
  
  
negative.code:       description = "Whether to create a own Dovecot PAM service and configure PAM user logins.";
      };
  
      sieveScripts = mkOption {
        type = types.attrsOf types.path;
        default = {};
        description = "Sieve scripts to be executed. Key is a sequence, e.g. 'before2', 'after' etc.";
      };
  
      showPAMFailure = mkOption {
        type = types.bool;
        default = false;
  