qfixq

The qfixq script is something I wrote out of frustration because there was no
way to effectively repair a qmail queue when it becomes corrupted. I grew tired
of having to delete the queue and do "make setup" in the qmail source to
re-create it- too many users were losing messages, including myself.

I started looking at how the queue itself is built inside. By studying the queue directories and the source code of the programs which manipulate the queue, I
eventually reached the point where I understood its structure well enough to try
and write a tool to repair a queue which had sustained damage, saving whatever
could be saved and deleting the rest.

http://qmail.jms1.net/scripts/qfixq.shtml

