Admin-Ahead Community
Linux => Control Panels => Plesk => Topic started by: Rahul Krishnan N on October 27, 2013, 01:55:22 am
-
Pros:
Read the qmail queue, like qmail-qread.
Output of qmHandle will be more robust with features such as message subject and color capabilities.
Shows the mail queue statistics, similar to qmail-qstat
Open and view a message in the queue.
Delete message from the queue.
Remove messages based on a condition.
Installation is pretty simple and there will not be any compilations.
1) Download source from
http://sourceforge.net/projects/qmhandle/files/latest/download
2) Extract
tar -xvzf qmhandle-x.x.tar.gz
3) Move the qmHandle binary to any of the $PATH location
cd qmhandle-x.x; mv qmHandle /usr/local/sbin/; chmod +x /usr/local/sbin/qmHandle
Usage:
Just executing qmHandle -h from command line will show all the available options with it.
-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
Some usage examples:
Summary of qmail queue
# qmHandle -s or qmHandle -l -c (-c turns on color)
List all emails in queue:
# qmHandle -l
To count all messages in the queue 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
Force deliver messages from queue:
# qmHandle -a
Remove messages with a particular subject
#qmHandle -S"subject"
See stats about each message in the queue
#qmHandle -l
Delete all messages in the incoming and outgoing queues
#qmHandle -D