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
which qmHandleIf qmHandle is not installed you will receive the message "no qmHandle in..."
Install qmHandle
- Grab the installation using the Linux command::wget and extract it with the Linux command::tar
wget http://voxel.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gztar -xvzf qmhandle-1.3.2.tar.gzEnter the installation directory, move qmHandle to /usr/local/sbin, and then mark it executable with Linux command::chmodcd qmhandle-1.3.2mv qmHandle /usr/local/sbin/chmod +x /usr/local/sbin/qmHandleqmHandle Usage
- Get a listing of the options for this program using the following command
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 versionGet a summary of the Qmail queueqmHandle -l -c (-c turns on color, which makes things easier to read)
qmHandle -l
qmHandle -m[message_number]
qmHandle -S"subject text"Delete all messages in the incoming and outgoing queuesqmHandle -D
qmHandle -a