IMAP question - Moving servers and mail.

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

  1. Brenton

    Brenton New Member

    Hi

    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.

    Regards
    Brenton
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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:
    /srv/mail/vhosts/domain.com/[email protected]/
    content of directory is:
    Code:
    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:
    /var/www/www.domain.com/user/web7_someuser/Maildir/
    content of directory is:
    Code:
    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: http://www.howtoforge.com/forums/showthread.php?t=835

    Regards
    Brenton
     
  4. Brenton

    Brenton New Member

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

    Code:
    imapsync --host1 xxx.xxx.xxx.xxx --user1 [email protected] --password1 xxxxxxxx \
    --host2 yyy.yyy.yyy.yyy --user2 web6_username --password2 xxxxxxxx
    
    where:
    xxx.xxx.xxx.xxx is the older server IP number and
    yyy.yyy.yyy.yyy is the new (ISPConfig - Ubuntu 5.10) server IP number

    [email protected] 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 (mail.domain.com) 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.

    Regards
    Brenton
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    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.

    eg:
    new server
    Code:
    1144425372.M273522P31666V0000000000000301I0013937C_538.[I]hostname.domainname.com[/I],S=1588:2,S
    
    old server
    Code:
    1144172658.V302I282df.[I]hostname[/I]:2,S
    
    I don't know enough about courier to play to much with a live server.

    Thank you very much for your support.

    Brenton
     
  7. Ovidiu

    Ovidiu Active Member

    trying the same, but synchronizing to google apps:

    imapsync --host1 85.214.146.68 --user1 [email protected] --password1 Pass1 \ --host2 imap.gmail.com --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 Howtoforge Staff

    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 imap.gmail.com 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 Howtoforge Staff

  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