Skip to content

Commit

Permalink
stalwart: cleanup autoconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderio committed Jun 9, 2024
1 parent a3c46c2 commit c2f8a6d
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions hosts/carrot/mail.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ in
preStart = lib.mkForce ''
'';
serviceConfig = {
LogsDirectory = "stalwart-mail";
LoadCredential = [
"cert.pem:${config.security.acme.certs.${domain}.directory}/cert.pem"
"key.pem:${config.security.acme.certs.${domain}.directory}/key.pem"
Expand Down Expand Up @@ -61,8 +62,10 @@ in
serverAliases = [ "autoconfig.${d}" "autodiscovery.${d}" ];
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://[::1]:8119";
locations = {
"= /mail/config-v1.1.xml".proxyPass = "http://[::1]:8119";
"= /autodiscovery/autodiscovery.xml".proxyPass = "http://[::1]:8119";
"= /.well-known/mta-sts.txt".proxyPass = "http://[::1]:8119";
};
};
})
Expand Down Expand Up @@ -91,11 +94,6 @@ in
protocol = "smtp";
tls.implicit = true;
};
jmap = {
bind = [ "[::]:993" ];
protocol = "imap";
tls.implicit = true;
};
imaptls = {
bind = [ "[::]:993" ];
protocol = "imap";
Expand All @@ -111,6 +109,19 @@ in
protocol = "http";
};
};
http = {
use-x-forwarded = true;
};
};

tracer = {
log = {
enable = true;
type = "log";
path = "%{env:LOGS_DIRECTORY}%";
prefix = "stalwart-mail.log";
level = "info";
};
};

store = {
Expand Down

0 comments on commit c2f8a6d

Please sign in to comment.