452 Insufficient Storage — Mailbox Full
症状
- Emails to a specific recipient bounce with "452 4.2.2 Mailbox full" or "552 5.2.2 User exceeds storage allocation"
- The bounce is recipient-specific — other addresses at the same domain accept mail fine
- Non-delivery report (NDR) in the sender's inbox includes the 452 or 552 code
- The delivery failure is temporary (4xx) — Postfix will retry for up to 5 days by default
- On self-hosted servers: `df -h` shows the mail partition at or near 100% capacity
- The bounce is recipient-specific — other addresses at the same domain accept mail fine
- Non-delivery report (NDR) in the sender's inbox includes the 452 or 552 code
- The delivery failure is temporary (4xx) — Postfix will retry for up to 5 days by default
- On self-hosted servers: `df -h` shows the mail partition at or near 100% capacity
根本原因
- Recipient's individual mailbox has reached its configured quota limit
- The mail server's disk partition that stores mailboxes is full (affects all users)
- Recipient has not cleaned their inbox and has a very small quota (e.g., 1GB free tier)
- Forwarding loop or mailing list explosion filling the mailbox faster than quota allows
- Attachment-heavy email threads consuming quota rapidly without archiving
诊断
**Step 1 — Distinguish 452 from 552**
- `452 4.2.2` is a **soft bounce** (4xx) — temporary, your MTA will retry
- `552 5.2.2` is a **hard bounce** (5xx) — permanent, stop retrying immediately
Some servers use 452 initially (to preserve the queue) then escalate to 552 after extended retries. Treat both as a quota problem.
**Step 2 — Verify the bounce code in your mail logs**
```bash
# Postfix
grep 'status=bounced' /var/log/mail.log | grep '452\|552' | tail -20
# Or inspect the bounce NDR message returned to the sender
# Subject line will be: Undelivered Mail Returned to Sender
```
**Step 3 — If you administer the receiving server, check disk and quota**
```bash
# Check disk usage of mail partition
df -h /var/mail
# Check individual mailbox size (Dovecot + Maildir)
du -sh /var/mail/vhosts/example.com/user/
# Check Dovecot quota for a user
doveadm quota get -u [email protected]
```
- `452 4.2.2` is a **soft bounce** (4xx) — temporary, your MTA will retry
- `552 5.2.2` is a **hard bounce** (5xx) — permanent, stop retrying immediately
Some servers use 452 initially (to preserve the queue) then escalate to 552 after extended retries. Treat both as a quota problem.
**Step 2 — Verify the bounce code in your mail logs**
```bash
# Postfix
grep 'status=bounced' /var/log/mail.log | grep '452\|552' | tail -20
# Or inspect the bounce NDR message returned to the sender
# Subject line will be: Undelivered Mail Returned to Sender
```
**Step 3 — If you administer the receiving server, check disk and quota**
```bash
# Check disk usage of mail partition
df -h /var/mail
# Check individual mailbox size (Dovecot + Maildir)
du -sh /var/mail/vhosts/example.com/user/
# Check Dovecot quota for a user
doveadm quota get -u [email protected]
```
解决
**Fix 1 — As the sender: notify via another channel**
You cannot force the recipient to clear their mailbox. Contact them through phone, Slack, or another email address and ask them to free up space.
**Fix 2 — As the sender: shorten retry window for time-sensitive mail**
```ini
# /etc/postfix/main.cf
# Reduce retry window for messages older than 4 hours (transactional email)
bounce_queue_lifetime = 4h
maximal_queue_lifetime = 5d # default for other mail
```
**Fix 3 — As the mail admin: increase the user's quota**
```bash
# Dovecot — update quota in userdb or SQL quota table
# Example: raise to 10GB in /etc/dovecot/users
[email protected]:{PLAIN}password::::quota_rule=*:storage=10G
# Reload Dovecot to apply
sudo systemctl reload dovecot
```
**Fix 4 — As the mail admin: free up disk space**
```bash
# Find largest mailboxes
du -sh /var/mail/vhosts/*/* | sort -rh | head -10
# Clean mail logs older than 30 days
find /var/log -name 'mail.log*' -mtime +30 -delete
```
You cannot force the recipient to clear their mailbox. Contact them through phone, Slack, or another email address and ask them to free up space.
**Fix 2 — As the sender: shorten retry window for time-sensitive mail**
```ini
# /etc/postfix/main.cf
# Reduce retry window for messages older than 4 hours (transactional email)
bounce_queue_lifetime = 4h
maximal_queue_lifetime = 5d # default for other mail
```
**Fix 3 — As the mail admin: increase the user's quota**
```bash
# Dovecot — update quota in userdb or SQL quota table
# Example: raise to 10GB in /etc/dovecot/users
[email protected]:{PLAIN}password::::quota_rule=*:storage=10G
# Reload Dovecot to apply
sudo systemctl reload dovecot
```
**Fix 4 — As the mail admin: free up disk space**
```bash
# Find largest mailboxes
du -sh /var/mail/vhosts/*/* | sort -rh | head -10
# Clean mail logs older than 30 days
find /var/log -name 'mail.log*' -mtime +30 -delete
```
预防
- Set up quota warnings at 80% and 95% so users get advance notice before hitting the limit
- Configure Postfix to send bounce notifications to administrators as well as the original sender
- Monitor disk usage of your mail partition with a cron alert at 80% capacity
- For transactional systems, distinguish 4xx (retry) from 5xx (suppress) in your bounce handling logic — don't suppress on 452
- For SaaS email providers, configure webhook-based bounce processing to update your database in real time
- Configure Postfix to send bounce notifications to administrators as well as the original sender
- Monitor disk usage of your mail partition with a cron alert at 80% capacity
- For transactional systems, distinguish 4xx (retry) from 5xx (suppress) in your bounce handling logic — don't suppress on 452
- For SaaS email providers, configure webhook-based bounce processing to update your database in real time