Delete and clear POSTFIX queue in one line

Oftentimes, you may need to just delete all messages in queue (for example, when your script has gone mad and generated too many messages to handle, once you’ve stopped postfix). It’s quite simple, really:

postsuper -d ALL

or

sudo postsuper -d ALL

will delete all messages in all queues (or replace ALL with your required queue name).

Otherwise, man postsuper will give you more detail.

You may have to capitalize the switch (-D) depending on the age and flavour of your Postfix…

Leave a Reply

Your email address will not be published. Required fields are marked *