From 20aea051bf5784392a59bc681d9df61c186ffe6d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 4 Jul 2025 08:56:00 +0300 Subject: feat(machines/marduk): Add a local-only mail server The security on this server is abysmal, however, its purpose is to exist solely on my local network, and for all email transmission to happen on this local network. --- machines/marduk/configuration.nix | 17 ++++++++++++++++- machines/marduk/sysidentity.nix | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/machines/marduk/configuration.nix b/machines/marduk/configuration.nix index 1c22c82..377982e 100644 --- a/machines/marduk/configuration.nix +++ b/machines/marduk/configuration.nix @@ -1,6 +1,6 @@ { pkgs, ... }: { services.dnsmasq.settings.address = [ - "/server.int/ftp.int/samba.int/192.168.0.10" + "/server.int/ftp.int/samba.int/mail.int/192.168.0.10" ]; services.httpd = { @@ -35,4 +35,19 @@ }; }; }; + + services.maddy = { + localDomains = [ "mail.int" ]; + + ensureAccounts = [ + "john@mail.int" + "yorgus@mail.int" + ]; + ensureCredentials = { + # Do not use this in production. This will make passwords world-readable + # in the Nix store + "john@mail.int".passwordFile = "${pkgs.writeText "postmaster" "john"}"; + "yorgus@mail.int".passwordFile = "${pkgs.writeText "postmaster" "yorgus"}"; + }; + }; } diff --git a/machines/marduk/sysidentity.nix b/machines/marduk/sysidentity.nix index 59ef8f0..07168f4 100644 --- a/machines/marduk/sysidentity.nix +++ b/machines/marduk/sysidentity.nix @@ -3,5 +3,5 @@ groups: { arch = "x86_64-linux"; kind = "server"; - include = groups.home-server; + include = groups.home-server ++ [ "mail" ]; } -- cgit v1.3.1-26-gb76a