Question : Why is corrupted qmail queue?

Hello everybody,

What could be the reason for corrupted qmail queue?.
How do i identify a corrupted queue?
How do i identify the user sending the most of emails in my multidomain server?

Thanks in advance

Answer : Why is corrupted qmail queue?

Several questions here... why did you forget "What is the meaning of Life, The Universe, and Everything?"

One at a time:

What could be the reason for corrupted QMail Queue?
======================================

QMail Queues are not easy to corrupt -- usually, one becomes corrupt either because of drive or filesystem errors, or sudden shutdowns. The other potential cause is overly aggressive system administration.

From a "birds eye" view, the QMail Queue consists of a message header, message body, and entries for each delivery (local and remote). The delivery entries are removed once the delivery is successful, and periodically a routine called QMail-Clean runs that removes the body and header entries when all of the deliveries have been completed.

A corrupted Queue results when the header or body entries are removed before the delivery entries. Since there is no header or body to deliver, the delivery entry cannot remove itself.

How do I identify a corrupted QMail Queue?
===============================

Most QMail installations come with some type of queue management or reporting tool. The most common is the one from NetQMail 1.03, which is "qmailctl"

When you run "qmailctl queue" it should tell you the contents of the current queue. If the queue is corrupt, qmailctl will tell you as part of the output of this command. Even better, it'll tell you the message IDs that are corrupt.

If qmailctl says msgID 5551212 is corrupt, all you have to do is manually remove the entry from the queue:
 1) STOP QMail entirely (run "qmailctl stop" and wait about a minute for any existing connections to end)
 2) change directory to the queue ("cd /var/queue/qmail" -- probably not right for you, but OK for this example)
 3) remove the "bad" entries ("find . -name 5551212 -exec rm -f '{}' \;"  -- or your own command to remove all files with that messageID)
   3a) Repeat as necessary for other messageIDs that are "corrupt"
 4) restart qmail ("qmailctl start")
 5) Verify the Queue is repaired ("qmailctl queue")

How do I identify the user sending the most number of emails in my multidomain server?
==============================================================

There is no real accounting done in "standard" QMail, so you're going to be stuck looking through QMail log files. Specifically, to see outbound message logs, look in the log file for qmail-send (or if there is one separately qmail-remote).

I hope this gets you on your way! Good Luck!

Dan
IT4SOHO
Random Solutions  
 
programming4us programming4us