3

I have 500k spam messages in my outgoing queue. From experience, I know this will take a long time to remove. All the tools I know of require stopping qmail to remove messages.

Does anyone one know of a tool which will let me selectively delete messages from the queue without stopping mail services?

Mat
  • 52,586
ollybee
  • 301

2 Answers2

2

Mail queue removal tool for qmail, remove the mail queue by stoping and starting the service. There is no exact tools for removing the mail queue without stoping the qmail service.

But you can control how long a message stays in a queue by editing the file /var/qmail/control/queuelifetime. 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.

Mughil
  • 1,973
  • My eventual solution was to stop qmail move the queue away and make a new queue directory then run queue-fix on the empty directory to create valid permissions and folder structure. then I could run some search and kill scripts on the offline queue before copying it back to standard location and queue-fixing it. ths meant legit mail was saved with mai services offline for only a very short time. – ollybee Jan 17 '12 at 20:40
0

You can use qmHandle which you can find here

You can delete individual msgs or delete the whole queue (even though it deletes both local and remote queues). There are further options to delete msgs depending on RegExps.