fix: from review

This commit is contained in:
dettlaff 2024-06-12 16:10:28 +04:00
parent f9a949b5b5
commit 99d404bd10
2 changed files with 22 additions and 27 deletions

View file

@ -1,15 +1,5 @@
[
[
"selfprivacy",
"domain"
],
[
"selfprivacy",
"modules",
"roundcube"
],
[
"mailserver",
"fqdn"
]
]
["selfprivacy", "domain"],
["selfprivacy", "modules", "roundcube"],
["mailserver", "fqdn"]
]

View file

@ -17,19 +17,24 @@ in
config = lib.mkIf cfg.enable {
services.roundcube = {
enable = true;
# this is the url of the vhost, not necessarily the same as the fqdn of
# the mailserver
hostName = "${cfg.subdomain}.${config.selfprivacy.domain}";
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";
'';
services.roundcube = {
enable = true;
# this is the url of the vhost, not necessarily the same as the fqdn of
# the mailserver
hostName = "${cfg.subdomain}.${config.selfprivacy.domain}";
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";
'';
};
services.nginx.virtualHosts."${cfg.subdomain}.${domain}" = {
forceSSL = true;
useACMEHost = domain;
enableACME = false;
};
};
};
}