From 3b637e8b1a62300a545c79694db145193fbf530b Mon Sep 17 00:00:00 2001 From: def Date: Wed, 24 Apr 2024 02:18:28 +0300 Subject: [PATCH] Update sp-modules/simple-nixos-mailserver/config.nix --- sp-modules/simple-nixos-mailserver/config.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sp-modules/simple-nixos-mailserver/config.nix b/sp-modules/simple-nixos-mailserver/config.nix index b1c8379..87e005b 100644 --- a/sp-modules/simple-nixos-mailserver/config.nix +++ b/sp-modules/simple-nixos-mailserver/config.nix @@ -58,13 +58,19 @@ lib.mkIf sp.modules.simple-nixos-mailserver.enable { virusScanning = false; }; + services.roundcube = { - enable = true; - hostName = "cube.bloodwine.cyou"; - }; - - services.nginx = { - enable = true; + enable = true; + # this is the url of the vhost, not necessarily the same as the fqdn of + # the mailserver + hostName = "webmail.bloodwine.cyou"; + 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"; + ''; }; networking.firewall.allowedTCPPorts = [ 80 443 ];