The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Migrating IMAP to another server-- need suggestions

Discussion in 'General Discussion' started by myusername, Feb 6, 2007.

  1. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Let me know if you see any holes in my plan!

    First of a quick background:

    1. Server A and Server B have identical copies of a website including the maildir
    2. Server A is currently the mail server
    3. The site uses IMAP so once it has been migrated to server B, the files need to be there:

    What I am going to do:

    1. Change the MX on server A to point to Server B
    2. On server A remove the domain from /etc/localdomains and stick it in /etc/remotedomains
    2. Replicate the /mail dir one final time from A to B

    It sounds to me like using this method we would be waiting on DNS to do its thing and even after the changes were made that some mail could still wind up on server A.

    But it also sounds to me like setting up /etc/remotedomains is the patch for this problem and that it will force the mailserver to read the MX on the domain and forward it on immediately.

    Main thing is to sync IMAP over to an identical server then have the mail be immediately redirected to that server. See anything I missed?
     
  2. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    That sounds pretty much like what I had to do when migrating from an Exchange box... used an imapsync script... the movement of the local/remotedomains sounds right.

    As for DNS, if you have the time beforehand, drop the TTL for the mx records to something really low, such as 300 or 600 (5-10 minutes, respectively) a few days before the transfer to help with DNS propogation ... then up that limit when the transfer is done.
     
  3. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Sounds good, and that part was definately in the plans. thanks for bringing it up though for any others.

    So sounds like to me we are still at the mercy of DNS even with the local/remotedomains entries?

    I was thinking something could be done to force mail from server A to server B (without setting up some sort of proxy on the mail ports...too much work, too little time for that I think)
     
  4. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    If you have the DNS on server A pointing to server B as the actual MX host, AND you have the remote/localdomains worked out, you shouldn't have any messages getting delivered to serverA maildir's, regardless of DNS timings, old cache entries elsewhere, etc.
     
  5. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    :D Great thanks. Will give it a go this weekend and see what happens.
     
Loading...

Share This Page