Jump to content

Delete mail queue In Qmail

From TetraWiki
Revision as of 12:48, 18 February 2013 by Subhash (talk | contribs) (Created page with "==Objective== Sometimes we get spam issue with Qmail. In that case thousands of mail will be in queue. First stop qmail vim /etc/inittab SV:123456:respawn:/command/svsc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Objective

Sometimes we get spam issue with Qmail. In that case thousands of mail will be in queue.

First stop qmail

vim /etc/inittab

SV:123456:respawn:/command/svscanboot
# out above line end of file
init q

For get help of qmHandle

qmHandle -h


To know which user account has been compromised. this command shows which user sending maximum mail.

qmHandle -l |grep From:|sort|uniq -c|sort -nr|head

Or can use below for same purpose

qmHandle -l|less

get message ID

qmHandle -m'message ID'|less

Please check in header file which user account compromised.

Change password for it first and delete mail in queue.

You can delete mail from queue using defference option to from qmHandle -h (help)

For example

qmHandle -h'Subject: limited offer'

above command will delete all messages in queue that have Subject: limited offer


Note:-> Please never apply above commands before stop qmail(mentioned above).