On Sun, 13 Sep 2009, LuKreme wrote:

> I am planning on recompiling postfix and all its various helper apps
> (switching from cyrus  to dovecot, upgrading mysql, Maybe setting up
> LDAP, and doing a clean install of FreeBSD latest) onto a newer, and
> hopefully more capable machine.
> 
> What I want to do is get the new system built and configured and
> tested and then swap it in to replace the old machine.
> 
> My question is what is the best way to actually migrate the mail and
> the users to the new machine without losing mail? WOuld it be a good
> idea (or even possible) to run the two machines in parallel for a
> time, having all new mail go to both of them so I can then remove
> the old machine once I see that everything is working?

Just delivering new mail in parallel is not enough; what about users'
existing mail?

> The last time I did a migration to a new machine 1) someone else was
> in charge 2) we moved the hard drive so we didn't have to move
> users/mail 3) we were offline for an entire weekend.

Does this machine serve both IMAP and SMTP?  Depending on how many users
you have to move, just select a bunch and spool mail for them on the
current Postfix box while you rsync their IMAP mailboxes to the new box.
Create a transport map to push their queued and incoming mail to the new
server.  If users continue to connect to the old hostname for IMAP,
proxy their particular connections so they don't even notice they're
reading mail on a new machine.  Repeat this process until all mailboxes
have been moved.  Then flip DNS (i.e. MX records, imap.foo.bar,
smtp.foo.bar, et cetera) to point to the new machine and retire the old
one.

That is an admittedly general plan, and you are likely to have pitfalls
depending on the idiosyncracies of your setup, so use this as a template
and create a plan.  If you run into technical problems related to the
Postfix part of the approach, ask here.

-- 
Sahil Tandon <sa...@tandon.net>

Reply via email to