default.nix, mail-server/users.nix: add per-user sieve script
This commit is contained in:
parent
8b144b44b0
commit
c2495e69f3
3 changed files with 67 additions and 4 deletions
23
default.nix
23
default.nix
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue