Migrate vmail to new server

Discussion in 'General' started by theWeird, May 30, 2014.

  1. theWeird

    theWeird Member

    I am about to migrate the mailboxes on my old mail server to a new server.

    Setup:
    Old server: Courier
    New server: Dovecot

    I did the following steps to migrate one of the mail domains to the new server:

    - tar-gz the domains directory in /var/vmail
    - copy and extract at same position on new server
    - using migration script to migrate courier->dovecot as described http://wiki2.dovecot.org/Migration/Courier
    - changed MX record in DNS
    - openend mysql console on ISPC master server and changed the server_id in mail_domain and mail_user

    Didn't work, cannot login with mailuser credentials on new server.
    Do I have to change the server_id in every database on every server? or is there a better way to do this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. theWeird

    theWeird Member

    Am I right, that this script migrates the mailboxes from courier to dovecot on the same machine?

    That not exactly what I have to do.
    I have to migrate from courier to dovecot on another machine.
    The dovecot is running and working on that machine. I just have to migrate the existing mail domains and mailboxes from the old machine to the new one.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, and thats all you need to do after copying ver /var/vmaifrom one server to the other one.
     
  5. theWeird

    theWeird Member

    Can I use the script only for full migrations?
    I planned to migrate the mail domains in multiple steps.
    Furthermore there are already some new mail domains on the new server.
    Is this a problem for the migration script?
     
  6. dynamind

    dynamind Member

    migrated successfully

    Hi,

    I migrated successfully today using a perl script named
    courier-dovecot-migrate.pl ...

    However I'm not sure if plain login is the correct mechanism, the logs show:

    method=PLAIN

    and very often in the logs there appears:

    Code:
    Jun  4 17:24:01 ispc postfix/smtpd[13658]: connect from localhost.localdomain[127.0.0.1]
    Jun  4 17:24:01 ispc postfix/smtpd[13658]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
    Jun  4 17:24:01 ispc postfix/smtpd[13658]: disconnect from localhost.localdomain[127.0.0.1]
    Jun  4 17:24:01 ispc dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<gVPLNwT7TwB/AAAB>
    Jun  4 17:24:01 ispc dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<w13LNwT7lgB/AAAB>
    is there everything alright? I tried to set

    auth_mechanisms = sasl plain login

    but then it didn't work anymore, auth impossible.
     
    Last edited: Jun 4, 2014
  7. doekia

    doekia Member

    Usually you simply create the mailbox on the target machine the usual way.
    Then you copy "preserving" time-stamp /var/vmail/Maildir.

    If not achievable this way you could also imapcopy from one host to the other but you need mailbox credential on both machine for such.

    Regards,
     

Share This Page