From 9c73f4b41ff3bf732d716ee3cc720e1849037d4d Mon Sep 17 00:00:00 2001 From: kat witch Date: Sat, 11 Sep 2021 00:27:59 +0100 Subject: [PATCH] services/mail: weh --- config/services/mail/autoconfig.nix | 2 +- config/services/mail/dovecot.nix | 1 + config/services/mail/postfix.nix | 2 ++ config/services/roundcube/default.nix | 9 ++++++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config/services/mail/autoconfig.nix b/config/services/mail/autoconfig.nix index 571a012b..1e07b512 100644 --- a/config/services/mail/autoconfig.nix +++ b/config/services/mail/autoconfig.nix @@ -18,7 +18,7 @@ in { kittywit.ch kittywit.ch Mail - em0lar + kittywitch ${config.network.addresses.public.domain} 993 diff --git a/config/services/mail/dovecot.nix b/config/services/mail/dovecot.nix index c1e455bb..f8b878d6 100644 --- a/config/services/mail/dovecot.nix +++ b/config/services/mail/dovecot.nix @@ -30,6 +30,7 @@ in extraDomainNames = [ config.network.dns.domain + "mail.${config.network.dns.domain}" config.network.addresses.public.domain "dork.dev" ]; diff --git a/config/services/mail/postfix.nix b/config/services/mail/postfix.nix index 09a7d064..dda3150b 100644 --- a/config/services/mail/postfix.nix +++ b/config/services/mail/postfix.nix @@ -8,6 +8,8 @@ let virtualRegex = pkgs.writeText "virtual-regex" '' /^kat\.[^@.]+@kittywit\.ch$/ kat@kittywit.ch /^kat\.[^@.]+@dork\.dev$/ kat@kittywit.ch + /^arc\.[^@.]+@kittywit\.ch$/ arc@kittywit.ch + /^arc\.[^@.]+@dork\.dev$/ arc@kittywit.ch ''; helo_access = pkgs.writeText "helo_access" '' diff --git a/config/services/roundcube/default.nix b/config/services/roundcube/default.nix index b23300ce..a48979dd 100644 --- a/config/services/roundcube/default.nix +++ b/config/services/roundcube/default.nix @@ -1,9 +1,16 @@ -{ config, ... }: { +{ config, lib, ... }: with lib; { services.roundcube = { enable = true; hostName = "mail.${config.network.dns.domain}"; }; + services.nginx.virtualHosts."mail.${config.network.dns.domain}" = { + useACMEHost = "dovecot_domains"; + enableACME = mkForce false; + }; + + users.users.nginx.extraGroups = singleton "postfix"; + deploy.tf.dns.records.services_roundcube = { inherit (config.network.dns) zone; domain = "mail";