summaryrefslogtreecommitdiff
path: root/os/kay/modules/mail.nix
diff options
context:
space:
mode:
Diffstat (limited to 'os/kay/modules/mail.nix')
-rw-r--r--os/kay/modules/mail.nix60
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}" ];
}