↑ ↓ select, Enter open, Esc close

Delete all deferred mail from the Postfix queue

root@server
postsuper -d ALL deferred

Removes all messages that Postfix has deferred after failed delivery attempts. Typically used after a spam wave from a hacked account whose messages are now piling up in the queue. Legitimate mail that has not been delivered yet is lost as well.

Note: Fix the cause first (change the password, remove the script), otherwise the queue fills up again immediately.

Also searched as

  • clear mail queue full of spam
  • postfix delete deferred queue
  • remove all stuck emails

Related one-liners

All in Mail

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.