• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to flush Postfix Mail Queue

Written by Rahul, Updated on September 27, 2019

Questions:- How do I flush Postfix mail queue? How to remove emails from mail queue in Postfix? Postfix flush mail queue? Postfix remove differed emails from the queue? Postfix empty the mail queue command line?

This article will help you for flush or clear or delete emails from Postfix mail queue. This will also help you to delete emails from single mail queue or any specific email.

List All Emails

To list all mail of queue, use one of the following commands.

postqueue -p

Flush All Emails

To delete or flush all emails from Postfix mail queue using the following command.

postsuper -d ALL

Flush Deferred Mails Only

You can only delete all deferred emails only from the mail queue. Use the following command to delete deferred emails from the queue.

postsuper -d ALL deferred

Remove Specific Email

If you want to remove any specific email. Use the following command to remove specific emails only. First search the ID of that email like below command

postqueue -p | grep "[email protected]"

056CB129FF0*    5513 Sun Feb 26 02:26:27  [email protected]

Now delete the mail from mail queue with id 056CB129FF0.

postsuper -d 056CB129FF0

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

7 Comments

  1. Avatar Jeff Reply
    October 2, 2019 at 2:44 am

    This is currently the top google hit for ‘flush postfix’. Congrats!

    Unfortunately the command listed under the ‘Flush All Emails’ header actually deletes all emails. The correct command is ‘postfix flush’.

  2. Avatar Us3r Reply
    June 4, 2019 at 2:20 pm

    you should differ between flush and delete

    Send immediately with Flush
    postqueue -f

    Delete mail
    postfix -d

  3. Avatar Rajat Reply
    February 5, 2018 at 12:51 pm

    My Nagios server gone mad and sends thousands of emails. Thanks you for your tutorial. Only 300 approx emails in my inbox and I flushed remaining in queue.

  4. Avatar Zagz.com Reply
    January 10, 2018 at 2:16 pm

    Thanks – I had two bounce messages stuck in the queue that I’ve now deleted

  5. Avatar anon Reply
    December 25, 2017 at 6:50 pm

    postuser is not a command.

    • Rahul Rahul K. Reply
      December 27, 2017 at 3:21 am

      Thanks for pointing out. I have corrected command. It’s postsuper.

  6. Avatar Mahesh Reply
    September 27, 2017 at 6:18 pm

    Thanks, it worked for me.

Leave a Reply Cancel reply

Popular Posts

  • How To Install Python 3.9 on Ubuntu 20.04 5
  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy