Quotas
Applies to: SimpleTwo 1.0, directory 1.3.16 and later · Checked: 29.10.2026
A quota is a template. A template says how much a person may keep and the largest thing they may put — in each service on its own:
| Service | How much to keep | The largest item |
|---|---|---|
| the mailbox's size | a message the person sends | |
| Chats | every file the person uploaded to chats | a file |
| Files (drive) | the drive space | a file |
An empty field is no limit. The templates and who has which are kept by the directory: a template is a policy object, as a Group Policy is in Active Directory. Each service reads its own part in the directory itself — every five minutes — and counts what is used itself.
Who a template is given to
A template is given to the organisation (everybody who gets no other has it), a department, a directory group, or a person — on their card; a shared mailbox by its address.
A person's template is named in their account: given at creation or on their card (Users → Edit → Quota template) and gone with the account, so a login made again does not inherit the previous one's quota.
The nearest to the person wins:
- the template given to the person;
- otherwise their groups' or department's. Where there are several, the one with the smaller order wins — as a Group Policy's link order, 1 the strongest;
- otherwise the organisation's;
- otherwise no limit.
A template sets all three services at once: a person gets them from one template, not assembled from several.
What happens over a quota
- Mail. New mail to a mailbox over its size is refused (
552 5.2.2), and a message larger than allowed is not sent (552 5.3.4,tooLargein JMAP). Mail programs see the attachment limit beforehand: three quarters of the message size, because base64 makes attachments larger. - Chats. A file larger than allowed is not uploaded (
too_large), nor is one that does not fit into the room left (quota_exceeded). Writing, reading and downloading are not limited. - Files. An upload into a space with no room does not start (
quota_spent), nor does a file over the limit (too_large); both refusals come when the upload opens, on the declared size, not after the bytes have been sent. The template's quota applies to the personal space; a group space's quota is set on the console's Files tab (files). The role's own ceiling on one file is 2 GB (DRIVE_MAX_UPLOAD_MB); a template can only lower it.
Nothing is deleted to make room. Attachments in chats are not deleted with their message, so a person out of room in chats is given more by the administrator — a larger template.
A quota lowered below what a mailbox already holds deletes nothing: new mail to it is refused until it is under.
The chat server has its own limit on one file for everybody, MSG_MAX_UPLOAD_MB (50 MB by
default). A template can only lower it: when a template's largest file is larger, the server's
limit applies. The card says for how many people that is so.
Large attachments — through the drive
Apart from the quotas, an organisation sets how large a file a chat and an e-mail carry themselves; anything larger the apps put on the drive and send as a file card:
-
a chat's file goes into the room's space on the drive (not the sender's own quota); the chat's people see it through the directory's dynamic group «members of the chat»: whoever joins sees it, whoever leaves does not;
-
an e-mail's file goes into the sender's home (the «Attachments» folder), and the recipients open it by a link, even without access to the sender's drive.
-
Where. The installation's default is Chats → Large attachments: a chat's file (MB), an e-mail's attachments together (MB), the drive link's life (days, 0 — as long as the file is there), a public link for e-mail recipients outside the organisation. An organisation's own is on its row in Organisations and domains («Chat file, MB», «E-mail attachments, MB»); blank — the installation's.
-
When it holds. Chats, mail and the drive read the limit in the directory every minute — no restart.
-
Past the apps a file over the limit is refused: chats answer «too_large», mail
552 5.3.4/ JMAPtooLarge, with a sentence saying such a file goes through the drive. Inbound mail keeps its rules. -
Moving from Telegram. Files the migration tool left as a link to Telegram are put into the room's space on a later run with
chats.drive_files, and the message's line becomes the file's card. -
Outside. A link for a recipient outside the organisation is made only when the public link is on here and the drive's links policy allows sharing outside; it lives no longer than that policy says.
-
A chat's limit is held to the installation's ceiling (
MSG_MAX_UPLOAD_MB); in a secret chat a file over the limit is not sent — the drive would keep it in the clear.
Where it is set
Console → Settings → General → Quotas.
- Add a template — a new row; give its name and sizes (the mailbox and the space in GB, the
largest items in MB). GB and MB are decimal: 1 GB = 1,000,000,000 bytes, as iPhone, Android and
Finder show; the clients and the variables
DRIVE_DEFAULT_QUOTA_GB,DRIVE_MAX_UPLOAD_MB,MSG_MAX_UPLOAD_MBcount the same way. - The organisation's template — the template for everybody.
- Below — the templates given to departments and groups, with their order, and to shared mailboxes (by address); people with a template of their own are listed there too, and it is given on their card.
- Save the quotas. The directory keeps the templates and who has which; each service reads its part within five minutes — the same way it learns that somebody joined or left a group.
A template given to somebody (on a person's card included) is not removed: give them another first.
How to check
- Under the card: which revision each service read from the directory and when (or why it could not), and how many mailboxes and people are over.
- What one person gets — by login or a shared mailbox's address: what they get in each service, from where (their own, a group, a department, the organisation, the shared mailbox) and how much is used.
- The mail cluster's
/healthzhasquota: how many mailboxes the last pass changed and how many are over their size.
If the directory does not answer, a service keeps the quotas it read last and says so under the card. Without the directory no quota is lifted or replaced by the organisation's template.
Moving from 0.x
The migration tool upgrade1 carries the templates into the directory. The organisation's template
becomes the template given to everybody; the groups' get an order, the more generous the stronger.
A person in several groups used to get, in each service, the most generous of their groups'
templates; now they get the strongest link's. The tool's plan names everybody for whom that changes
something, service by service: give them a template of their own to keep what they had. A person's
own template is rewritten through the coordinator, so the tool runs with --coordinator.