Networking HowTos
Networking HowTos

Flush the Postfix mail queue to force retry

April 5, 2012 Linux

Typically if a mail server can’t connect to a remote mail/SMTP server, it will keep the email in a queue and periodically retry sending the email until it is either successful, or fails after a specific time frame which set in the mail server configuration.
This tip shows you how to flush the Postfix mail queue, which will retry any emails that are waiting to send, or waiting to be resent (due to errors such as DNS resolution, or connectivity problems).
The “postqueue” command outlined below allows you to force a retry on these emails.

postqueue -f

-f = Flush the queue: attempt to deliver all queued mail.
To view any emails that are in the queue, you can use the “postqueue -p” command, which is outlined in more detail on the article titled “View the Postfix mail queue“.

You Might Also Like