I have Centos 7 with dovecot/postfix/mysql Maildir I want to bring in a new server, new server will have same hostname as current, but, different IP I was intending to rsync -avzhe ssh vmail at oldserver:/var/vmail/vmail1 /var/vmail/vmail1 and, then, re run as necessary when/if mail still arrives on old server is that "a good plan" ...? TIA, V
On 8.3.2019 13.44, Voytek Eymont via dovecot wrote:> I have Centos 7 with dovecot/postfix/mysql Maildir > > I want to bring in a new server, new server will have same hostname as > current, but, different IP > > I was intending to > rsync -avzhe ssh vmail at oldserver:/var/vmail/vmail1 /var/vmail/vmail1 > > and, then, re run as necessary when/if mail still arrives on old server > > is that "a good plan" ...? > > TIA, V >Yeah, it's ok as long as you haven't switched to new server. Aki
On 8.3.2019 14.07, Voytek Eymont wrote:> On Fri, March 8, 2019 10:45 pm, Aki Tuomi via dovecot wrote: >> On 8.3.2019 13.44, Voytek Eymont via dovecot wrote: >> >>> I have Centos 7 with dovecot/postfix/mysql Maildir >>> >>> >>> I want to bring in a new server, new server will have same hostname as >>> current, but, different IP >>> >>> I was intending to >>> rsync -avzhe ssh vmail at oldserver:/var/vmail/vmail1 /var/vmail/vmail1 >>> >>> and, then, re run as necessary when/if mail still arrives on old server >>> >>> >>> is that "a good plan" ...? >>> >>> TIA, V >>> >>> >> Yeah, it's ok as long as you haven't switched to new server. > Aki, thanks > > I'm not certain I understand your comment properly > > I currently have server 'geko' > > intention was to change A record to assign geko to new IP/server, assign > new hostname to oldserver A record > > I guess I;ll still get some emails delivered to oldserver with new > hostname/old ip for 24 hours or so after aA record change ? > > so, I was going to re run rsync 2 or 3 times over the first 24 hours or so ? > > are you saying NOT to rsync once A record changed ? > > sorry for being slow > >You could configure old server's MTA to deliver mail to new server's MTA instead? After there has been activity on the new server, running rsync from old server can cause problems. Aki
On Fri, March 8, 2019 11:17 pm, Aki Tuomi via dovecot wrote:>> > You could configure old server's MTA to deliver mail to new server's MTA > instead? After there has been activity on the new server, running rsync > from old server can cause problems.yes, I see, thanks (hmmm, done it before, hope I remember how...) V
On 3/8/2019 4:44 AM, Voytek Eymont via dovecot wrote:> I have Centos 7 with dovecot/postfix/mysql Maildir > > I want to bring in a new server, new server will have same hostname as > current, but, different IP > > I was intending to > rsync -avzhe ssh vmail at oldserver:/var/vmail/vmail1 /var/vmail/vmail1 > > and, then, re run as necessary when/if mail still arrives on old server > > is that "a good plan" ...?What I did when I migrated my mail service to a new server: Preparatory steps: * Made sure new server was set up. * Tested functionality on new server as much as I could. * Did occasional rsyncs (-avH --delete) of mail content from old server to new server. Three days before go time, I did this: * Lowered the DNS TTL value for imap and smtp records to 300. * Waited 3 days to be sure that TTL had penetrated the whole Internet. On the day of the migration, these were the steps I followed. * Shut down postfix and dovecot on both old and new servers. * Updated DNS records to point to new address. * Ran one final rsync of maildirs from old server to new server. * Waited 30 minutes with services on both servers still shut down. * Started postfix and dovecot on new server. At this point you can set the DNS TTL back to a larger value, if you wish. I waited 30 minutes just to be absolutely sure that the DNS change had propagated everywhere. Ten minutes probably would have been enough; I was just being cautious. If you plan to keep the old server without doing a fresh OS install, it's a good idea to wait a few days before restarting services on it. In my case, I removed dovecot and reconfigured postfix on that machine to be a satellite system relaying to the new server. Thanks, Shawn
On 13 Mar 2019, at 13:25, Shawn Heisey via dovecot <dovecot at dovecot.org> wrote:> * Shut down postfix and dovecot on both old and new servers. > * Updated DNS records to point to new address. > * Ran one final rsync of maildirs from old server to new server. > * Waited 30 minutes with services on both servers still shut down. > * Started postfix and dovecot on new server.Except for the third minute delay, this is exactly what I did. (I brought the new server up as soon as the sync finished, which was only a few minutes since I'd been syncing frequently. I did leave the OLD server IP offline for awhile after bringing up the new one. I also did not wait 3 days after lowering the TTL which was set to 1 day. I waited about a day and a half, maybe a bit less. What you do not want to do is run the two servers at the same time, which is what it sounded like the OP was intending to do. -- Rincewind had always been happy to think of himself as a racist. The One Hundred Meters, the Mile, the Marathon -- he'd run them all.