Skip to content

Commit c4a59a9

Browse files
authored
Merge pull request #324617 from NotAShelf/271968-take-two
nixos/roundcube: adjust maxAttachmentSize, clarify documentation
2 parents 35a90c3 + 48d1d14 commit c4a59a9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

nixos/doc/manual/release-notes/rl-2411.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@
183183

184184
- The `services.patroni.raft` option has been removed, as Raft has been [deprecated by upstream since 3.0.0](https://github.com/patroni/patroni/blob/master/docs/releases.rst#version-300)
185185

186+
- `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments.
187+
186188
## Other Notable Changes {#sec-release-24.11-notable-changes}
187189

188190
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

nixos/modules/services/mail/roundcube.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,17 @@ in
9393
maxAttachmentSize = mkOption {
9494
type = types.int;
9595
default = 18;
96+
apply = configuredMaxAttachmentSize: "${toString (configuredMaxAttachmentSize * 1.37)}M";
9697
description = ''
9798
The maximum attachment size in MB.
98-
99-
Note: Since roundcube only uses 70% of max upload values configured in php
100-
30% is added automatically to [](#opt-services.roundcube.maxAttachmentSize).
99+
[upstream issue comment]: https://github.com/roundcube/roundcubemail/issues/7979#issuecomment-808879209
100+
::: {.note}
101+
Since there is some overhead in base64 encoding applied to attachments, + 37% will be added
102+
to the value set in this option in order to offset the overhead. For example, setting
103+
`maxAttachmentSize` to `100` would result in `137M` being the real value in the configuration.
104+
See [upstream issue comment] for more details on the motivations behind this.
105+
:::
101106
'';
102-
apply = configuredMaxAttachmentSize: "${toString (configuredMaxAttachmentSize * 1.3)}M";
103107
};
104108

105109
configureNginx = lib.mkOption {

0 commit comments

Comments
 (0)