summary refs log tree commit diff stats
path: root/system/services/mail
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/mail/default.nix41
-rw-r--r--system/services/mail/users.nix (renamed from system/mail/users.nix)bin486 -> 486 bytes
2 files changed, 41 insertions, 0 deletions
diff --git a/system/services/mail/default.nix b/system/services/mail/default.nix
new file mode 100644
index 0000000..382a87f
--- /dev/null
+++ b/system/services/mail/default.nix
@@ -0,0 +1,41 @@
+{lib, ...}: let
+  all_admins = [
+    "sils@vhack.eu"
+    "soispha@vhack.eu"
+    "nightingale@vhack.eu"
+  ];
+  users = import ./users.nix {};
+in {
+  mailserver =
+    lib.recursiveUpdate {
+      enable = true;
+      fqdn = "server1.vhack.eu";
+
+      useFsLayout = true;
+
+      extraVirtualAliases = {
+        "abuse@vhack.eu" = all_admins;
+        "postmaster@vhack.eu" = all_admins;
+        "admin@vhack.eu" = all_admins;
+      };
+
+      mailDirectory = "/var/lib/mail/vmail";
+      dkimKeyDirectory = "/var/lib/mail/dkim";
+      sieveDirectory = "/var/lib/mail/sieve";
+      backup.snapshotRoot = "/var/lib/mail/backup";
+
+      enableImap = false;
+      enableImapSsl = true;
+      enablePop3 = false;
+      enablePop3Ssl = true;
+      # SMTP
+      enableSubmission = false;
+      enableSubmissionSsl = true;
+      openFirewall = true;
+
+      keyFile = "/var/lib/acme/server1.vhack.eu/key.pem";
+      certificateScheme = "acme";
+      certificateFile = "/var/lib/acme/server1.vhack.eu/fullchain.pem";
+    }
+    users;
+}
diff --git a/system/mail/users.nix b/system/services/mail/users.nix
index f3264a1..f3264a1 100644
--- a/system/mail/users.nix
+++ b/system/services/mail/users.nix
Binary files differ