default.nix, mail-server/users.nix: add per-user sieve script

This commit is contained in:
Ruben Maher 2017-11-18 14:07:59 +10:30 committed by Ruben Maher
parent 8b144b44b0
commit c2495e69f3
3 changed files with 67 additions and 4 deletions

View file

@ -59,6 +59,29 @@ in
```
'';
};
sieveScript = mkOption {
type = with types; nullOr lines;
default = null;
example = ''
require ["fileinto", "mailbox"];
if address :is "from" "notifications@github.com" {
fileinto :create "GitHub";
stop;
}
# This must be the last rule, it will check if list-id is set, and
# file the message into the Lists folder for further investigation
elsif header :matches "list-id" "<?*>" {
fileinto :create "Lists";
stop;
}
'';
description = ''
Per-user sieve script.
'';
};
};
config.name = mkDefault name;