Postsuper: Mass Deletion of Emails in the Queue
Introduction
Postsuper is a Postfix utility that allows you to delete emails in the queue. I needed it to delete around 40,000 emails that were error messages from the MAILER-DAEMON user, with approximately 300 emails in the batch that needed to be delivered.
Complete Deletion
To delete all emails in the queue:
Partial Deletion
To delete all emails from the MAILER-DAEMON user, here's the script (replace MAILER-DAEMON with another name if needed):
Or alternatively, here's another example: