LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-08-2007, 01:17 PM   #1
ABL
Member
 
Registered: Mar 2005
Location: NYC
Distribution: CentOS 5
Posts: 54

Rep: Reputation: 16
Migrating Sendmail to New IPs


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).

Any help would be appreciated.

Thanks,
Alden
 
Old 05-10-2007, 01:48 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
 
Old 05-10-2007, 08:52 AM   #3
ABL
Member
 
Registered: Mar 2005
Location: NYC
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 16
Thumbs up

Quote:
Originally Posted by acid_kewpie
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)?


Thanks,
Alden
 
Old 05-10-2007, 09:30 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
 
Old 05-10-2007, 10:25 AM   #5
ABL
Member
 
Registered: Mar 2005
Location: NYC
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 16
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?

Thanks,
Alden
 
Old 05-10-2007, 10:47 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
yeah i think you can. you could always just use a temporary a record for the new server anyway.
 
  


Reply

Tags
migration, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating sendmail to postfix serabut Linux - Software 3 01-16-2007 06:24 AM
Migrating to OO.o AnanthaP General 1 01-10-2006 08:47 AM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 10:06 AM
eth0:9 incorrect IPs ,and eth0 not IPs WannaLearnLinux Linux - Networking 10 10-26-2003 08:50 PM
Sendmail rejecting IPs dskny Linux - Software 0 08-21-2003 10:11 AM


All times are GMT -5. The time now is 06:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration