Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a server with Plesk 9 and QMail (The OS is a bit outdated and the server is going to be decommissioned when the last few sites are moved/gone).

One of the hosting clients has had his email compromised by a virus or some other, which has meant his email address has been sending huge amounts of bulk email to non existent addresses and now he's getting an influx on bouncebacks. I'd advised him to change his password and make sure he gets whatever it is infected his PC cleaned.

I would like these bouncebacks gone - for his sanity and for my servers health, I can't access the mail queue in plesk anymore (it hangs on loading, presumably because of the volume of crap thats now in there). So I searched for a command line way, found this:

Unfortunately, step 3 doesn't work: rpm -Uvh --force psa-qmail..... (yes, I did the rpm -q and got the full package ID) - it just says 'no such file or directory'.

Can anyone help me to either rebuild the mail queue, or, I found a folder in /var/qmail/queue called bounce, which is full, presumably of rubbish (the few I looked at the contents of definately were, but I can't look at every one).

Perhaps I can just delete from that folder?

Any suggestions please?

share|improve this question
up vote 1 down vote accepted

I would not recommend following the instructions in that article. Deleting the whole queue will probably delete a lot of valid msgs as well.

You can use a tool called qmHandle to manage your queue and delete all those messages that are just bouncing around. You can get it from here. and then just

# tar -zxvf qmhandle-1.3.2.tar.gz
# chmod 755 qmHandle
# ./qmHandle –h

you will see that there are numerous options to filter those messages that you want to delete.

share|improve this answer
You sir, are an absolute genius. I now have an empty mail queue again and hopefully, a user who has learned a valuable lesson..... – Codecraft Jan 13 '12 at 14:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.