qmHandle is a simple program which allows you to view and manage the qmail queue.
Installation:
wget http://jaist.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz
tar xvzf qmhandle-1.2.0.tar.gz
chmod 777 qmHandle
./qmHandle –h
That will show you how to use ./qmHandle
Now, i am writing few tips how to use it.
/root/qmHandle/ -s
Messages in local queue: 0
Messages in remote queue: 484
It means 484 messages in your SMTP queue.
You can list message queues using:
/root/qmHandle -l
After a while this will show you the result, now if you can see all the messages in queue you can find our the spam emails. After finding it you may choose first few character of mail subject, an example is:
2868937 (9, R)
Return-path:
From: MAILER-DAEMON@your.servername.com
To: user@domainname.com
Subject: failure notice
Date: 22 Apr 2006 05:51:32 +0000
Size: 3161 bytes
Now, to delete all mails with subject “failure” you may use command:
/root/qmHandle -Sfailure
This will delete all emails with the Subject failure from SMTP queue. Now if any body is doing SPAM with subject “PayPal verification” you may run this command:
/root/qmHandle -SPayPal
Indeed a good tool 🙂