On Wed, 16 Feb 2000, Steve Belt wrote:
> when I run qmail-qstat, it says there are 2 messages in the queue.
> When I rung qmail-qread, it shows no messages.
>
> Do I have a problem? How do I investigate this? I have read the FAQ - is
> there a tool / doc for montoring and maintaining queues?
The long explanation:
qmail-qstat is a shell script that counts the number of files in the
/var/qmail/queue/mess and /var/qmail/queue/todo directories.
The number of files in the mess directories indicate the number of
messages in the queue. The number of files in the todo directory
indicates the number of messages that have not been preprocessed.
qmail-qread examines the files in the /var/qmail/queue/info,
/var/qmail/queue/local and/or /var/qmail/queue/remote directories to
determine where the messages came from and where they are going to.
These files are created by qmail-send, once it has preprocessed the
message (based on the corresponding todo file).
If there are NO files in the info directories, then qmail-qread assumes
there are NO messages to worry about - even if there ARE files in the
/var/qmail/queue/mess directories. If this is the case, then you have a
corrupted queue and you get conflicting results from qmail-qstat and
qmail-qread.
How does this happen? qmail-queue is responsible for placing the
messages in the queue directories. Under certain conditions it can
leave the queue in a corrupt state. One such example is when one of
either the sender or recipient evelope addresses is greater than 1002
characters. If this is the case then qmail-queue will leave the
following files in the queue and exit with a status of 54:
/var/qmail/queue/intd/227864
/var/qmail/queue/mess/3/227864
There is NO todo file but there is a mess file. qmail-qstat will show
1 message in the queue but qmail-qread will not show anything.
There may be other conditions under which qmail-queue will corrupt the
queue hierarchy, but I haven't discovered them yet (I'm writing a
qmail-queue wrapper, and the condition I've described above has come
up in my testing).
There are other ways the queue hierarchy may be corrupted, eg system
crashes during qmail-queue's operation etc etc.
Anyway, that explains why you see what you're seeing.
Others have suggested using the qmail-fix tool to fix the queue.
Regards
Peter
----------
Peter Samuel [EMAIL PROTECTED]
Technical Consultant or at present:
eServ. Pty Ltd [EMAIL PROTECTED]
Phone: +61 2 9206 3410 Fax: +61 2 9281 1301
"If you kill all your unhappy customers, you'll only have happy ones left"