Bootstrap FreeKB - Postfix (Email) - List emails in mail queue using the postqueue command
Postfix (Email) - List emails in mail queue using the postqueue command

Updated:   |  Postfix (Email) articles

The postqueue -p command can be used to list the emails in the mail queue. More than once, I had a lot of emails building up in the mail queue due to an authentication failed issue when attempting to relay emails through SendGrid.

~]$ postqueue -p | head
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
E7EAB8EB554     1149 Tue Feb 21 02:10:01  john.doe@example.com
(host smtp.sendgrid.net[167.89.115.53] said: 550 Unauthenticated senders not allowed (in reply to MAIL FROM command))
                                         john.doe@example.com

E7F4C8D70FC     1149 Tue Feb 21 05:41:01  john.doe@example.com
(host smtp.sendgrid.net[167.89.115.53] said: 550 Unauthenticated senders not allowed (in reply to MAIL FROM command))
                                         john.doe@example.com

-- 1370 Kbytes in 673 Requests.

 

The postqueue -f command can be used to attempt to redeliver the emails in the mail queue.

postqueue -f

 

Or the postfix flush command can be used.

postfix flush

 

Or the sendmail -q command can be used.

sendmail -q

 

The postsuper -d ALL command can be used to permanently delete the emails in the mail queue.

~]$ sudo postsuper -d ALL
postsuper: Deleted: 7519 messages

 

deferred can be used to only delete emails that are flagged as deferred.

sudo postsuper -d ALL deferred

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 05c3c7 in the box below so that we can be sure you are a human.