Qmail: delete queuing emails

Posted: October 1, 2012 in Linux
Tags: ,

qmHandle is a great tool. You can get  it from http://sourceforge.net/projects/qmhandle/

Unzip the package and change the configuration section in qmHandle script file.

Read the README file.

./qmHandle -fmyemail@gmail.com

The above command will delete all queuing email sent from myemail@gmail.com.

I strongly recommend to use this tool, but if you want to clear the queue by yourself. The below command will delete all the queuing emails. Credit: http://qmail-support.blogspot.sg/2005/05/deleting-mails-from-qmail-queue.html

qmailctl 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 {} \;
qmailctl start

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s