Storage, quotas and a full mailbox
Module 3: Managing your mailbox · Reading time: 9 minutes
Learning objective: After this lesson you can explain where a mailbox's storage goes, what a quota is, what a sender notices when your mailbox is full, and how to build a clean-up and archive plan that doesn't lose any mail.
Key terms: storage, quota (per mailbox and per package), usage per folder, attachments and base64, maximum message size (SIZE), warning email, 452 4.2.2 and 552 5.2.2 (mailbox full), 552 5.3.4 (message too big), cleaning up, archiving, local folder, backup
Where does the space go?
A plain text email is just a few kilobytes. You could store hundreds of thousands of those. The space is almost always used up by three things:
- Attachments. Photos, PDFs, presentations. A single message with ten phone photos can easily be 30 to 50 MB.
- Sent mail. Every attachment you send also stays in your Sent folder afterwards. If you send an 8 MB quote to five customers in five separate emails, it's stored five times.
- Trash and spam. Deleted mail stays in the Trash until you empty it. Spam stays in the spam folder until the spam filter or you clear it out. Both count towards your storage.
A fourth, hidden cause you saw in lesson 3.1: messages marked as deleted but never permanently erased.
Why an attachment becomes larger
Email was originally designed for text only. That's why an attachment (a photo, a PDF) is converted to text using base64. This converts every 3 bytes into 4 characters. So an attachment becomes roughly a third larger, and a bit more once you add in the line breaks. A 15 MB PDF on your computer becomes just over 20 MB in the email.
This matters for limits. If a recipient says "maximum 25 MB", that refers to the size of the whole message after conversion. A 20 MB attachment won't fit through any more.
Two kinds of limits
The quota: how much can you store?
A quota is the maximum storage of a mailbox. There are usually two layers:
- The mailbox itself. You can set a limit per mailbox, for example 2 GB for a general address, so one mailbox doesn't use up everything.
- The package or subscription. All mailboxes together (and with a hosting package also the website, databases and backups) share the total storage. If that's full, a generous quota per mailbox won't help any more.
With a business cloud mail service, it's often arranged per user, with a fixed amount per licence. The principle is the same.
Message size: how big can one email be?
Separately from storage, every mail server has a maximum message size. This applies both when sending (your server) and when receiving (the recipient's server). The smaller of the two determines whether it succeeds. Mail servers announce their limit at the start of the SMTP conversation using the SIZE extension (see lesson 1.2), for example 250-SIZE 52428800 (50 MB).
Common limits lie between 20 and 50 MB. Gmail, for example, allows attachments up to 25 MB to be sent; larger files are turned by Gmail itself into a link to Google Drive. Never assume a recipient can handle more than 20 MB. For large files, a download link (for example from your cloud storage) is the better choice: no limit, no duplicate storage, and you can revoke the link later.
What happens when a mailbox is full?
First you'll usually get a warning: an email from the server saying you're approaching a threshold, for example 90%. On servers running Exim (such as DirectAdmin), that's the message The size of your mailbox has exceeded a warning threshold.
If the mailbox is really full, the server refuses new mail. Whether this is temporary or permanent depends on the server:
| Response | Meaning | What the sender notices |
|---|---|---|
452 4.2.2 Mailbox full | Temporary: try again later | The sending server keeps retrying for a while (often up to a few days). If you clean up within that time, the mail will still arrive. Otherwise the sender gets a bounce. |
552 5.2.2 Mailbox full / quota exceeded | Permanent | The sender gets an immediate bounce. The mail never arrives. |
The code X.2.2 in the enhanced status codes (RFC 3463) means exactly this: "mailbox full". Module 6 goes deeper into bounces.
Note the difference with a message that's too large: 552 5.3.4 Message too big means the message is larger than the server allows. Cleaning up won't help here; the sender needs to send the file differently.
And note: you often won't notice a full mailbox yourself. You can keep sending mail and reading your old messages as normal. It's the senders who get the error message, and a customer who's had three bounces won't always phone you about it.
Cleaning up without regret
An order that almost always works:
- See where the space is. In webmail or the client panel you can often see usage per folder. Usually Sent, Trash or one old folder full of attachments is at the top.
- Empty Trash and Spam. That's the quickest win and costs nothing.
- Look for large messages. Most webmail and programs let you sort by size. Save any attachment you need in your files and delete the email, or just the attachment (Thunderbird and Apple Mail can remove an attachment from a message).
Archive old years. Mail you want to keep but rarely need can go into an archive. You have two options:
- an archive folder on the server: stays visible everywhere, but still counts towards your storage;
- a local folder on your computer (Thunderbird: Local Folders; Apple Mail: On My Mac; Outlook: a
.pstdata file). This no longer counts towards your storage, but only exists on that one computer. Make sure you back up that computer yourself. Without a backup, archiving locally is just moving everything onto a single hard drive.
- Only adjust the quota afterwards, if that's still needed and your package has room.
Large-scale clean-up with a single button in the panel (for example "delete everything older than a year in the Inbox") is convenient, but irreversible. With IMAP it also disappears immediately from all your devices. Save what you need first.
Retention obligation
In the Netherlands, businesses must keep their records for seven years (the tax retention obligation, article 52 of the General State Taxes Act, Algemene wet inzake rijksbelastingen); outside the Netherlands, check the rules of your own country. Business email can fall under this, such as quotes, order confirmations and invoices. So don't just clean those out. Put them in an archive with a backup, or keep the attachments in your records.
In practice: what this looks like in a panel
In DirectAdmin, under E-mail Accounts you'll see a Usage column per mailbox, and the total at the top. Via the three dots behind a mailbox and Change Limits, you set the quota in MB, or tick Max so the mailbox can use the free space of the package. With Purge you delete old mail from a folder in one go. In My WebOké you can see the storage used by the package. With other providers it works similarly: look for "storage", "quota" or "mailbox size" in the panel or management environment.
Summary
- Space is mainly used up by attachments, sent mail, Trash and spam.
- Attachments become roughly a third larger in an email because of base64.
- There's a quota per mailbox and a total for the package; the tightest limit applies.
- A full mailbox refuses mail: temporarily (
452 4.2.2) or permanently (552 5.2.2). The sender notices, you often don't. - Clean up in this order: check, empty Trash and Spam, large messages, archive, and only then increase the quota. A local archive needs its own backup.
Quiz
Exercise
Exercise O3.2: Measuring your storage and making a clean-up plan. Find out how much storage your mailbox uses and what the limit is (of the mailbox and of the package or subscription). Note down the three folders that take up the most space and find your ten biggest messages. Then make a clean-up plan: what will you delete, what will you archive, where will the archive be stored, and how is that archive backed up? Take into account what you're required to keep for business purposes.
Exercise O3.2: Measuring your storage and making a clean-up plan
You do this exercise yourself; no one checks it. Tick off what you've done and mark the exercise as done.
First take a look, then Trash and Spam, then large messages (keep the attachment, delete the email or attachment), then archive old years, and only then increase the quota. In an email, an attachment becomes roughly a third larger (base64: x 4/3). A local archive without a backup is on a single disk.
Your ticks and notes only stay in this browser; we don't send them anywhere. If you're signed in, we only save in My courses that you've done the exercise.
Further reading
The steps in these articles apply to WebOké's panels; with other providers it works similarly.
- DirectAdmin guide 7.3: Storage per mailbox and what happens when it's full
- Notification: Your mailbox - The size of your mailbox has exceeded a warning threshold
- Email rejected: message too big
- How do I check my email usage?
- Purge mailbox to free up space in DirectAdmin
- RFC 3463 (Enhanced Mail System Status Codes), RFC 2045 (MIME, base64), RFC 1870 (SMTP SIZE)
