move emails between servers

Discussion in 'ISPConfig 3 Priority Support' started by arraken, Apr 3, 2014.

  1. arraken

    arraken Member

    Hi!

    I have a question regarding the transfer of emails between servers.

    I have a client on an old ispconfig3 server with courier installed. I want to move the client to a new server with dovecot installed.

    I already transferred the websites of the client manually, by just creating a new client on the new server, creating the websites in ispconfig, and manually moving the www folders and databases.

    But I'm not sure how to do the same with email. I have found a migration script for ispconfig from courier to dovecot, but i don't want to migrate a whole server, but only one client, or specifically, only the mails of one client (5 mailboxes).

    I don't need to copy any ispconfig specific settings, passwords etc, because I will create the mailboxes and client completely from scratch. I really only want to copy the saved mails, so the client doesn't lose them when he connects to the new server.


    So is it possible to just create the mailboxes on the new server in ispconfig, and then transfer the existing mails by copying the vmail folder from the old server to the new one? Or is it more complicated that that, expecially reagarding that the old server has courier, and the new server has dovecot)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that possible. You will just have to ahjust the maildir structure.

    Courier:

    /var/vmail/domain.tld/user/

    Dovecot:

    /var/vmail/domain.tld/user/Maildir/

    so basically, you can copy over the maildir from old to new server like this (run on the old server):

    Code:
    scp -pr /var/vmail/domain.tld/user/* root@newserver:/var/vmail/domain.tld/user/Maildir/
    after copying all mailboxes, run this on the new server:

    Code:
    chown -R vmail:vmail /var/vmail/domain.tld
     

Share This Page