From ce86031a006a36ead6465269ffd9213e97c64b14 Mon Sep 17 00:00:00 2001 From: catvayor Date: Thu, 18 Jul 2024 14:47:43 +0200 Subject: [PATCH] mailing test things --- machines/kat-mail-test/default.nix | 9 ++++++--- machines/kat-mail-test/modo.nix | 5 ++++- machines/kat-manah/default.nix | 9 +++++++++ machines/kat-watcher/default.nix | 6 ++++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/machines/kat-mail-test/default.nix b/machines/kat-mail-test/default.nix index 969a286..7cbd4ab 100644 --- a/machines/kat-mail-test/default.nix +++ b/machines/kat-mail-test/default.nix @@ -6,7 +6,7 @@ ... }: let - host = "betamail.katvayor.net"; + host = "catvayor.sh"; in { imports = [ @@ -86,6 +86,7 @@ in }; services.nginx = { enable = true; + virtualHosts."catvayor.sh".enableACME = true; virtualHosts."betamail.katvayor.net" = { enableACME = true; addSSL = true; @@ -98,13 +99,13 @@ in mailserver = { enable = true; - fqdn = host; + fqdn = "betamail.katvayor.net"; domains = [ host ]; loginAccounts = { "root@${host}" = { catchAll = [ host ]; - aliases = builtins.genList (id: "user${toString id}@${host}") 10 ++ [ "moderators@${host}" ]; + aliases = builtins.genList (id: "user${toString id}@${host}") 10 ++ [ "moderators@${host}" "daemon@${host}" ]; hashedPassword = "$2b$05$FoCVDECXYG0KXPigPuIZtuNFiviwSg8RuXx0FbnzC7ZRp.Mz8VWOe"; }; }; @@ -112,5 +113,7 @@ in certificateScheme = "acme"; }; + services.netbird.enable = true; + system.stateVersion = "23.11"; } diff --git a/machines/kat-mail-test/modo.nix b/machines/kat-mail-test/modo.nix index a4fabbc..00768e1 100644 --- a/machines/kat-mail-test/modo.nix +++ b/machines/kat-mail-test/modo.nix @@ -5,6 +5,9 @@ lib, ... }: +let + host = "catvayor.sh"; +in { users.users.moderators = { shell = pkgs.zsh; @@ -18,7 +21,7 @@ zsh ]; }; - mailserver.loginAccounts."moderators@betamail.katvayor.net" = { + mailserver.loginAccounts."moderators@${host}" = { hashedPassword = ""; sieveScript = '' require "vnd.dovecot.pipe"; diff --git a/machines/kat-manah/default.nix b/machines/kat-manah/default.nix index 06de45e..c459843 100644 --- a/machines/kat-manah/default.nix +++ b/machines/kat-manah/default.nix @@ -70,6 +70,10 @@ vm = "192.168.122.3"; sshport = 22002; }; + "catvayor.sh" = { + vm = "192.168.122.3"; + sshport = null; + }; "traque.dgnum.eu" = { vm = "192.168.122.4"; sshport = null; @@ -172,12 +176,17 @@ listen 465; proxy_pass 192.168.122.3:465; } + server { + listen 25; + proxy_pass 192.168.122.3:25; + } ''; }; networking.firewall = { allowedTCPPorts = [ 22 + 25 53 80 443 diff --git a/machines/kat-watcher/default.nix b/machines/kat-watcher/default.nix index 260151a..d256550 100644 --- a/machines/kat-watcher/default.nix +++ b/machines/kat-watcher/default.nix @@ -67,6 +67,7 @@ "traque.katvayor.net" = 22001; "traque.dgnum.eu" = null; "betamail.katvayor.net" = 22002; + "catvayor.sh" = null; "test.traque.katvayor.net" = null; "son.katvayor.net" = null; }; @@ -150,6 +151,10 @@ listen 465; proxy_pass ${kat-r86s}:465; } + server { + listen 25; + proxy_pass ${kat-r86s}:25; + } ''; }; @@ -179,6 +184,7 @@ firewall = { allowedTCPPorts = [ 22 + 25 80 443 993