Install qmHandle

    1. 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.gz

    1. Enter the installation directory, move qmHandle to /usr/local/sbin, and then mark it executable with Linux command::chmod

cd qmhandle-1.3.2mv 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

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

    • Get a summary of the Qmail queue

qmHandle -l -c (-c turns on color, which makes things easier to read)

    • To see stats about each message in the queue

qmHandle -l

    • To see a particular message

qmHandle -m[message_number]

    • To remove all messages matching a certain subject from the queue use the following command

qmHandle -S"subject text"

    • Delete all messages in the incoming and outgoing queues

qmHandle -D

    • To re-process the queue

qmHandle -a