diff options
author | sinanmohd <sinan@sinanmohd.com> | 2025-06-20 21:32:31 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2025-06-20 21:32:31 +0530 |
commit | 8550c0e84133accdf60d01433b1fbd6ce52d1baf (patch) | |
tree | decc23945a73fd85cdbe67d98fe2fc01be5ae3dd /os/kay/modules/mail.nix | |
parent | ab3e84fb9f380975bec43b4a8c6bed3c8daaeb3f (diff) |
kay/mail: clean up
Diffstat (limited to 'os/kay/modules/mail.nix')
-rw-r--r-- | os/kay/modules/mail.nix | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/os/kay/modules/mail.nix b/os/kay/modules/mail.nix index 57912ac..f36bf23 100644 --- a/os/kay/modules/mail.nix +++ b/os/kay/modules/mail.nix @@ -71,32 +71,36 @@ in source-ip.v6 = "['${ipv6}']"; tls.starttls = "optional"; }; - - server.listener = { - smtp = { - bind = [ - "[${ipv6}]:25" - "0.0.0.0:25" - ]; - protocol = "smtp"; - }; - submission = { - bind = "[::]:587"; - protocol = "smtp"; - }; - submissions = { - bind = "[::]:465"; - protocol = "smtp"; - tls.implicit = true; - }; - imaptls = { - bind = "[::]:993"; - protocol = "imap"; - tls.implicit = true; - }; - http = { - bind = "[::]:8085"; - protocol = "http"; + http.url = "'https://stalwart.${domain}'"; + + server = { + hostname = "mail.${domain}"; + listener = { + smtp = { + bind = [ + "[${ipv6}]:25" + "0.0.0.0:25" + ]; + protocol = "smtp"; + }; + submission = { + bind = "[::]:587"; + protocol = "smtp"; + }; + submissions = { + bind = "[::]:465"; + protocol = "smtp"; + tls.implicit = true; + }; + imaptls = { + bind = "[::]:993"; + protocol = "imap"; + tls.implicit = true; + }; + http = { + bind = "[::]:8085"; + protocol = "http"; + }; }; }; @@ -167,14 +171,14 @@ in principals = [ { class = "admin"; - name = username; + name = "${username}@${domain}"; secret = "%{file:${credentials_directory}/password}%"; inherit email; } { # for mta-sts & dmarc reports class = "individual"; - name = "reports"; + name = "reports@${domain}"; secret = "%{file:${credentials_directory}/password}%"; email = [ "reports@${domain}" ]; } |