Generally there are many ways to check the emails in the queue on Postfix such as:-
mailq
postqueue -q
But Qshape is another very nice tool which shows the number of emails in the mail queue and which domain it is waiting to deliver by the Postfix MTA. We can check the mail queue as below:-
qshape hold
qshape active
qshape defer
qshape deferred
The above commands will display the output for the number of emails which are respectively in the hold queue, active queue, defer queue and deferred queue.
While running a command above if you get the message “Qshape not found”, that means that we need to install it on the server and we can install it with the following package:-
yum install postfix-perl-scripts
Now run the Qshape command and it’ll run and give the result.
]]>