Tutorials12 min read

Fix Mailbox Storage and Attachment Size Limit Problems on Custom Domains

Stop bounced attachments and storage quota errors on custom domain email with these actual fixes.

By JustEmails Platform Team

Last Tuesday, a client forwarded me a bounce message that just said "552 5.3.4 Message size exceeds fixed maximum message size." The attachment was a 22MB PDF. The limit was supposed to be 25MB. They were confused. I wasn't — I'd made the same mistake six years ago.

Here's what nobody tells you when you set up custom domain email: the "25MB attachment limit" you see advertised isn't the actual limit you can use. And when your mailbox fills up, the errors you get are cryptic at best. This guide covers both problems — attachment rejections and storage quota issues — with fixes that actually work.

We're the JustEmails team, built by Velocity Digital Labs. We run email for multiple SaaS products across custom domains, and we've debugged more "mailbox full" and "attachment too large" tickets than we'd like to admit. If you're still setting up DNS records for your domain, start with our custom domain email setup guide first.

What You'll Learn

By the end of this, you'll understand why attachments bounce when they seem small enough, how to do the math on actual usable limits, and how to catch storage problems before they bite you. Also: the specific error codes that tell you what's actually wrong—because "message rejected" tells you nothing.

Prerequisites

  • A custom domain with email already configured (SPF/DKIM/DMARC passing)
  • Access to your email provider's admin panel or webmail
  • Basic familiarity with checking bounce messages

If you're not sure your authentication is set up correctly, that's a separate problem — but it won't cause size/storage errors. Those are purely about bytes.

Part 1: Why Your "Valid" Attachment Got Rejected

The Base64 Overhead Problem

Email wasn't designed for binary files. When you attach a PDF, image, or ZIP file, your email client converts it to base64 text encoding before sending. That conversion bloats the size—roughly 33% more data.

I wish someone had explained this to me in 2019 instead of letting me bounce client emails for a month. Math time:

  • Your 20MB file becomes ~26.6MB after base64 encoding
  • A "25MB limit" actually means ~18-19MB usable
  • That 22MB PDF the client sent? It was 29MB by the time SMTP saw it

This is why the bounce happened. The advertised limit is almost never what you can actually attach.

The Safe Limits for Common Providers

ProviderAdvertised LimitActual Safe Maximum
Gmail / Google Workspace25MB~18MB
Outlook.com / Microsoft 36525MB~18MB
Yahoo Mail25MB~18MB
Zoho Mail20MB (some plans)~15MB
Proton Mail25MB~18MB

Most providers settled on 25MB because Gmail did. And Gmail picked that number because 25MB encoded fits in most SMTP implementations without choking. The actual RFC 5321 doesn't mandate a specific limit—it just requires servers to accept at least 64KB. Everything above that? Provider policy. Kind of annoying, honestly.

How to Calculate If Your File Will Fit

Quick formula: multiply your file size by 1.37 to estimate encoded size.

18MB file × 1.37 = 24.66MB (will probably pass)
20MB file × 1.37 = 27.4MB (will probably bounce)

Or just stay under 18MB for anything you expect to land reliably. Yes, that's conservative. But "my email didn't send" is worse than "I had to use a link."

Look, I know it feels dumb to be this paranoid about file sizes in 2026. It is dumb. But email protocols are old, and old things have quirks.

Part 2: Reading Bounce Messages That Actually Tell You Something

When an attachment gets rejected, the bounce message usually includes an SMTP error code. Here's how to decode them.

552 (Message size exceeded)

552 5.3.4 Message size exceeds fixed maximum message size

Your attachment (after encoding) was too big for the receiving server. This is the most common one. Shrink the file or use a cloud link.

554 (Transaction failed — often size)

554 5.6.0 Message too big for this system

Same deal, different phrasing. Some servers use 554 for size rejections instead of 552.

452 (Insufficient storage)

452 4.2.2 Over quota: recipient's mailbox is full

The person you're emailing has a full mailbox. Not your problem to fix, but you should let them know. If you're comparing providers, our JustEmails vs Google Workspace comparison breaks down how storage limits differ across platforms.

550 (Mailbox unavailable — often quota)

550 5.7.1 User over quota

Another quota rejection. The 550 code usually means the mailbox exists but can't receive mail right now.

The Tricky Ones

421 (Service temporarily unavailable)

421 4.7.0 Try again later, too many connections

This isn't storage or size — it's rate limiting or server overload. Wait 15 minutes and retry. For rate limit issues specifically, understanding return-path vs from address helps diagnose which sending identity triggers limits.

550 with "unknown user"

550 5.1.1 User unknown

The email address doesn't exist. Different problem entirely — check the spelling. For deliverability issues beyond size limits, our guide on fixing deliverability after domain purchase covers reputation and authentication problems.

Part 3: Fixing Storage Quota Problems

Storage issues creep up slowly. One day you're fine, the next day your mailbox refuses new mail.

Where Storage Actually Goes

People underestimate how fast mailbox storage fills up. Here's what eats space:

  1. Sent folder attachments — Every file you send is stored in your Sent folder. Send a 15MB PDF to 10 clients? That's 150MB in Sent alone.

  2. Drafts with attachments — Abandoned drafts with large attachments stick around forever unless you delete them.

  3. Trash and spam — Most providers don't auto-purge immediately. Your "deleted" emails still count against quota for 30 days.

  4. Email threads with replies — Every reply includes the full chain. A 10-email thread can be 10x the size of the original.

Quick Wins to Free Up Space

Delete from Sent first. Sort by size, delete the biggest 20 items. I recovered 4GB on one account doing just this. Embarrassingly simple fix after an hour of confusion.

Empty Trash and Spam. Obvious but overlooked. Especially Spam — people forget it exists until quota errors start.

Search for large attachments:

size:5m

In Gmail (or larger:5M in some clients), this finds emails over 5MB. Delete what you don't need.

Archive to local. If you need records but not active access, download the mail to a local client and delete from server. Old-school, but it works. If you're managing email across many client domains, our flat-fee vs per-mailbox pricing comparison explains why unlimited storage plans make quota management irrelevant.

Monitoring Quota Before It's a Problem

Set a calendar reminder to check storage monthly. Look for:

  • Current usage percentage
  • Rate of growth (are you using 2GB more each month?)
  • Sent folder size specifically

JustEmails shows storage usage in the account dashboard. Google Workspace shows it at drive.google.com/settings/storage (remember, Gmail shares the 15GB/30GB pool with Drive and Photos). Most providers have a similar view.

If you're hitting limits every month, stop fighting the same battle. Either offload big files to cloud links, or upgrade storage. I've seen people spend hours per week on quota management when $100/year of extra storage would solve it permanently. (Though honestly, most should just use links instead of attachments for anything over 10MB.)

For files over 15MB, skip attachments entirely. Use cloud storage links instead.

No size limits. Google Drive handles 5TB files. WeTransfer's free tier does 2GB.

Don't consume recipient storage—the file lives on your cloud, not their mailbox.

You can revoke access. Sent the wrong file? Delete or unshare the link. Can't unsend an attachment. (Ask me how I learned that one.)

Track opens. Some services show you when the link was accessed. Attachments? Fire and forget.

How to Do It Properly

Google Drive: Upload file, right-click, "Share" > "Anyone with the link." Paste the link in your email.

Dropbox: Upload, click "Copy link." The link goes in your email body.

WeTransfer: Upload at wetransfer.com, enter your email and recipient's email. They send the link for you (or give you one to copy).

OneDrive: Upload, click "Share," choose "Anyone with the link," copy and paste.

For professional correspondence, Google Drive or Dropbox links look cleaner than WeTransfer's landing pages. Personal opinion: WeTransfer's branding feels a bit cheap in B2B contexts. But it works fine for one-off large files to friends or contractors.

One thing: tell people you're sending a link. "See attached" followed by a cloud link confuses recipients who expect an actual attachment. Say "I've linked the file here: [link]" instead. Small thing, but it avoids the "where's the attachment?" reply.

Part 5: Adjusting Limits on Self-Hosted Servers

If you run your own mail server (Postfix, Dovecot, etc.), you can actually change the limits. Managed services like JustEmails, Google Workspace, or Zoho don't let you — their limits are fixed.

Postfix: message_size_limit

In /etc/postfix/main.cf:

message_size_limit = 52428800

That's 50MB in bytes. Remember the 33% base64 overhead — a 50MB limit means ~37MB actual attachments.

After changing:

sudo postfix reload

Dovecot: quota Settings

For mailbox storage limits in Dovecot:

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=10G
}

That's 10GB per mailbox. Adjust as needed.

Be Careful With Size Increases

Bigger limits mean bigger problems. A 100MB attachment limit sounds generous until someone's 100MB email clogs your mail queue for an hour. I've seen it happen. The queue backs up, delivery times spike, and you're playing whack-a-mole with stuck messages.

Most sysadmins keep limits under 50MB even when they can go higher. There's a reason for that.

And receiving servers still have their limits. You might allow 50MB outgoing, but if the recipient's server caps at 25MB, it still bounces. Large limits only help when both sides allow them—which they usually don't.

Common Errors and Fixes

"Message size exceeds maximum" when attachment is small

The email body plus all attachments plus encoding overhead must fit under the limit. If you're attaching 5 files at 4MB each, that's 20MB raw, ~27MB encoded. Even if each file alone would fit, the total might not.

"Mailbox full" on your own account

Check Sent folder size. Check Trash and Spam. Run the size:5m search and delete old large emails. If you're on a shared storage plan (like Gmail's 15GB shared with Drive/Photos), check those too.

Intermittent rejections on the same file

Some servers have dynamic limits based on load. During high traffic, they might temporarily lower limits. Try again later, or use a cloud link.

Client says "mailbox full" but they're sure it's not

Their mailbox might be fine—their server's disk might be full. Different problem, same error code. They need to contact their IT or provider. Not much you can do from your end except wait or send to a different address.

Next Steps

Now you know why attachments bounce and how to fix storage problems before they happen. The 18MB rule and checking Sent folders will save you more time than any other tips here.

For email authentication (the other half of custom domain email), our DMARC enforcement guide covers the safe path from monitoring to enforcement. Setting up for the first time? The custom domain email setup guide covers SPF, DKIM, and DMARC from scratch. And for comparing hosting costs, the true cost of Google Workspace for teams shows where hidden costs pile up. For transactional email, our SMTP vs API comparison explains when each approach makes sense.

Questions? Reach out at support@justemails.app — we've debugged a lot of weird bounce messages over the years.

Frequently Asked Questions

Why was my 20MB attachment rejected when the limit is 25MB?

Email attachments use base64 encoding, which inflates file size by about 33%. A 20MB file becomes roughly 26.6MB after encoding — over most 25MB limits. The actual safe maximum for a "25MB limit" is around 18-19MB. Most providers advertise the encoded limit, not the raw file size you can actually attach.

How do I check my remaining mailbox storage quota?

Check your email provider's webmail interface or admin panel — most show used vs. available storage. In IMAP clients like Thunderbird, right-click the account and look for "Properties" or "Quota." For Gmail, check storage at drive.google.com/settings/storage. If you're hitting limits frequently, delete large attachments from Sent folders — people forget those count against quota too.

What SMTP error codes indicate storage or size problems?

552 means message size exceeded — your attachment is too large. 452 indicates insufficient storage on the receiving server — their mailbox is full. 554 with "message too big" is another size rejection. 550 with quota references means the recipient's mailbox is over capacity. Check the full bounce message for specifics; the numeric code alone doesn't always tell the whole story.

Can I increase attachment size limits on my custom domain?

Depends on your email provider. Self-hosted servers (Postfix, Dovecot) let you configure message_size_limit and mailbox_size_limit directly. Managed providers like JustEmails, Google Workspace, or Zoho have fixed limits you can't change. For consistently large files, cloud storage links are the real solution — services like Google Drive, Dropbox, or WeTransfer bypass email size limits entirely and don't consume recipient storage.


Try JustEmails

Unlimited custom domain email hosting for $49/year flat—unlimited domains, unlimited mailboxes, 10 GB storage (expandable), full IMAP/SMTP. Built for agencies, freelancers, and anyone managing email across multiple domains.

Start your 7-day free trial → · How it compares

Related posts