2023-10-29 00:50:04 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.roundcube;
|
|
|
|
domain = "webmail2.pvv.ntnu.no";
|
|
|
|
# mailserver = config.mailserver.fqdn;
|
2023-10-29 02:31:51 +02:00
|
|
|
mailserver = "pvv.ntnu.no";
|
2023-10-29 00:50:04 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
services.roundcube = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
|
|
|
|
dicts = with pkgs.aspellDicts; [ en en-science en-computers nb nn fr de it nl pl is he gd fi es da am grc de-alt ];
|
|
|
|
maxAttachmentSize = 20;
|
|
|
|
|
|
|
|
# this is the url of the vhost, not necessarily the same as the fqdn of
|
|
|
|
# the mailserver
|
|
|
|
hostName = domain;
|
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
# starttls needed for authentication, so the fqdn required to match
|
|
|
|
# the certificate
|
|
|
|
$config['smtp_server'] = "tls://${mailserver}";
|
|
|
|
$config['smtp_user'] = "%u";
|
|
|
|
$config['smtp_pass'] = "%p";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
2023-10-29 02:31:51 +02:00
|
|
|
}
|