19 lines
580 B
Nix
19 lines
580 B
Nix
{ config, lib, ... }:
|
|
let mail_config = config.mailserver;
|
|
in {
|
|
config = (lib.mkIf (mail_config.enable && mail_config.enable_roundcube) {
|
|
services.roundcube = {
|
|
enable = true;
|
|
hostName = "${mail_config.roundcube_url}";
|
|
extraConfig = ''
|
|
$config['smtp_server'] = "tls://${mail_config.fqdn}";
|
|
$config['smtp_user'] = "%u";
|
|
$config['smtp_pass'] = "%p";
|
|
$config['plugins'] = ["managesieve"];
|
|
$config['managesieve_host'] = 'tls://${mail_config.fqdn}';
|
|
${mail_config.extra_roundcube_config}
|
|
'';
|
|
};
|
|
});
|
|
}
|