Archive for the ‘qmail’ category

Delete/Empty Qmail of all mail

February 14th, 2012

IF qmail gets full of mail a quick/simple way to delete it all is the following:

  1. Stop qmail
  2. go to cd /var/qmail/queue
  3. Type: find intd todo local remote mess info bounce -type f -print |xargs rm
  4. Once done start qmail again
if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Qmail – Check the mailq

September 30th, 2010

To check the mailq for QMail you need to download the following program:

qmhandle

Once on the system you run it with the following commands:

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
-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 and remote)
-V       : print program version

Additional (optional) parameters:
-c       : display colored output
-N       : list message numbers only
(to be used either with -l, -L or -R)

You can view/delete multiple message i.e. -d123 -v456 -d567

if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Qmail – Clear Queue Script

June 23rd, 2010

To clear a qmail script run the following:

1) login to your server via ssh
2) su -
3) wget http://www.japanitup.com/scripts/qmailclear.sh
5) sh qmailclear.sh or sh ./qmailclear.sh
6) done.

For those that receive oversized file truncting errors.
Use the following more intense script. It take a little
longer but gets the job done.

1) login to your server via ssh
2) su -
3) wget http://www.japanitup.com/scripts/qmailclean.sh
5) sh qmailclean.sh or sh ./qmailclean.sh
6) done.
if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz