How do I rebuild qmail's queue if it is damaged or consists of a lot of spam messages?
Print this Article
Comment on this Article
Last Updated:
August 28, 2007 4:08 PM
You can recreate qmail's queue, but all current messages will be removed from the queue and cannot be restored.
To Recreate Qmail's Queue
- Log in to your server using SSH.
- Type
su -
. - Enter the password you used to log in to your server.
- At the command prompt, stop Qmail by typing
/etc/init.d/qmail stop
. - Then, type the following:
- Start Qmail by typing
/etc/init.d/qmail start
.
cd /var/qmail/queue
rm -rf info intd local mess remote todo
mkdir mess
for i in `seq 0 22`; do
mkdir -p mess/$i
done
cp -r mess info
cp -r mess intd
cp -r mess local
cp -r mess remote
cp -r mess todo
chmod -R 750 mess todo
chown -R qmailq:qmail mess todo
chmod -R 700 info intd local remote
chown -R qmailq:qmail intd
chown -R qmails:qmail info local remote
rm -rf info intd local mess remote todo
mkdir mess
for i in `seq 0 22`; do
mkdir -p mess/$i
done
cp -r mess info
cp -r mess intd
cp -r mess local
cp -r mess remote
cp -r mess todo
chmod -R 750 mess todo
chown -R qmailq:qmail mess todo
chmod -R 700 info intd local remote
chown -R qmailq:qmail intd
chown -R qmails:qmail info local remote