Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit20aea051bf5784392a59bc681d9df61c186ffe6d (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-07-04 08:56:00 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-07-04 08:56:00 +0300
Filese3c91f54cdb70331b65398ebd72af90dc0aa9019
nix-20aea051bf5784392a59bc681d9df61c186ffe6d.tar
nix-20aea051bf5784392a59bc681d9df61c186ffe6d.tar.gz
nix-20aea051bf5784392a59bc681d9df61c186ffe6d.zip
Parent0baa6e653037ef13de1401120fd61e48c6101e56 (diff)
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.
2 files changed, 17 insertions, 2 deletions
-rw-r--r--machines/marduk/configuration.nix17
-rw-r--r--machines/marduk/sysidentity.nix2
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" ];
}