Migrate email to another ISPConfig server

Discussion in 'ISPConfig 3 Priority Support' started by decentris, Dec 28, 2020.

  1. decentris

    decentris Member HowtoForge Supporter

    Hi team!

    I got the following setup: I set up a new dedicated machine for a special customer of mine. The website has already been transferred (I did that manually by using a suitable Wordpress-Migration Plugin. But now I need to transfer all the email accounts. (The MX-Entry is still pointing to my old machine and I want to have everything on the new one.)

    I saw, that there is a ISPConfig migration tool. But does it also allow to just migrate the email-setup of a special customer/domain?

    A short HowTo would be gratefully appreciated.

    Thank you very, very much in advance.

    Best,
    Johannes
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can use the migration tool for this, with the option --only-mail=example.com (replace example.com with the domain of that client). So the command would be
    Code:
    ./migrate --only-mail=example.com
    Tutorial for the migration tool: https://www.howtoforge.com/tutorial...-confixx-plesk-to-ispconfig-31-single-server/

    After doing this, you can change the mx entry to point to their new machine. It would be good to disable the domain (but not remove it yet, just for sure) on the old server after migrating. Their mail clients will have to change their address - I would advice you to use mx1.example.com for the MX record, smtp.example.com for smtp, and imap.example.com for imap.
     
  3. decentris

    decentris Member HowtoForge Supporter

    Cool! Thank you very much for his perfect HowTo! I will do as you said and post a short feedback afterwards.
     
    Th0m likes this.
  4. decentris

    decentris Member HowtoForge Supporter

    Hi, what does that error message mean? I got SSH root access activated with password, as I login via putty regularly. I made a dry-run and stumbled over this error message:


    Code:
    Creating SSH key.
    Now we transfer the key to the target server.
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa_migration.pub"
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that a host key has just been changed.
    The fingerprint for the ECDSA key sent by the remote host is
    SHA256:HERE IS THE FINGERPRINT DISPLAYED
    Please contact your system administrator.
    Add correct host key in /root/.ssh/known_hosts to get rid of this message.
    Offending ECDSA key in /root/.ssh/known_hosts:3
      remove with:
      ssh-keygen -f "/root/.ssh/known_hosts" -R "IP-ADDRESS OF TARGET SERVER"
    Password authentication is disabled to avoid man-in-the-middle attacks.
    Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
    [email protected] OF TARGET SERVER: Permission denied (publickey,password).

    I canceled the operation with Ctrl-C.

    What do I have to do now? Do I need to change something on the target server?

    Thx for your help.

    Best,
    Johannes
     
    Last edited: Dec 28, 2020
  5. decentris

    decentris Member HowtoForge Supporter

    PS: I set up a root-SSH user long time ago as I need SSH-access for maintaining the server. So PermitRootLogin is already set to YES.
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Use the command shown in the error message to fix it. You probably should change to 'without-password' instead of 'yes' once you have the ssh key in place.
     
  7. decentris

    decentris Member HowtoForge Supporter

    Code:
    ssh-keygen -f "/root/.ssh/known_hosts" -R "IP-ADDRESS OF TARGET SERVER"

    Should this command be executed on the source or on the target server?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    On the source server.
     
  9. decentris

    decentris Member HowtoForge Supporter

    Ok, now the dry-run seems to work. Thank you. But it seems that this is a TRIAL-version. Do I need a licence? If yes, how much and how to obtain?
     
  10. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  11. decentris

    decentris Member HowtoForge Supporter

    Th0m likes this.
  12. decentris

    decentris Member HowtoForge Supporter

    Just wanted to tell you that everything worked just fine! :)
    Thank you very much for your help!

    Best,
    Johannes
     
    Th0m likes this.

Share This Page