Add to Favourites Add to Favourites    Print this Article Print this Article

I see that some messages are staying in queue. How to force Qmail to process all messages in queue immediately ?

Symptoms:
Mail can be sent and received fine, but some messages are staying in queue:
# /var/qmail/bin/qmail-qstat
messages in queue: 37
messages in queue but not yet preprocessed: 0

What can I do?
How long the messages staying in queue before removing?

Cause:
Actually, the situation when email messages cannot be delivered to some addresses occurs often. If Qmail cannot deliver the message to the destination server for some temporarely reasons (for example connection problem), it stores the message in queue and will try to deliver it again and again during the period that is defined in /var/qmail/control/queuelifetime (by default it is set to one week).

Resolution:
You may do nothing regarding several messages in Qmail queue. At the end they will be delivered to recipients or bounced with the fatal errors after seven days.
The algorithm of mail sending attempts is hard-coded in Qmail, it cannot be modified. You can see for more details and exact values at http://www.lifewithqmail.org/lwq.html#retry-schedule

Also, you can find the reason of the mail delivery failing in $PRODUCT_ROOT_D/var/log/maillog.

If you wish to force Qmail to process mail that is staying in queue, send ALRM signal to the qmail-send process, and Qmail will try to send all messages from the queue immediately:

kill -ALRM `ps ax | grep qmail-send | grep -v grep | awk '{print $1}'`

Was this answer helpful?

Also Read