From 83a669fb2fe27c5b6325d131bf74f587639e574a Mon Sep 17 00:00:00 2001 From: headpats Date: Wed, 18 Mar 2026 05:58:41 +0100 Subject: [PATCH 1/5] docs/roundcube: fix persistent_login plugin not being activated --- docs/roundcube.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/roundcube.nix b/docs/roundcube.nix index 5ec7efb..4666f1f 100644 --- a/docs/roundcube.nix +++ b/docs/roundcube.nix @@ -10,10 +10,15 @@ hostName = "webmail.example.com"; # the nginx vhost package = pkgs.roundcube.withPlugins ( plugins: with plugins; [ + # external plugins to be included # https://search.nixos.org/packages?query=roundcubePlugins persistent_login ] ); + # activate plugins + plugins = [ + "persistent_login" + ]; dicts = with pkgs.aspellDicts; [ # https://search.nixos.org/packages?query=aspellDicts en From 8d5aa0b27a7580cf7f33129bf8857ea6eeabd75c Mon Sep 17 00:00:00 2001 From: headpats Date: Wed, 18 Mar 2026 05:59:47 +0100 Subject: [PATCH 2/5] docs/roundcube: attachment size workaround is now handled by the module --- docs/roundcube.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/roundcube.nix b/docs/roundcube.nix index 4666f1f..52cf5b0 100644 --- a/docs/roundcube.nix +++ b/docs/roundcube.nix @@ -23,9 +23,7 @@ # 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; + maxAttachmentSize = config.mailserver.messageSizeLimit / 1024 / 1024; extraConfig = '' $config['imap_host'] = "ssl://${config.mailserver.fqdn}"; $config['smtp_host'] = "ssl://${config.mailserver.fqdn}"; From bf481fd2e5bd0e148b9866d4450c5d813cf52098 Mon Sep 17 00:00:00 2001 From: headpats Date: Wed, 18 Mar 2026 06:01:43 +0100 Subject: [PATCH 3/5] docs/roundcube: add managesieve example --- docs/roundcube.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/roundcube.nix b/docs/roundcube.nix index 52cf5b0..147ebb8 100644 --- a/docs/roundcube.nix +++ b/docs/roundcube.nix @@ -18,6 +18,7 @@ # activate plugins plugins = [ "persistent_login" + "managesieve" # built-in ]; dicts = with pkgs.aspellDicts; [ # https://search.nixos.org/packages?query=aspellDicts @@ -29,6 +30,10 @@ $config['smtp_host'] = "ssl://${config.mailserver.fqdn}"; $config['smtp_user'] = "%u"; $config['smtp_pass'] = "%p"; + + $config['managesieve_host'] = "tls://${config.mailserver.fqdn}"; + $config['managesieve_port'] = 4190; + $config['managesieve_usetls'] = true; ''; }; From cbf450f06c35e73f56978b79459019d18c474050 Mon Sep 17 00:00:00 2001 From: headpats Date: Wed, 18 Mar 2026 06:02:11 +0100 Subject: [PATCH 4/5] docs/roundcube: fix typo in nginx vhost --- docs/roundcube.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/roundcube.nix b/docs/roundcube.nix index 147ebb8..23e1e73 100644 --- a/docs/roundcube.nix +++ b/docs/roundcube.nix @@ -37,7 +37,7 @@ ''; }; - services.nginx.virtualHosts.${config.services.rounducbe.hostName} = { + services.nginx.virtualHosts.${config.services.roundcube.hostName} = { enableACME = true; forceSSL = true; }; From 3dc19d30d1376fc66aa7cdbc346ddd2744fcd9cb Mon Sep 17 00:00:00 2001 From: headpats Date: Wed, 18 Mar 2026 06:36:29 +0100 Subject: [PATCH 5/5] docs/roundcube: add caddy example --- docs/roundcube-caddy.nix | 17 +++++++++++++++++ docs/roundcube.rst | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 docs/roundcube-caddy.nix diff --git a/docs/roundcube-caddy.nix b/docs/roundcube-caddy.nix new file mode 100644 index 0000000..938e073 --- /dev/null +++ b/docs/roundcube-caddy.nix @@ -0,0 +1,17 @@ +{ config, ... }: +{ + services.nginx.virtualHosts.${config.services.roundcube.hostName} = { + forceSSL = false; + enableACME = false; + listen = [ + { + addr = "127.0.0.1"; + port = 8000; + } + ]; + }; + + services.caddy.virtualHosts."${config.services.roundcube.hostName}".extraConfig = '' + reverse_proxy localhost:8000 + ''; +} diff --git a/docs/roundcube.rst b/docs/roundcube.rst index c1f99ee..408fc92 100644 --- a/docs/roundcube.rst +++ b/docs/roundcube.rst @@ -17,3 +17,10 @@ Once set up you can login with your login account credentials. .. literalinclude:: ./roundcube.nix :language: nix + +To use a different reverse proxy, such as Caddy, bind Roundcube's Nginx virtual +host to ``127.0.0.1`` on a custom port and disable SSL and ACME, as the reverse +proxy will handle those. + +.. literalinclude:: ./roundcube-caddy.nix + :language: nix \ No newline at end of file