Deleting mails in mailq Postfix

Howto Jun 12, 2019

List all emails from mailq
to list all emails in the queue this can be done with the commmand below

mailq
# or the command below
postqueue -p

Delete all mails in the queue
To delete quite all emails from the mailq, this can be done with the command below

postsuper -d ALL

Deleting deferred Mails Only from mailq
To delete deffered mails in Postfix mail queue you can use the command below to achieve this

postsuper -d ALL deferred

Deleting Specific emails from mailq
To delete quite specific mails to certain email address we can grep the mails and an ID will be returned which we can use the -d command to remove the mail

postqueue -p | grep "test@test.ng"
postsuper -d 0983CBFE4
#0983CBFE4 is the returned id
Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
#