mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-11-11 11:29:17 +05:00
dovecot: no longer need to copy sieve scripts
This commit is contained in:
parent
fe6d325397
commit
d507bd9c95
@ -195,8 +195,11 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
pipeBins = [
|
pipeBins = map lib.getExe [
|
||||||
pipeBin
|
(pkgs.writeShellScriptBin "sa-learn-ham.sh"
|
||||||
|
"exec ${pkgs.rspamd}/bin/rspamc -h /run/rspamd/worker-controller.sock learn_ham")
|
||||||
|
(pkgs.writeShellScriptBin "sa-learn-spam.sh"
|
||||||
|
"exec ${pkgs.rspamd}/bin/rspamc -h /run/rspamd/worker-controller.sock learn_spam")
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -204,13 +207,13 @@ in
|
|||||||
{
|
{
|
||||||
name = junkMailboxName;
|
name = junkMailboxName;
|
||||||
causes = [ "COPY" "APPEND" ];
|
causes = [ "COPY" "APPEND" ];
|
||||||
before = "${stateDir}/imap_sieve/report-spam.sieve";
|
before = ./dovecot/imap_sieve/report-spam.sieve;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "*";
|
name = "*";
|
||||||
from = junkMailboxName;
|
from = junkMailboxName;
|
||||||
causes = [ "COPY" ];
|
causes = [ "COPY" ];
|
||||||
before = "${stateDir}/imap_sieve/report-ham.sieve";
|
before = ./dovecot/imap_sieve/report-ham.sieve;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -363,13 +366,6 @@ in
|
|||||||
systemd.services.dovecot2 = {
|
systemd.services.dovecot2 = {
|
||||||
preStart = ''
|
preStart = ''
|
||||||
${genPasswdScript}
|
${genPasswdScript}
|
||||||
rm -rf '${stateDir}/imap_sieve'
|
|
||||||
mkdir '${stateDir}/imap_sieve'
|
|
||||||
cp -p "${./dovecot/imap_sieve}"/*.sieve '${stateDir}/imap_sieve/'
|
|
||||||
for k in "${stateDir}/imap_sieve"/*.sieve ; do
|
|
||||||
${pkgs.dovecot_pigeonhole}/bin/sievec "$k"
|
|
||||||
done
|
|
||||||
chown -R '${dovecot2Cfg.mailUser}:${dovecot2Cfg.mailGroup}' '${stateDir}/imap_sieve'
|
|
||||||
'' + (lib.optionalString cfg.ldap.enable setPwdInLdapConfFile);
|
'' + (lib.optionalString cfg.ldap.enable setPwdInLdapConfFile);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user