Migrate Mail from ISPConfig3 Master to Slave

Discussion in 'ISPConfig 3 Priority Support' started by gbe, Apr 9, 2016.

  1. gbe

    gbe New Member HowtoForge Supporter

    Apologies if this has been covered but I tried searching first. I found several similar threads but nothing for this particular circumstance.
    My set up is as follows:
    • host MASTER1 is ISPConfig master server
    • host SYSTEMS1 is ISPConfig slave server
    • currently MASTER1 runs email
    I now have a need to get all mail off MASTER1 and onto SYSTEMS1. This means: mail domains, forwards, mailboxes (containing emails), etc.

    Is there a feature for this?
    Or if not, what is the process I need to follow?

    Note that these servers and mail domains are currently in production so I need to:
    1. try to minimise downtime as much as possible
    2. be pretty certain of the process so I don't make any mistakes.
    Many thanks for your help.
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    If you use dovecot, you can replicate the mails between two servers using dovecotĀ“s dsync.
    Define system1 as a mirror for mail.
    Resync mail (to make sure the configs exists on the new system1) (*)
    Setup dovecot-replication and wait until the sync is done
    Switch the IPs for mail in the dns
    Remove "mirror for mail" and change the server_id`s for mail* in the master-database

    (*) use this patch.
    gbe likes this.
  3. gbe

    gbe New Member HowtoForge Supporter

    @florian030, thank you, this is an interesting new approach.
    I will give this a run, and try to document as I go for others who might be in the same position.
    Many thanks!
  4. gbe

    gbe New Member HowtoForge Supporter

    I assume I should do that in ISPConfig? However I'm not sure how to get SYSTEM1 to mirror mail only. SYSTEM1 currently runs many other services, and has active sites.
    In the interface, I have these options:
    It seems like mirroring can be either on or off. Reading through the manual it seems it would be active for all the selected services. Is there is a way to continue to run the other services, while still mirroring email?
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You can deactivate all server plugins on the target system that you dont need (e.g.leave only the system and mail* plugins on under /usr/local/ispconfig/server/plugins-enabled/)
  6. gbe

    gbe New Member HowtoForge Supporter

    Thanks Till. Something has come up, so I probably won't get to this for a couple of weeks, but when I do I will post my results here.

Share This Page