Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 02-18-2009, 10:06 AM   #1
LQ Newbie
Registered: Feb 2009
Posts: 10

Rep: Reputation: 0
Problem with copying user emails with IMAPSYNC

Hi there!

I have an old mailserver based on QMAIL with Courier IMAP Server. The new MailServer is based on Kerio MailServer 6.2

All user accounts are imported in Kerio from .csv file with passwords.

The old server has about 500 user mailboxes.

I did following commands on both servers:

Old server:

1. telnet oldserver 143
telnet localhost 143
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information.

a01 login username password
a01 OK LOGIN Ok.

a02 list "*" ""
a02 OK LIST completed

a03 list "" "*"
* LIST (\HasNoChildren) "." "INBOX.Drafts"
* LIST (\HasNoChildren) "." "INBOX.Trash"
* LIST (\HasNoChildren) "." "INBOX.Sent"
* LIST (\HasNoChildren) "." "INBOX.Spam"
* LIST (\Marked \HasChildren) "." "INBOX"
a03 OK LIST completed

Now I did same commands on

New MailServer

telnet newmailserver 143

a01 login username password
a01 OK LOGIN completed

a02 list "*" ""
* LIST (\Noselect) "/" ""
a02 OK LIST completed

a03 list "" "*"
* LIST () "/" "INBOX"
* LIST () "/" "Deleted Items"
* LIST () "/" "Drafts"
* LIST () "/" "Junk E-mail"
* LIST () "/" "Sent Items"
* LIST (\Noselect) "/" "Public Folders"
* LIST (\Noselect) "/" "Archive Folders"
a03 OK LIST completed

The problem is:

How to copy all users email from their old mailserver to new mailserver without making changes in directory structure of the new mailserver?

Last edited by vitaliok; 02-18-2009 at 10:14 AM. Reason: add more tags for search
Old 02-18-2009, 11:24 AM   #2
Registered: Dec 2003
Location: Calgary, AB
Distribution: Any!
Posts: 146

Rep: Reputation: 18
imapsync is pretty flexible, so it should be possible. Check out this entry in the FAQ (

Q. Is it possible to synchronize all messages from one server to
another whithout recreating the folder structure and the target server.
Old 02-19-2009, 04:45 AM   #3
LQ Newbie
Registered: Feb 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Problem with Imapsync

I was looking the page you show me. But I am new to Imapsync.

I just want to know what is the exact command of Imapsync I need to execute to do my job.

I tried the command:

imapsync --host1 oldserver --host2 newserver --user1 olduser --user2 newuser --password1 oldpassword --password2 newpassword --nosyncacls --subscribe --syncinternaldates --noauthmd5 --sep1 / --prefix1 / --sep2 / --prefix2 ""

It copies only email from admin to admin and creates new folders on my new server, which I don't need.

my old server has "." as you see on my question, the new server has "/"


copy, courier, imap, linux, mailboxes, mailserver, migration, syncronization, user, users

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send automatic emails to user GATTACA Linux - Software 6 07-16-2007 10:34 PM
moving saved Evolution emails from user to user voly Linux - Software 1 01-25-2006 05:13 AM
checking user emails DJOtaku Linux - General 3 05-09-2005 04:48 PM
copying user quotas from proto user jomy Linux - Enterprise 0 01-09-2005 02:06 AM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration