From 53c0e7ba1f5f629366ef6e4113d6fa04ddb0730d Mon Sep 17 00:00:00 2001 From: Zuckerberg Date: Tue, 14 Mar 2023 23:28:07 -0600 Subject: [PATCH] Add Webmail --- common/server/mailserver.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/server/mailserver.nix b/common/server/mailserver.nix index 184aac3..f0c33c1 100644 --- a/common/server/mailserver.nix +++ b/common/server/mailserver.nix @@ -62,5 +62,18 @@ in { (concatStringsSep "\n" (map (domain: "@${domain} ${relayHost}") domains)); services.postfix.mapFiles.sasl_relay_passwd = "/run/agenix/sasl_relay_passwd"; age.secrets.sasl_relay_passwd.file = ../../secrets/sasl_relay_passwd.age; + + # webmail + services.nginx.enable = true; + services.roundcube = { + enable = true; + hostName = config.mailserver.fqdn; + extraConfig = '' + # starttls needed for authentication, so the fqdn required to match the certificate + $config['smtp_server'] = "tls://${config.mailserver.fqdn}"; + $config['smtp_user'] = "%u"; + $config['smtp_pass'] = "%p"; + ''; + }; }; } \ No newline at end of file