How to delete qmail queue ?


How to delete qmail queue ?

How to delete queue mail list from qmail queue while you have a bunch of queue mail stuck in qmail queue ?

Try the following syntax :

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

But, I recommend to run this script not at busy time. I mean if you currently have busy traffic on qmail, otherwise your qmail won’t start properly and you must reboot your machine.

In other way to automatically remote qmail queue, is to set how long these qmail queues will stay, You can edit the /var/qmail/control/queuelifetime file this is the file to control how long a message stays in a queue. Just put a number (to represent seconds)in this file.By default 86400 sec Will keep the mail for 1 day and expire after that. Here you can change this value to 1 and restart your qmail server it should clear your qmail queue.

You can see on qmail log status at /var/log/qmail/qmail-send/current or /var/log/qmail/current.

Advertisements
Published in: on November 1, 2011 at 6:19 pm  Comments Off on How to delete qmail queue ?  
%d bloggers like this: