How to check how many messages are there in the mail queue?
For Qmail use the following command:
/var/qmail/bin/qmail-qstat messages in queue: 58 messages in queue but not yet preprocessed: 1
There are 58 messages in queue. Most probably they cannot be delivered right now for some reasons. And one message was received for delivery via SMTP but haven't been processed and put in queue for delivery.
For Postfix either of the following commands may be used:
# mailq | grep Requests -- 4 Kbytes in 2 Requests. # postqueue -p | tail -n 1 -- 4 Kbytes in 2 Requests.
The above output means there are 2 messages in the queue.