Postfix Flush Deferred Email Queue

Some people try to test out an application, a site, a contact form and may use an email like that would never be delivered by the local email delivery system and would be in the queue forever, or until it is deleted.

Here’s a trick to delete such emails from postfix. Similar commands may be available with other similar tools too.

# to see the mail queue
postqueue -p
# to delete all the deferred emails
postsuper -d ALL deferred

# verify that queue is empty
postqueue -p
# for more info, check out the *man* pages of these commands


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s