# Postfix: fatal: queue file write error / No space left on device (queue or /var full)

**Code:** `queue write` · **Category:** Email / SMTP · **Seen on:** Postfix, Linux

Postfix can't write to its queue directory because the disk, inode table or quota is full.

## Meaning

Free space on the filesystem holding `/var/spool/postfix` (logs, huge queue, core files), check inodes (`df -i`), clear old mail logs, and purge spam from the queue. Expand the volume and monitor free space. Restart Postfix when done.

## Common causes

- Disk or inodes full
- Huge queue from a spam flood
- Unrotated logs
- Quota on the mail spool volume
- Container volume too small

## Quick fix

1. `df -h /var; df -i /var`
2. Remove junk (logs, spam queue)
3. Extend the volume and restart `postfix`

## Detailed fix by platform

### Shell

1. 

```bash
df -h /var /var/spool/postfix
df -i /var
sudo postsuper -d ALL deferred   # only for spam floods
```


## How to diagnose

1. **Space** — Free?
2. **Inodes** — Free?
3. **Queue** — Spam flood?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/email/postfix-queue-file-write-error-disk-full)
