qmHandle - a tool for the qmail queue
qmHandle is a 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.
You can print queue statistics, like qmail-qstat, with color capabilities.
You can view a message in the queue.
You can remove one or more messages from the queue based on a criterion or use multiple delete requests each having its own criterion.
Download qmHandle from SourceForge. You actually only need the script ‘qmHandle’ Upload it to the server and untar it if necessary. You may download the file directly from SourceForge using the wget command:
http://optusnet.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz
Then decompress the file using the tar command.
tar -xvzf qmhandle-1.3.2.tar.gz
First it is recommended to shutdown qmail using the service command to prevent possible corruption of the mail queue.
service qmail stop
When you are done with qmhandle be sure to start it again using the service command:
service qmail start
Use -s to see some basic statistics.
qmHandle -s
Available parameters:
-a : try to send 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
-Stext : delete all messages that have/contain text as Subject
-D : delete all messages in the queue (local and remote)
-V : print program version
Additional (optional) parameters:
-c : display colored output
-N : list message numbers only
Reference : http://sourceforge.net/projects/qmhandle/
What can I do if I am unable to start the qmail service in Plesk?
First of all, make sure that qmail is not running.
If so, try to start it from the command line.
If that does not work take a look at the /usr/local/psa/var/log/maillog logfile for helpful error messages.
Reference: http://kb.parallels.com/en/
Switch from Qmail mail server to Postfix mail server on Parallels Plesk Panel
Run the parallels_installer binary file, which is located in the directory /usr/local/psa/admin/bin/ on RPM-based Linux, FreeBSD and Mac OS systems, and /opt/psa/admin/bin/ on deb-based Linux systems.
Read the instructions displayed on the screen, and then type ‘n’ and press ENTER to continue. The Parallels Products Installer will detect your existing installation of Parallels Plesk Panel and ask if you want to upgrade it.
To confirm upgrade, type ‘y’ and press ENTER.
Specify the source of Parallels Plesk Panel distribution package.
In the components list, specify the Postfix mail server by typing is number in the list and pressing ENTER.
The selected packages are marked with [*] symbols. The packages that are already installed and do not require updating are marked with [=]symbols. To select or deselect a package, type the respective number and press ENTER.
Script for deleting all the mails in Qmail
1. create a file with the following statements, say delqmail
service qmail stop
find /var/qmail/queue/mess -type f -exec rm {} \;
find /var/qmail/queue/info -type f -exec rm {} \;
find /var/qmail/queue/local -type f -exec rm {} \;
find /var/qmail/queue/intd -type f -exec rm {} \;
find /var/qmail/queue/todo -type f -exec rm {} \;
find /var/qmail/queue/remote -type f -exec rm {} \;
service qmail start
You may also include the directories like /var/qmail/queue/mess/bounce… etc.
2. Give executable permission to this file
3. Execute the script