Hello Jeroen, Thank you for advise. I have many users i can not allow for any downtime (not even few seconds). Also i can not loose any single email. Your solution will not guarantee that.
I am looking for true HA solution. That is why both servers needs to work at the same time for 1-2 months to allow users to test new account and to migrate when ready. During migration both servers needs to work correctly (two way sync) Thanks, Michal >> Hello Everybody, >> >> I need to migrate my old postfix server to a new machine. >> Domain will be the same. I would like to make this migration seamless >> for the end users and give them 1-2 months for migration (both servers >> should work at that time correctly). > 1 to 2 *months* ? why ? > >> <snipped hugely convoluted migration path> > > Here's what I propose: > > - install postfix on the new server, and configure it identically to > the existing server, except the following: > * relay the domain in question to the old server, by removing it from > mydestination and moving it to relay_domains. > * Use your existing userdb to verify valid recipients with > relay_recipient_maps. > * set the old server as its /specific/ relayhost using > [oldserver.example.com] > > - switch MX to point to this new server; all incoming mail will enter > via the new server and be delivered to the old one. > * Now wait long enough for the old MX to expire from any caches > worldwide; this is the longest part of the migration, since it's not > under your control. Be patient, and plan well in advance (say a week.) > > - install your mailbox server (dovecot is preferred) and plan your > downtime. > * Make an initial copy of your mailstores to the new server so you > won't have to copy so much when you're actually migrating. > > - during your downtime window, stop postfix and dovecot, and rsync the > mailstores to catch up > * also change the new server's postfix configuration back to what it > should be (i.e. no more relaying) > > - switch the hostname(s) for the users to the new server, or stop the > old one and switch its IP (this is faster) > > Whether you use a new IP or switch the old one with the new server is > up to you (the latter avoids DNS downtime.) > > Also consider now implementing separate DNS for smtp in, smtp out, and > imap access. > This avoids DNS-related issues when you decide to split these > functions up later. >