Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Manage Qmail Queue using qmHandle Tool  (Read 4262 times)

0 Members and 1 Guest are viewing this topic.

rohitj

  • Guest
Manage Qmail Queue using qmHandle Tool
« on: October 26, 2013, 03:49:16 pm »
Manage Qmail Queue using qmHandle Tool

qmHandle is the best tool which can be used to manage the qmail message queue. It’s written in Perl (so fully customizable) and has more features than qmail-qread and qmail-qstat.

Download qmHandle installation file.

===========
wget http://sourceforge.net/projects/qmhandle/files/latest/download
===========

Unzip the tar file and install the script using the following command.

tar -xvzf qmhandle-x.x.tar.gz
Navigate to the installation directory, move qmHandle to /usr/local/sbin, and then give it executable permission. Thats it.

cd qmhandle-x.x.x
mv qmHandle /usr/local/sbin/
chmod +x /usr/local/sbin/qmHandle
You will be able to see a number of options using qmhandle -h

Some important commands are listed below.

Summary of qmail queue

[root@server ~]# qmHandle -s
Total messages: 225
Messages with local recipients: 0
Messages with remote recipients: 225
Messages with bounces: 0
Messages in preprocess: 0

or

qmHandle -l -c (-c turns on color)

List all emails in queue:

qmHandle -l

To list all the messages in the queue counting the number of messages with the same subject

qmHandle -l | grep Subject |sort | uniq -c | sort – n

Show email no N from queue:

qmHandle -mN

Delete email no N from queue:

qmHandle -dN

Show remote emails from queue:

qmHandle -R

Delete all messages from queue :

qmHandle -D

Try to force deliver messages from queue:

qmHandle -a

To remove messages with a particular subject

qmHandle -Ssubject