Deleting/viewing mail in postfix queue (mailq)

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

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please enter 10 numbers for Captcha: * Time limit is exhausted. Please reload the CAPTCHA.