HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   IMAP question - Moving servers and mail. (http://www.howtoforge.com/forums/showthread.php?t=3557)

Brenton 7th April 2006 11:01

IMAP question - Moving servers and mail.
 
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

till 7th April 2006 11:28

Does both servers use Maildir?

Brenton 7th April 2006 12:23

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/someuser@domain.com/
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

Brenton 7th April 2006 14:29

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

Code:

imapsync --host1 xxx.xxx.xxx.xxx --user1 user@domain.com --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

user@domain.com 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

till 7th April 2006 17:03

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.

Brenton 7th April 2006 19:53

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.hostname.domainname.com,S=1588:2,S
old server
Code:

1144172658.V302I282df.hostname: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

Ovidiu 9th May 2010 19:02

trying the same, but synchronizing to google apps:

imapsync --host1 85.214.146.68 --user1 postmaster@mydomain.de --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?

falko 10th May 2010 14:07

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

Ovidiu 10th May 2010 16:32

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?

Ovidiu 12th May 2010 18:13

sorry guys, any more help on this?


All times are GMT +2. The time now is 10:28.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.