Jump to: navigation, search

Number of messages returned by the command qmail-qstat is higher than the command qmail-qread

Symptoms

The command

/var/qmail/bin/qmail-qstat 

shows a lot of mail in the queue

[root@MEMFE1 root]# /var/qmail/bin/qmail-qstat
messages in queue: 4025
messages in queue but not yet preprocessed: 4000

The command

/var/qmail/bin/qmail-qread 

shows only a few mail (approximately same as the difference between the messages in queue and 'messages in queue but not yet preprocessed' counts of prev command)

The load on the server is very high

Cause

The load on the server is high due to some other process.

Since the load is high, the pre-processing of the mail in queue is pending.

The qmail-qread command shows only those messages which have been pre-processed.

The qmail-qstat command reports the number of messages in qmail's queue, and of messages waiting to enter the queue.

Solution

Eliminate the reason for high load and get the load on the server down. Stop SMTP and let the queue get cleared. After the queue is cleared, restart SMTP

qmail-qstat shows a large number of mail in the queue, but qmail-qread shows a very small list

Cause1:Too much load on SMTP not giving enough capacity to the queue process Solution: Stop the SMTP service and observe the queue to see if it flushes. If it is doing than it means that the SMTP load was preventing it from functioning normally. Reduce the SMTP concurrency and restart the SMTP service. Observe closely

Cause2: The permissions of the mail in the queue may be incorrect.

Solution:

  /etc/init.d/qmail-queue stop
 cd /var/qmail/queue/
 cd mess
 chown qmailq:qmail ?/*
 chmod 644 ?/*
 chown qmailq:qmail 1?/*
 chmod 644 1?/*
 chown qmailq:qmail 2?/*
 chmod 644 2?/*
 cd ../todo
 chown qmailq:qmail ?/*
 chmod 644 ?/*
 chown qmailq:qmail 1?/*
 chmod 644 1?/*
 chown qmailq:qmail 2?/*
 chmod 644 2?/*
 cd ../intd
 chown qmailq:qmail ?/*
 chmod 644 ?/*
 chown qmailq:qmail 1?/*
 chmod 644 1?/*
 chown qmailq:qmail 2?/*
 chmod 644 2?/*
  /etc/init.d/qmail-queue start