From 0afa9278be9dd9f1eded17b85c414ad193c12510 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Fri, 24 Apr 2026 12:33:49 +0200 Subject: [PATCH] nixos/roundcube: set nginx client_max_body_size for attachments Fixes #506235 This was attempted earlier in #506239 but AFAICT that was the wrong place (nginx precedence rules are tricky). --- nixos/modules/services/mail/roundcube.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index c58832daac19..3c15fbedfc9c 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -190,7 +190,6 @@ in priority = 1100; extraConfig = '' add_header Cache-Control 'public, max-age=604800, must-revalidate'; - client_max_body_size ${toString cfg.maxAttachmentSize}; ''; }; locations."~ ^/(SQL|bin|config|logs|temp|vendor)/" = { @@ -213,6 +212,8 @@ in fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_split_path_info ^(.+\.php)(/.+)$; include ${config.services.nginx.package}/conf/fastcgi.conf; + + client_max_body_size ${toString cfg.maxAttachmentSize}; ''; }; };