docs: update Roundcube guide

Adds a short explanation what roundcube even is.

Extract and extend the roundcube example showing plugin and spellchecking
support. We also inherit a plausible maximum attachment size based on
Postfix's message_size_limit. The nginx vhost forces TLS and manages
certificates using the ACME integration.
This commit is contained in:
Martin Weinelt
2026-03-10 02:26:25 +01:00
parent cff7a27cfe
commit 8d996b109d
4 changed files with 61 additions and 32 deletions
+41
View File
@@ -0,0 +1,41 @@
{
config,
pkgs,
...
}:
{
services.roundcube = {
enable = true;
hostName = "webmail.example.com"; # the nginx vhost
package = pkgs.roundcube.withPlugins (
plugins: with plugins; [
# https://search.nixos.org/packages?query=roundcubePlugins
persistent_login
]
);
dicts = with pkgs.aspellDicts; [
# https://search.nixos.org/packages?query=aspellDicts
en
];
# Account for ~30% size increase due to base64 encoding of attachments
# https://github.com/roundcube/roundcubemail/issues/7979
maxAttachmentSize = config.mailserver.messageSizeLimit / 1024 / 1024 / 1.37;
extraConfig = ''
$config['imap_host'] = "ssl://${config.mailserver.fqdn}";
$config['smtp_host'] = "ssl://${config.mailserver.fqdn}";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
};
services.nginx.virtualHosts.${config.services.rounducbe.hostName} = {
enableACME = true;
forceSSL = true;
};
networking.firewall.allowedTCPPorts = [
80
443
];
}