Skip to content

fix(dovecot): exempt vmail from default quota - #342

Merged
DavidePrincipi merged 1 commit into
mainfrom
vmail-quota
Nov 11, 2026
Merged

DavidePrincipi merged 1 commit into
mainfrom
vmail-quota

Conversation

@DavidePrincipi

Copy link
Copy Markdown
Member

Public folders are stored in the mailbox of the internal vmail user, which also got the default mailbox quota. When all public folders together grew bigger than that limit, new messages for them were rejected with "Quota exceeded". NethServer/dev#8305

Now vmail has its own quota, which is unlimited by default, so the default quota limits only user mailboxes. Administrators can still limit the total size of public folders with the new DOVECOT_VMAIL_QUOTA_MB environment variable (value in MB). This is a command-line setting only, documented in the README. Installations get the fix automatically after the update.

  • reload-config adds the quota fields to the vmail line of /etc/dovecot/users when quota is enabled
  • New test cases in tests/40__api/60__dovecot.robot

How to test

  • Set a default mailbox quota, e.g. 1 MB, and create a public folder
  • Save or deliver a message bigger than 1 MB to the public folder: it is accepted
  • The same message for a user mailbox is still rejected with "Quota exceeded"
  • Run runagent -m mail1 python3 -c 'import agent ; agent.set_env("DOVECOT_VMAIL_QUOTA_MB", "60")' and runagent -m mail1 systemctl --user reload dovecot: doveadm quota get -u vmail shows a 61440 KB limit
  • Log in as master user (user*vmail): still works

Generated by Claude Code:claude-opus-5-5 with nethserver-pr

The vmail user stores all public folders, but Dovecot applied the
default user quota to it too: once public folders together exceeded
that limit, messages to them were rejected.

Give vmail its own quota, unlimited by default, set by the new
DOVECOT_VMAIL_QUOTA_MB environment variable. It applies only when the
quota plugin is enabled.

Assisted-by: Claude Code:claude-opus-5-5
@DavidePrincipi DavidePrincipi self-assigned this Nov 11, 2026
@DavidePrincipi
DavidePrincipi merged commit 4eef4e6 into main Nov 11, 2026
5 checks passed
@DavidePrincipi
DavidePrincipi deleted the vmail-quota branch November 11, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant