Email changes, enable sieve in Dovecot

Signed-off-by: main <magic_rb@redalder.org>
This commit is contained in:
main 2022-11-28 00:38:21 +01:00
parent 5d41c9a3ae
commit 74fcc1a37a
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 20 additions and 1 deletions

View file

@ -25,7 +25,27 @@ nglib.makeSystem {
mail_location = "maildir:/maildir/%u"; mail_location = "maildir:/maildir/%u";
protocol."imap" = { }; protocol."imap" = { };
protocol."lmtp" = {
mail_plugins = [ "sieve" ];
};
plugin."" = {
sieve = pkgs.writeText "filter.sieve" ''
require "variables";
require "fileinto";
if header :matches "X-MAILBOX" "*" {
set "DESIRED_MAILBOX" "''${0}";
}
fileinto "''${DESIRED_MAILBOX}";
'';
};
mail_plugin_dir = pkgs.symlinkJoin {
name = "dovecot-modules";
paths = map (pkg: "${pkg}/lib/dovecot") ([ pkgs.dovecot pkgs.dovecot_pigeonhole ]);
};
# Optimizations: # Optimizations:
# dotlock_use_excl = true; # dotlock_use_excl = true;

View file

@ -64,7 +64,6 @@ nglib.makeSystem {
'' ''
export PATH=${with pkgs; lib.makeBinPath [ busybox runit bash getmail6-fixed maildrop-fixed ]}:${pkgs.opensmtpd}/libexec/opensmtpd:$PATH export PATH=${with pkgs; lib.makeBinPath [ busybox runit bash getmail6-fixed maildrop-fixed ]}:${pkgs.opensmtpd}/libexec/opensmtpd:$PATH
chown vmail:vmail -R /getmail.d chown vmail:vmail -R /getmail.d
set -m set -m