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 ];