Bug 37442 - mailbox_size_limit should not be "unset"
mailbox_size_limit should not be "unset"
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Philipp Hahn
Sönke Schwardt-Krummrich
:
Depends on: 38036
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-05 12:37 CET by Janis Meybohm
Modified: 2015-03-25 16:43 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2015-01-05 12:37:11 CET
2015010521000216

# ucr info mail/localmailboxsizelimit
mail/localmailboxsizelimit: 102400000
 This variable configures the maximum size in bytes of mailbox or Maildir files. If the variable is unset, no limitation applies.
 Categories: service-mail


This is wrong! When the variable is unset it is not written to main.cf and de default of 51200000 applies. From man 5 postconf:

---
mailbox_size_limit (default: 51200000)
  The  maximal  size  of  any  local(8)  individual  mailbox or maildir file, or zero (no limit).  
  In fact, this limits the size of any file that is written to upon local delivery, including files 
  written by external commands that are executed by the local(8) delivery agent.

  This limit must not be smaller than the message size limit.
---

Templates should be changed so that "mailbox_size_limit = 0" is applied if UCR mail/localmailboxsizelimit is unset.


In many cases users have increased the message_size_limit (UCR mail/messagesizelimit) beyond 51200000 which would then lead to broken mail delivery and the following error messages in mail.log/err:

---
fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit
---
Comment 1 Janis Meybohm univentionstaff 2015-01-19 11:03:15 CET
Hit our local environment as well...
Comment 2 Sven Anders 2015-02-05 13:58:14 CET
root@imap:~# ucr search messagesizelimit
mail/messagesizelimit: 102400000
 This variable can be used to set the maximum size in bytes for incoming and outgoing e-mails. If the value is configured to 0 the limit is effectively removed. Please note that e-mail attachments are enlarged by approximately a third due to the base64 encoding.

root@imap:~# ucr set mail/messagesizelimit=0

(We want unlimted (the firewall before this system is making a limit)).

Results to:

/etc/postfix/main.cf  message_size_limit=0

Which means: 

(man 5 postconf)
The maximal size in bytes of a message, including envelope information is 0.

So no mail is delivered. 

Results to /var/log/mail.log:

Feb  5 13:46:03 imap postfix/local[22510]: fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit


Wish: Better description for UCR Variable, or implement 0=no limit.
Comment 3 Philipp Hahn univentionstaff 2015-03-13 11:22:31 CET
r58944 | Bug #37442 Postfix: Fix UCR variable description for maximum message size
 The UCRV descriptions have been updated.

Package: univention-mail-postfix
Version: 9.0.0-12.233.201503131109
Branch: ucs_4.0-0
Scope: errata4.0-1

r58946 | Bug #37442 Postfix: Fix UCR variable description for maximum message size YAML
 2015-03-13-univention-mail-postfix.yaml
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2015-03-23 13:18:35 CET
The description uses underscore as thousands separator. We should use no separator and give an example that the user can reuse directly:

"Standard ist 10_240_000 Byte." → s/_//
"The default is 10_240_000 byte."  → s/_/./

If an explanation is required, we can use something like this:
Standard ist 10240000 Byte (ca. 10MB).

OK: code change
REOPEN: variable description
OK: YAML
OK: functional test
Comment 5 Philipp Hahn univentionstaff 2015-03-23 13:37:10 CET
r59319 | Bug #37442 Postfix: Fix UCR variable description for maximum message size

Package: univention-mail-postfix
Version: 9.0.0-16.238.201503231328
Branch: ucs_4.0-0
Scope: errata4.0-1

r59319 | Bug #37442 Postfix: Fix UCR variable description for maximum message size YAML
 2015-03-13-univention-mail-postfix.yaml
Comment 6 Philipp Hahn univentionstaff 2015-03-23 15:31:47 CET
r59325 | Bug #37442 Postfix: Fix UCR variable description for maximum message size

Package: univention-mail-postfix
Version: 9.0.0-17.239.201503231511
Branch: ucs_4.0-0
Scope: errata4.0-1

r59326 | Bug #37442 Postfix: Fix UCR variable description for maximum message size YAML
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2015-03-24 09:39:50 CET
OK: code change
OK: variable description
OK: YAML

→ VERIFIED
Comment 8 Janek Walkenhorst univentionstaff 2015-03-25 16:43:14 CET
<http://errata.univention.de/ucs/4.0/124.html>