Web Hosting Talk







View Full Version : Deleting mail from Qmail Queue


tuvok
11-26-2001, 04:47 PM
Hi everyone

How do i delete a lot of email to a given address from the qmail queue, its spam and its blocking the rest of the email and slowing down the server, i can see it in qmail-qread but how to delete it/them all in one go?

cheers

DavidU
11-26-2001, 10:18 PM
1) hire a system administrator

2) shut down qmail

2a) go into /var/qmail/queue
2b) grep around for the messages you want deleted.
2c) if there aren't many, delete them.
2c1) don't delete directories.
2d) if there are many, script a way to delete them.

3) run queue-fix (found at qmail.org) on your queue

4) restart qmail

DON'T DO THIS WHILE QMAIL IS RUNNING.

-davidu

DavidU
11-26-2001, 10:18 PM
oh yeah, read the docs with queue-fix...in case I forgot something...

I don't have my SysAdmin hat on at the moment and I'm in the middle of a Comp. Sci. lab. ;-)

-davidu

driverdave
11-26-2001, 11:05 PM
System Administrator?!?

Whats that, a new CP?

cperciva
11-26-2001, 11:11 PM
Originally posted by DavidU
2a) go into /var/qmail/queue
2b) grep around for the messages you want deleted.
2c) if there aren't many, delete them.
2c1) don't delete directories.
2d) if there are many, script a way to delete them.
3) run queue-fix (found at qmail.org) on your queue


Or, if you prefer, you could instead run qmail-remove (http://www.linuxmagic.com/opensource/qmail/qmail-remove/) which automates this filtering.

DavidU
11-26-2001, 11:24 PM
wow, I've never seen qmail-remove.

That's totally cool.

-davidu

DavidU
11-26-2001, 11:25 PM
beware, qmail-remove assumes a conf-split of 23.

many people run one of 199.

-davidu

Travis
11-27-2001, 02:15 PM
Fortunately, you can specify the value of conf-split by a command-line option.

This is an invaluable tool for cleaning out spam messes.