Linux – just delete files from /var/qmail/queue/bounce

centosemaillinux

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:

http://kb.parallels.com/252

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?

Best Answer

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.

Related Topic