IMAP question - Moving servers and mail.

Discussion in 'Installation/Configuration' started by Brenton, Apr 7, 2006.

  1. Brenton

    Brenton New Member


    I've moved all my domains to a new server (Perfect Ubuntu 5.10) except for one that is still on my old server. The client uses IMAP exclusively so I need to migrate all his existing mail to the new server. Can this be done?

    I've Googled extensively and more confused than ever.

    Any pointers will be greatly appreciated.

  2. till

    till Super Moderator

    Does both servers use Maildir?
  3. Brenton

    Brenton New Member

    Hi till

    I'm not sure, this is the info I have

    The old server was running virtual hosting using mysql and the user mail directory is:
    content of directory is:
    drwx------  9 postfix postfix  304 Jul 25  2005 .
    drwx------  3 postfix postfix   96 Jun  8  2005 ..
    drwx------  6 postfix postfix  224 Jul 25  2005 .Drafts
    drwx------  6 postfix postfix  224 Jul 25  2005 .Sent
    drwx------  6 postfix postfix  256 Jun  8  2005 .Trash
    drwx------  2 postfix postfix   48 Jul 25  2005 courierimapkeywords
    -rw-r--r--  1 postfix postfix   36 Jun  8  2005 courierimapsubscribed
    -rw-r--r--  1 postfix postfix  688 Jul 25  2005 courierimapuiddb
    drwx------  2 postfix postfix 1168 Jul 25  2005 cur
    drwx------  2 postfix postfix 3312 Mar 22 19:48 new
    drwx------  2 postfix postfix   48 Mar 22 19:48 tmp
    On the ISPConfig server it's:
    content of directory is:
    drwx------  5 web7_someuser web7 4096 2006-03-21 01:00 .
    drwxr-xr-x  4 web7_someuser web7 4096 2006-03-21 00:49 ..
    -rw-r--r--  1 web7_someuser web7   79 2006-03-21 11:00 courierpop3dsizelist
    drwx------  2 web7_someuser web7 4096 2006-03-21 11:00 cur
    drwx------  2 web7_someuser web7 4096 2006-03-21 11:00 new
    drwx------  2 web7_someuser web7 4096 2006-03-21 11:00 tmp
    Some I'm assuming that they are both running Maildir.

    I've been looking at imapsync but am still a little confused. I've been reading this thread:

  4. Brenton

    Brenton New Member

    Okay, after playing around with some testing domains I found that this works.

    imapsync --host1 --user1 --password1 xxxxxxxx \
    --host2 yyy.yyy.yyy.yyy --user2 web6_username --password2 xxxxxxxx
    where: is the older server IP number and
    yyy.yyy.yyy.yyy is the new (ISPConfig - Ubuntu 5.10) server IP number is the user login on the old server and
    web6_username is the user login on the new server.

    I tried IP numbers rather that the domain ( as the DNS records have already been updated to point to the new server on my test accounts/domains, but not yet on the client domain. This will allow me to apply for DNS updates and migration over the weekend while client is not inclind to check mail.

    I've not done the client mail yet, as he has a number of custom folders and need to see if those will be moved across as well.

    But for a basic migration, the above worked fine for me. I hope this works helps somebody else.

  5. till

    till Super Moderator

    As both servers are using courier Imap, it might also work if you simply copy the maildir content to the new server and change the owner to the email user.
  6. Brenton

    Brenton New Member

    Hi till.

    I've used imapsync and it has worked, all mail was copied with no visible error. Will have to wait and see what the client says.

    I did think of just doing a straight copy, but I was a little worried that the file naming convention between the two servers are very diferent.

    new server
    old server
    I don't know enough about courier to play to much with a live server.

    Thank you very much for your support.

  7. Ovidiu

    Ovidiu Active Member

    trying the same, but synchronizing to google apps:

    imapsync --host1 --user1 --password1 Pass1 \ --host2 --user2 mygoogleappslogin --password2 Pass2 --port2 993 --ssl2

    and all that happens is this:

    --host2 option must be used, run /usr/bin/imapsync --help for help

    any ideas?
  8. falko

    falko Super Moderator

    If you write this command in one line, you must remove the backslash (\) from it.
  9. Ovidiu

    Ovidiu Active Member

    how silly of me :-( that was the problem indeed.

    Now I get this: Host says it has NO CAPABILITY for AUTHENTICATE CRAM-MD5

    I then tried --authmech2 PLAIN and after that failed too --authmech2 LOGIN

    - none works. Anyone knows what authmech to try with GMAIL's IMAP servers?
  10. Ovidiu

    Ovidiu Active Member

    sorry guys, any more help on this?
  11. falko

    falko Super Moderator

  12. Ovidiu

    Ovidiu Active Member

    thx. that solved it. imapsync was 1.252 in stable, used pinning to get it from testing = 1.282 :)

Share This Page