This was my problem for today, how to migrate sound and safely from on old system running around 100 domains to a brand new configured qmail system. Both are running with the configuration suggested by www.qmailrocks.org and on a FreeBSD machine. So lets go:
- First things stop the old qmail server to avoid loosing messages. Remember that you need to stop qmail from receiving any messages, and also stopping users from retrieving their email with pop3 or imap. The following commands would do it for you:
/usr/local/etc/rc.d/imap.sh stop
/usr/local/etc/rc.d/imaps.sh stop
- After yo stopped qmail and the pop/imap daemons, you are able to start to transfer the vpopmail contents. Using rsync is a good idea, since that with it you can minimise the downtime, since you can run it in the hot system , before starting. This run is just to sync from the last call to the time you stopped qmail with the commands above. You are running this in your new server and server.xxx.com is you old server.
- Luckily after some time rsync will finish running. If not, leave it working while go to change the other bits. In order to make the new machine recognise all the users and domains from the old server, you need to do the following:
import(merge) from the old server /var/qmail/recipients
import(merge) from the old server /var/qmail/control/rcpthosts
import(merge) from the old server /var/qmail/control/virtualdomains
- To finish add and delete a fake domain using vpopmail. This will make vpopmail read all the files you merged and reorganise them.
Finally, keep checking the email server for a day. It is almost impossible to make everything work without mistakes.
2 comments:
If you are interrested, I've made an updated version of qmailrocks for Debian. It's available on http://qmailrocks.thibs.com
I am trying to migrate qmail/vpopmail form a unix server to a linux server. How can I do this?
Post a Comment