niksos/hosts/chmura/services/stalwart.nix
2024-07-16 08:07:53 +02:00

57 lines
1.5 KiB
Nix

{
users.users.stalwart = {
isSystemUser = true;
group = "stalwart";
home = "/var/lib/stalwart";
};
users.groups.stalwart = {};
services.stalwart-mail = {
enable = true;
settings = {
server = {
hostname = "mail.jacekpoz.pl";
run-as = {
user = "stalwart";
group = "stalwart";
};
#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";
# };
#};
};
global = {
thread-pool = 4;
shared-map = {
shard = 32;
capacity = 10;
};
tracing = {
method = "journal";
level = "warn";
};
};
};
};
services.caddy = {
enable = true;
virtualHosts."mail.jacekpoz.pl".extraConfig = ''
handle_path /jmap* {
reverse_proxy * localhost:9902
}
'';
};
}