| How do you move a queue to another server? |
 |
 |
 |
To move your qmail user files from one server to another you should follow these steps:
1) Setup your new server
Install qmail on your new server. Once you have tested this you can copy the files in the /var/qmail/control directory of your old server to the new sever. Test the installation fully.
2) Prepare your DNS servers
Your DNS server has a TTL setting. This tells remote DNS servers how long to cache your DNS information. If you have a low TTL setting the remote servers wont hold the DSN information for too long which allows you to push DNS changes very quickly. We suggest that you set your TTL setting to 60 seconds. This must be done a few days before the change over.
3) Copy the users files from the old server to the new server
Use something like rsync to copy the users’ directories from one server to another. This can be done even when the old server is still in production.
4) Turn the old server off
Turn the qmail-smtpd and qmail-send processes off. Depending on how you installed your server this can be done in several different ways. If you installed your server using Dave Sills LifeWithQmail.org you could do this by typing "qmailctl stop"
5) Ensure that the servers are properly synced
Run the rsync command again. This will ensure that both servers are identical.
6) Update your MX records
Point your MX records to your new server. Do not reference the old server as a MX. Your settings should take 60 seconds to propagate and email should start to arrive on the new server very quickly.
7) Copy the queue from the old server to the new server
Add the old server as a relay for the new server by adding the ip address of the old server to the tcp.smtp file on the new server and issuing the “qmailctl cdb” command. Then, start the qmail-send process on the old server by typing “svc –u /service/qmail-send” and then flushing the queue by typing “qmailctl alrm”. This will start to flush the queue across. You will know that this is done when “qmailctl stat” tells you that there is nothing left in the queue. When the queue is empty you can turn the qmail-send process off by typing “svc –d /service/qmail-send”
7) Backup the logs on the old server
This is fairly self evident…and a very good idea.
8) Sit back and watch the email arrive on the new server. I like to have a Coke and a smile at this point.
9) Increase the TTL setting of your DNS
Once you are happy that the process is finished you can increase the TTL setting on your server to the default.

|