qmHandle is a tool which can be used to manage the qmail message queue.
- Check if qmHandle is already installed on the VPS using the Linux command::which
- If qmHandle is not installed you will receive the message "no qmHandle in..."
which qmHandle
Install qmHandle
- Grab the installation using the Linux command::wget and extract it with the Linux command::tar
- Enter the installation directory, move qmHandle to /usr/local/sbin, and then mark it executable with Linux command::chmod
wget http://voxel.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz
tar -xvzf qmhandle-1.3.2.tar.gz
cd qmhandle-1.3.2
mv qmHandle /usr/local/sbin/
chmod +x /usr/local/sbin/qmHandle
qmHandle Usage
- Get a listing of the options for this program using the following command
- Get a summary of the Qmail queue
- To see stats about each message in the queue
- To see a particular message
- To remove all messages matching a certain subject from the queue use the following command
- Delete all messages in the incoming and outgoing queues
- To re-process the queue
qmHandle
-a : try to send all 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
-fsender : delete message from sender
-f're' : delete message from senders matching regular expression re
-Stext : delete all messages that have/contain text as Subject
-h're' : delete all messages with headers matching regular expression re (case insensitive)
-b're' : delete all messages with body matching regular expression re (case insensitive)
-H're' : delete all messages with headers matching regular expression re (case sensitive)
-B're' : delete all messages with body matching regular expression re (case sensitive)
-t're' : flag messages with recipients in regular expression 're' for earlier retry (note: this lengthens the time message can stay in queue)
-D : delete all messages in the queue (local & remote)
-V : print program version
qmHandle -l -c (-c turns on color, which makes things easier to read)
qmHandle -l
qmHandle -m[message_number]
qmHandle -S"subject text"
qmHandle -D
qmHandle -a