mailsystem: Add configuration options for dkim signatures
This commit is contained in:
parent
88d2b387c7
commit
de330a87a4
2 changed files with 92 additions and 6 deletions
|
|
@ -168,6 +168,45 @@ in {
|
|||
default = {};
|
||||
};
|
||||
|
||||
dkimSettings = lib.mkOption {
|
||||
type = with lib.types;
|
||||
attrsOf (listOf (submodule {
|
||||
options = {
|
||||
selector = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "mail";
|
||||
description = "DKIM Selector";
|
||||
};
|
||||
keyFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = "/run/secrets/dkim/example.com.mail.key";
|
||||
description = ''
|
||||
Path to DKIM private-key-file. A public-private-pair can be generated as follows:
|
||||
|
||||
```
|
||||
nix-shell -p rspamd --run 'rspamadm dkim_keygen -s "selector" -t ed25519 -d example.com
|
||||
nix-shell -p rspamd --run 'rspamadm dkim_keygen -s "selector" -b 2048 -d example.com
|
||||
```
|
||||
'';
|
||||
};
|
||||
};
|
||||
}));
|
||||
example = {
|
||||
"example.com" = [
|
||||
{
|
||||
selector = "mail";
|
||||
keyFile = "/run/secrets/dkim/example.com.mail.key";
|
||||
}
|
||||
];
|
||||
};
|
||||
description = ''
|
||||
Per-domain DKIM configuration.
|
||||
This option allows to optionally set one or more DKIM private keys
|
||||
and their respective selectors for each domain individually.
|
||||
'';
|
||||
default = {};
|
||||
};
|
||||
|
||||
certificateScheme = lib.mkOption {
|
||||
type = lib.types.enum ["acme" "selfsigned"];
|
||||
default = "acme";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue