Skip to content

Email

Mailbox quota and Maildir

Learn how Maildir storage, Trash, and per-mailbox limits affect the space your email can use.

Updated Aug 29, 20263 min read9 reads
Mailbox quota and Maildir
How mailbox quota works with Maildir on disk

Mailbox quota is the disk limit on one email account. On our shared hosting, each mailbox is stored as a Maildir under your home directory, so every message is a separate file. When that limit is reached, new mail can bounce even if the website still loads. Understanding Maildir and how DELETE really works helps you free space without guessing.

Where mailbox files live

cPanel keeps mail under ~/mail/domain/user in Maildir layout. You will see folders such as cur, new, and tmp, plus other folders as dotted names. Because each message is its own file, a mailbox with hundreds of thousands of messages can feel slow even when the rest of the account is fine. IMAP search and backups both walk that tree, so a very large inbox costs time as well as space.

bash
du -sh ~/mail/example.com/user 2>/dev/null || true

Run that from SSH or Terminal in cPanel if you have shell access. If du looks large while Email Accounts still shows a small used size, check Trash and folders your client never subscribed to. The du number is real disk use. The figure in Email Accounts is quota accounting, and it can lag until deleted mail is fully expunged.

Why quota does not drop after you delete

Many IMAP clients treat DELETE as a move into Trash rather than an immediate wipe. The files stay on disk until Trash is emptied or the client expunges. Until then, mailbox quota does not fall and backups stay large. In Roundcube, empty Trash from the interface. In a desktop or phone app, use the expunge or “purge deleted” option if it offers one.

Also watch for clients that keep Sent both locally and on the server, or filters that copy every message into two folders. That doubles disk use without any extra “new” mail. Roundcube → Settings → Folders shows what actually exists on the server. A phone that never subscribed to Sent does not prove Sent is empty.

Set limits and clean up safely

Even when a mailbox is set to unlimited, its mail still counts against the account disk. If the account disk fills, new mail can bounce while the site still responds, which often looks like “email is down.” Prefer a clear per-mailbox quota so one inbox cannot consume the whole account.

Empty Trash first, then archive old years off the server if you still need them. Do not leave years of mail sitting in Inbox only because you might need a message someday. A multi-gigabyte inbox is usually a filing problem: too many messages left on the server long after they stopped being day-to-day mail.

To verify a cleanup, run du on the Maildir again, check used space in Email Accounts, empty Trash, and send a test message. If disk use is still huge, fix folder copies and client sync settings before you assume the disk or quota system is wrong. Backing up a very large Maildir is slow because it is a large tree of files, not because backups are broken by default.

Share

Send this article

Need someone else to do this? Send them the link — the commands are in the article.

Tagged

Was this article helpful?

Be the first to rate this article.