summary refs log tree commit diff stats
path: root/system/services/mail/default.nix
blob: 0640fc7b57f454c2f04a47412dca03a8f662b79f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{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;
}
# vim: ts=2