Qmail has 500 00 messages in queue and I installed qmHandle to help sort out the spam in the queue. This process has taken a long time and alternative scripts like qmail-remove also take time. I want to move the Qmail queue to a backup (queue.BAK)and recreate a new queue so that mails can flow so long as clients cannot send or receive emails via the server at the moment. I am running Plesk 10.4 on Ubuntu 8.04 LTS.

1) Is it possible to move the queue and recreate a new queue?

2) Please outline what I have to do to achieve this.

I followed the advice below and am adding more information here. My new qmail queue has 75 messages and all are unprocessed.I am able to send using the smtp service of the server but am not getting emails. I do not see an error in the log file but trying to download the emails gives the message that there are no new messages even when I send test messages to the email address hosted on the server.

Please explain whats going on here(does each line represent a command to be run?): for i in seq 0 22; do mkdir -p mess/$i done Si I can
–
PaddingtonMar 16 '13 at 13:43

It's creating all the numbered directories 0, 1, 2 and so on up to 22.
–
Jenny DMar 16 '13 at 14:11

and yes, each line is a command to be run
–
Jenny DMar 16 '13 at 14:12

OK so I did this but I see 75 emails in queue and all 75 of them are unprocessed. I do not see an error in the log /usr/local/psa/var/log/maillog but thunderbird reports no emails to download even after sending numerous test messages to the email address hosted on this server.
–
PaddingtonMar 17 '13 at 8:17

MY old files have the permissions: email address hosted on this server. Here are the files:root@alpha:/var/qmail/queue# root@alpha:/var/qmail/queue.BAK# ls -la
–
PaddingtonMar 17 '13 at 9:02