39 lines
1.2 KiB
Nix
39 lines
1.2 KiB
Nix
|
{ config, pkgs, lib, ... }:
|
||
|
|
||
|
with lib;
|
||
|
let
|
||
|
cfg = config.services.roundcube;
|
||
|
domain = "webmail2.pvv.ntnu.no";
|
||
|
# mailserver = config.mailserver.fqdn;
|
||
|
mailserver = "smtp.pvv.ntnu.no";
|
||
|
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['enable_installer'] = false;
|
||
|
$config['default_host'] = "ssl://imap.pvv.ntnu.no";
|
||
|
$config['default_port'] = 993;
|
||
|
$config['smtp_server'] = "tls://smtp.pvv.ntnu.no";
|
||
|
$config['smtp_port'] = 25;
|
||
|
$config['smtp_user'] = "%u@pvv.ntnu.no";
|
||
|
$config['smtp_pass'] = "%p";
|
||
|
$config['support_url'] = "";
|
||
|
# $config['des_key'] = "changeme"; #should be from sops i guess
|
||
|
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||
|
}
|