niksos/hosts/chmura/services/stalwart.nix

58 lines
1.5 KiB
Nix
Raw Normal View History

2023-10-13 21:04:24 +02:00
_: {
2023-11-25 17:12:09 +01:00
users.users.stalwart = {
isSystemUser = true;
group = "stalwart";
home = "/var/lib/stalwart";
};
users.groups.stalwart = {};
2023-10-13 21:04:24 +02:00
services.stalwart-mail = {
enable = true;
settings = {
server = {
hostname = "mail.jacekpoz.pl";
run-as = {
user = "stalwart";
group = "stalwart";
};
2023-11-25 17:12:09 +01:00
#listener = {
# lmtp = {
# protocol = "lmtp";
# bind = [ "0.0.0.0:9900" ];
# };
# smtp = {
# protocol = "smtp";
# bind = [ "0.0.0.0:9901" ];
# };
# jmap = {
# protocol = "jmap";
# bind = [ "0.0.0.0:9902" ];
# url = "https://mail.jacekpoz.pl/jmap";
# };
#};
2023-10-13 21:04:24 +02:00
};
global = {
thread-pool = 4;
shared-map = {
shard = 32;
capacity = 10;
};
tracing = {
method = "journal";
level = "warn";
};
};
};
};
2023-11-25 17:12:09 +01:00
services.caddy = {
enable = true;
virtualHosts."mail.jacekpoz.pl".extraConfig = ''
handle_path /jmap* {
reverse_proxy * localhost:9902
}
'';
};
2023-10-13 21:04:24 +02:00
}