How to empty the qmail queue

To clear all messages from the queue the first step is you must shut down qmail. Here are the SSH commands for that.

  • Using qmail-rocks scripts:
    /etc/rc.d/qmail stop
  • Or you can try the following
    qmailctl stop
  • Or you can try this
    init.d/qmail stop

To clear the qmail queue, use the following SSH commands to change to the queue directory and clear the queue.

  • cd /var/qmail/queue
  • find intd todo local remote mess info bounce -type f -print |xargs rm

After it’s clear you can start qmail back up using a similar command that stopped the service, but say start.

  • Using qmail-rocks scripts:
    /etc/rc.d/qmail start
  • Or you can try the following
    qmailctl start
  • Or you can try this
    init.d/qmail start

Now the queue should be empty!

For learning the ins and outs of Qmail I recommend this Qmail book

Recent Related Posts

One thought on “How to empty the qmail queue

  1. Pingback: Qmail message queue is growing automatically

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>