diff --git a/modules/mailserver/default.nix b/modules/mailserver/default.nix index 9ce50b3..df9eb64 100644 --- a/modules/mailserver/default.nix +++ b/modules/mailserver/default.nix @@ -23,6 +23,15 @@ with lib; "julien@malka.sh" = { hashedPasswordFile = "/run/secrets/malkash-pw"; catchAll = [ "malka.sh" ]; + sieveScript = '' + require ["variables", "fileinto", "envelope", "subaddress", "mailbox"]; + + if envelope :matches :user "to" "*" { + # you can prefix with INBOX/ or INBOX. if necessary + # remove :create if you want to permit only existing mailboxes + fileinto :create "''${1}"; + } + ''; }; "julien.malka@ens.school" = { hashedPasswordFile = "/run/secrets/ensmailmalka-pw";