Postfix stores mails in a queue before sending it. Postfix has a command line called ‘postsuper’ which can be used to delete unsent mail from the queue. Before removing mail from the queue it is good idea to list all mail in the queue.
List all of the mail which is in the queue.
Code:
mailq
View the contents of a specific message.
Code:
postcat -q MESSAGE_ID
Remove a message from the “mailq”.
Code:
postsuper -d mailID
where mailID is the ID of the mail in the mail queue.
Delete all queued mail from the mailq.
Code:
postsuper -d ALL