Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi,
I am hosting 8-10 sites, email, etc., and I'm moving everything to a new server. I've already migrated all of the sites, and one entire domain (complete with email). That one domain was small (most of the mail is for me, so it was easy to deal with the time delay).
I have to move the other domains, and I am trying to minimize downtime for email. I have http taken care of, as I will have sites live at both the old and new IP addresses, but I'm scratching my head over dealing with sendmail. Most of the users are POP, but I also have a few IMAP users (on each of 2 domains).
I am moving to hosting DNS with this upgrade, so I was wondering if I should:
1) edit the zone files on the new box to point to the old server
2) change TTL on the new box to something relatively small (one hour?)
3) wait a day or two for everything to propagate
4) shut down sendmail on the old server
5) copy the mail over to the new server
6) change the DNS to point to the new server
7) wait for propagation and I'm good to go
Will this work? I have heard that some large ISPs ignore TTL, so some users may not get mail at the new IP right away (a bad thing for me).
Someone had suggested using redir or iptables (to forward from the old server to the new), but I haven't been able to get either to work.
Should I be looking at MAIL_HUB? I've looked, but I got a little hung up. The new server has a valid hostname, but obviously, the other sites are just IPs for now (with all files and users set as with the old ones).
well ultimately mx records have their own failover mechanisms ready and waiting. put the old server with the highest priority in DNS, then the new one with a lower one. once you stop sendmail on the old server the connecting mail servers will then try to use the other mx record, meaning you don't need to synchronize any events at all.
well ultimately mx records have their own failover mechanisms ready and waiting. put the old server with the highest priority in DNS, then the new one with a lower one. once you stop sendmail on the old server the connecting mail servers will then try to use the other mx record, meaning you don't need to synchronize any events at all.
Wow! I wish I had thought of it. You're a life saver (or, at least, a sanity saver). I really appreciate this much simpler solution.
I still have one or two questions, though:
When I ultimately shut down the old server, do I just bring over any mail left on that server and append the new mail to the old? What do I do about IMAP clients (I only have 2)?
how to actually keep the mail totally up to date i'm not sure. with a small outage you could just copy all files manually, but there are tools like imapsync which might be useful to keep two locatiosn up to date until such tim eas youre back to a single one. never used it myself though. also there's plain old rsync, another good tool for sure.
Okay. I found one little problem:
the mx records for both the old and new server are called: mail.foo.com, and I don't want to have to change the name of one of them, as that kind of defeats the purpose.
Is it possible/advisable to put IP addresses in the MX record, instead of a hostname (and then having an associated A record with the IP address)? Is there another way around this?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.