Queue management, one of the areas that needs to be monitored on a Postfix mail server, is one of the management interfaces that should be known for solving problems such as delayed mail delivery
that arise on mail servers. In this article, I will talk about a few code blocks that may come in handy when issues arise.
Here are some features of postqueue, the Postfix mail queue management interface.
To see how many emails are in the mail queue
postqueue -pThis command prints to the screen in a readable format the emails being processed or waiting on your server.
Example output
A0A563005B5* 599 Fri Nov 13 14:43:48 mail@sanalsantral.org
mail@enisozgen.com
– 0 Kbytes in 1 Request.To force re-sending of emails in the queue
The operation of sending emails that have accumulated in the queue after making any change on the server.
postqueue -fDeleting emails in the queue
Can be used when too many emails have accumulated in the mail queue, at the risk of possible issues.
postsuper -d ALLTo delete emails from a specific sender in the queue
With this command, you can also manually delete the emails of a user causing problems on your server.
mailq | tail -n +2 | grep -v ‘^ (’ | awk ‘BEGIN { RS = “” } { if ($8 == “USER@EXAMPLE.COM” && $9 == “”) print $1 } ’ | tr -d ‘!’ | postsuper -d -To view the advanced queue settings of your configured server
With this command, you can view the settings that come as default in your configuration or that you have configured, more conveniently than from main.cf or master.cf.
postconf -d | grep queue
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!