Moving Email Boxes from Server 1 to Server 2

Discussion in 'Installation/Configuration' started by SSullivan, Feb 20, 2014.

  1. SSullivan

    SSullivan New Member


    I have tried searching but cannot find anything relating to what I need.

    I'm trying to Move a few email domains and their mailboxes (and all folders and emails) from Server 1 to Server 2.

    How do I go about this? I can modify the databases but read somewhere it won't be synced to the other servers.
  2. tahunasky

    tahunasky Member

    You can import email accounts and emails from server 1 to server 2.

    On server 1 setup a remote user - SYSTEM / USER MANAGEMENT / REMOTE USERS.

    On server 2 goto TOOLS / IMPORT / ISPCONFIG 3 MAIL then import the email domains/user you want from server 1.
    Then copy/rsync all the email domains server1:/var/vmail to server2:/var/vmail.

    Once you have done that, and everything is working, you can delete the email accounts/data from server 1
  3. SSullivan

    SSullivan New Member

    Hi tahunasky,

    Thank you for your reply. I'm not sure that's what I can do.

    Server 1 and Server 2 are under a multi-server set-up. Let me change my question.

    Server 1 is the interface.
    Server 2 is dedicated email server.
    Server 3 is a new dedicated email server.

    I'm trying to move email domain and folders from Server 2 to Server 3.

    If that possible?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, with trick :)

    1) backup the ispconfig master database.
    2) Change the value server_id for all records in tables that start with mail_* or spamfilter_* with phpmyadmin to the id of server 3. now copy the content of all these database tables to server 3. so that you have the same content in the tables on server1 and server 3.
    3) copy the whole /var/vmail folder from server 2 to server 3, ensure that you preserver permissions (e.g. by using rsync):

    rsync -avz -e ssh /var/vmail/ [email protected]:/var/vmail/

    4) Use the resync tool (Tools > Resync) in ispconfig, select all mail options and click on start.

Share This Page