Small blog about system administration.

Clear email queues with qmHandle

Download qmHandle from SourceForge. You actually only need the script 'qmHandle' so use that if you have it handy. Upload it to the server and untar it if necessary. You may download the file directly from SourceForge using the wget command:

# wget

Then decompress the file using the tar command:

# tar -xvzf qmhandle-1.3.2.tar.gz

First it is recommended to shutdown qmail using the service command to prevent possible corruption of the mail queue:

# service qmail stop

When you are done with qmhandle be sure to start it again using the service command:

# service qmail start

qmHandle can show it's own options when run without a flag:


qmHandle v1.3.2 Copyright 1998-2003 Michele Beltrame 
Available parameters: 
-a : try to send queued messages now (qmail must be running) 
-l : list message queues 
-L : list local message queue 
-R : list remote message queue 
-s : show some statistics 
-mN : display message number N 
-dN : delete message number N 
-Stext : delete all messages that have/contain text as Subject 
-D : delete all messages in the queue (local and remote) 
-V : print program version 

 Additional (optional) parameters: 
-c : display colored output 
-N : list message numbers only (to be used either with -l, -L or -R) 
You can view/delete multiple message i.e. -d123 -v456 -d567

No comments :

Post a Comment