Add admin ports & service
This commit is contained in:
parent
6b3c44613f
commit
9bcfef6ab0
29
dovecot.nix
29
dovecot.nix
|
@ -43,6 +43,16 @@ in {
|
||||||
description = "Port on which to serve metrics data.";
|
description = "Port on which to serve metrics data.";
|
||||||
default = 5034;
|
default = 5034;
|
||||||
};
|
};
|
||||||
|
admin = mkOption {
|
||||||
|
type = port;
|
||||||
|
description = "Port on which to listen for admin requests.";
|
||||||
|
default = 5925;
|
||||||
|
};
|
||||||
|
http-admin = mkOption {
|
||||||
|
type = nullOr port;
|
||||||
|
description = "Port on which to listen for admin HTTP API requests.";
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mail-user = mkOption {
|
mail-user = mkOption {
|
||||||
|
@ -386,7 +396,7 @@ in {
|
||||||
mail_plugins = $mail_plugins sieve fts fts_solr
|
mail_plugins = $mail_plugins sieve fts fts_solr
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin {
|
plugins {
|
||||||
fts = solr
|
fts = solr
|
||||||
fts_solr = url=http://${cfg.solr.host}:${
|
fts_solr = url=http://${cfg.solr.host}:${
|
||||||
toString cfg.solr.port
|
toString cfg.solr.port
|
||||||
|
@ -445,6 +455,23 @@ in {
|
||||||
inbox = yes
|
inbox = yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service doveadm {
|
||||||
|
unix_listener doveadm-server {
|
||||||
|
user = ${config.services.dovecot2.user}
|
||||||
|
group = ${config.services.dovecot2.group}
|
||||||
|
}
|
||||||
|
inet_listener {
|
||||||
|
port = ${toString cfg.ports.admin}
|
||||||
|
}
|
||||||
|
${
|
||||||
|
optionalString (!isNull cfg.ports.http-admin) ''
|
||||||
|
inet_listener http {
|
||||||
|
port = ${toString cfg.ports.http-admin}
|
||||||
|
}
|
||||||
|
''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugin {
|
plugin {
|
||||||
sieve_plugins = sieve_imapsieve sieve_extprograms
|
sieve_plugins = sieve_imapsieve sieve_extprograms
|
||||||
sieve = file:${cfg.state-directory}/sieves/%u/scripts;active=${cfg.state-directory}/sieves/%u/active.sieve
|
sieve = file:${cfg.state-directory}/sieves/%u/scripts;active=${cfg.state-directory}/sieves/%u/active.sieve
|
||||||
|
|
Loading…
Reference in New Issue