Managing Postfix's Mail Queue on a VPS
Postfix is great for sending / receiving mail on a server, but the time will come that you need to manage your mail queue. If you're using Plesk, you can use the Plesk mail queue interface. If you're not using Plesk, or you prefer to use the command line, there are some other great ways to manage your queue.
View the Queue
This command will display the contents of the mail queue, including the mail ID, sender, receiver, and current disposition.
postcat -vq <MESSAGEID>
This command will display details of the specific message; this is useful for determining if the mail was sent via a script. You may see a header like X-PHP-Originating-Script that will help you with that.
Deleting Messages from the Queue
You can delete individual messages from the queue with the built in commands:
postsuper -d <MESSAGEID>
This will delete the specified MESSAGEID from the queue.
You can also use the script from this excellent blog post to delete multiple messages at once.
Processing the Queue Manually
If you're certain you've fixed any deliverability issues, you can process the entire queue with:
- 0 Users Found This Useful