Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Mail Servers»Postfix»How to flush Postfix Mail Queue

    How to flush Postfix Mail Queue

    By RahulFebruary 27, 20151 Min ReadUpdated: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?

    Advertisement

    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
    

    mail Postfix postqueue postuser
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Postfix: Sending Emails From External SMTP Servers

    Postfix: Sending Emails From External SMTP Servers

    Postfix: Configure SASL Authentication for Remote SMTP

    Postfix: Configure SASL Authentication for Remote SMTP

    Postfix: Relay Email from SMTP based on From Address

    Postfix: Relay Outgoing Emails Based On Sender Address

    View 7 Comments

    7 Comments

    1. Jeff on October 2, 2019 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’.

      Reply
    2. Us3r on June 4, 2019 2:20 pm

      you should differ between flush and delete

      Send immediately with Flush
      postqueue -f

      Delete mail
      postfix -d

      Reply
    3. Rajat on February 5, 2018 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.

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

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

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

      postuser is not a command.

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

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

        Reply
    6. Mahesh on September 27, 2017 6:18 pm

      Thanks, it worked for me.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.