From be5f4c0a836db1a54f0c724ddff083b01d8ecfc8 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Mon, 16 Feb 2026 00:04:54 +0100 Subject: [PATCH 1/3] Change settings and hope... --- nix-system-configs/modules/system/mail-server.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix-system-configs/modules/system/mail-server.nix b/nix-system-configs/modules/system/mail-server.nix index 0b18ed0..eb52020 100644 --- a/nix-system-configs/modules/system/mail-server.nix +++ b/nix-system-configs/modules/system/mail-server.nix @@ -80,7 +80,7 @@ in { openFirewall = true; settings = { server = { - hostname = "mail.prg-radio.org"; + hostname = "mailserver.prg-radio.org"; tls = { enable = true; implicit = true; @@ -112,7 +112,7 @@ in { }; }; lookup.default = { - hostname = "mail.prg-radio.org"; + hostname = "mailserver.prg-radio.org"; domain = "prg-radio.org"; }; acme."letsencrypt" = { @@ -120,7 +120,7 @@ in { challenge = "dns-01"; # reference the contact and secret via files under /etc/stalwart contact = "%{file:/etc/stalwart/cloudflare-username}%"; - domains = ["prg-radio.org" "mail.prg-radio.org"]; + domains = ["prg-radio.org" "mailserver.prg-radio.org" "mail.prg-radio.org"]; provider = "cloudflare"; secret = "%{file:/etc/stalwart/acme-secret}%"; }; From f7c2b2d75a724c9a43e0740451bec77111956557 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Mon, 16 Feb 2026 00:28:08 +0100 Subject: [PATCH 2/3] Overhaul. --- nix-system-configs/modules/system/mail-server.nix | 6 +++--- nix-system-configs/modules/system/traefik.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nix-system-configs/modules/system/mail-server.nix b/nix-system-configs/modules/system/mail-server.nix index eb52020..2ad3f19 100644 --- a/nix-system-configs/modules/system/mail-server.nix +++ b/nix-system-configs/modules/system/mail-server.nix @@ -80,7 +80,7 @@ in { openFirewall = true; settings = { server = { - hostname = "mailserver.prg-radio.org"; + hostname = "mail.prg-radio.org"; tls = { enable = true; implicit = true; @@ -112,7 +112,7 @@ in { }; }; lookup.default = { - hostname = "mailserver.prg-radio.org"; + hostname = "mail.prg-radio.org"; domain = "prg-radio.org"; }; acme."letsencrypt" = { @@ -120,7 +120,7 @@ in { challenge = "dns-01"; # reference the contact and secret via files under /etc/stalwart contact = "%{file:/etc/stalwart/cloudflare-username}%"; - domains = ["prg-radio.org" "mailserver.prg-radio.org" "mail.prg-radio.org"]; + domains = ["prg-radio.org" "mailadmin.prg-radio.org" "mail.prg-radio.org"]; provider = "cloudflare"; secret = "%{file:/etc/stalwart/acme-secret}%"; }; diff --git a/nix-system-configs/modules/system/traefik.nix b/nix-system-configs/modules/system/traefik.nix index 5c20f91..6c50686 100644 --- a/nix-system-configs/modules/system/traefik.nix +++ b/nix-system-configs/modules/system/traefik.nix @@ -379,7 +379,7 @@ in { # Mail web administration UI (Stalwart management) - exposed under /management mail-webadmin = { - rule = "Host(`mail.prg-radio.org`) && PathPrefix(`/management`)"; + rule = "Host(`mailadmin.prg-radio.org`) && PathPrefix(`/management`)"; service = "mail-webadmin"; entryPoints = ["websecure"]; tls = {certresolver = "acme";}; From 5d2f866a575c571d1883f93001ccb3d8d9f48260 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Mon, 16 Feb 2026 02:32:52 +0100 Subject: [PATCH 3/3] Open TCP and UDP port 25 in firewall for mail server --- nix-system-configs/modules/system/mail-server.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nix-system-configs/modules/system/mail-server.nix b/nix-system-configs/modules/system/mail-server.nix index 2ad3f19..b482176 100644 --- a/nix-system-configs/modules/system/mail-server.nix +++ b/nix-system-configs/modules/system/mail-server.nix @@ -154,5 +154,12 @@ in { }; }; }; + + networking.firewall.allowedTCPPorts = [ + 25 + ]; + networking.firewall.allowedUDPPorts = [ + 25 + ]; }; }