Page 1 of 1

imapsync migration courier imap --> scalix

Posted: Wed Jun 20, 2007 10:14 am
by simba
Hi all, :D

we're currently planing to migrate our emails from atm courier imap to scalix.
So i began to search the forum about possible solutions that are already figured out as working. Thus I discovered imapsync. Today I started a few tests and tried to migrate a testaccount from courier to my scalix testenvironment.
The procedure of copieing the mails just went fine, but i was stuck on a little problem: As far all folders from the testaccount seemed to be copied well to scalix, BUT e.g. in courier sent items are put into an imap folder called SENT (or INBOX.sent) which should be equivalent to the scalix SENT ITEMS folder I think. But imapsync just copies the SENT folder (with its mails included) from courier into Scalix as if it was a simple folder and does not just copy the mails into the SENT ITEMS folder. Has anybody ever had a similar problem, or does anybody have a clue how to resolve this issue?

any ideas or maybe solutions would be greatly appreciated

greets

simba

Posted: Wed Jun 20, 2007 3:29 pm
by a.schild
Hello,

this is the normal imapsync behaviour, it just copies everything 1:1.
There are commandline switches in imapsync, where you can specify if you wish to have different mappings.

André

Re: imapsync migration courier imap --> scalix

Posted: Wed Jun 20, 2007 4:02 pm
by ahathaway
simba wrote:[snip] in courier sent items are put into an imap folder called SENT (or INBOX.sent) which should be equivalent to the scalix SENT ITEMS folder I think. But imapsync just copies the SENT folder (with its mails included) from courier into Scalix as if it was a simple folder and does not just copy the mails into the SENT ITEMS folder. Has anybody ever had a similar problem, or does anybody have a clue how to resolve this issue?

any ideas or maybe solutions would be greatly appreciated

greets

simba


Simba,

Check the imapsync README and the FAQ for information about using the --regextrans2 flag.

From the imapsync FAQ:
======================================================================
Q. I have moved from Braunschweig to Graz, so I would like to have my whole
Braunschweig mail sorted into a folder INBOX.Braunschweig of my new mail
account.

R.
1) First try (safe mode):

imapsync \
...
--regextrans2 's/INBOX(.*)/INBOX.Braunschweig$1/' \
--dry --justfolders

2) See if the output says everything you want imapsync to do,
--dry option is safe and does nothing real.

3) Remove --dry
Check the imap folder tree on the target side

4) Remove --justfolders

=======================================================================
Q. Give examples about --regextrans2

R. Examples:

1) To remove INBOX. in the name of destination folders:
--regextrans2 's/^INBOX\.(.+)/$1/'

2) To sync a complete account in a subfolder called FOO:
--regextrans2 's/^INBOX(.*)/INBOX.FOO$1/'


--
Aaron Hathaway

Posted: Thu Jun 21, 2007 6:07 am
by simba
I'm clear about that funktion although it is described very thin....
But what im not sure of is how the folders are named in scalix....
is it INBOX.Sent\ Items? or is it an other naming?

In generall imapsync is working fine for me... but as a lazy admin... i dont want to move all the mails by hand :wink:

greets

simba

Posted: Thu Jun 21, 2007 6:23 am
by jaime.pinto
Scalix follows the standard Outlook naming convention:
Inbox
Sent Items
Drafts
Deleted Items

I had a similar situation with SquirrelMail. I just renamed the folders for each user before hand (it was a very easy task from a linux shell under each /home/user on the old mail server)
Jaime

Posted: Thu Jun 21, 2007 7:07 am
by simba
Thats unfortunately no solution for me :( cause the mailserver is still productiv...
Maybe sombody can tell me where scalix saves the mails? or if i can specify foldernames directly on mailbox/user creation?

greets

simba

Posted: Thu Jun 21, 2007 7:32 am
by jaime.pinto
It's not a good practice to change the standard folders on the scalix server because it will mess up those users that access the server with Outlook, evolution, etc.

On the other hand, there should not be any problems doing what I suggested previously even if the server is in production. You can do one user at the time (or a batch of users). Once the emails are transfered there shouldn't be any "pressing" reason for them to return to the old server anymore. But if you still give them access to the old server, all they will see is the naming convention already matching what they will find on the new server anyway, So it's not a big deal.
Jaime

Posted: Thu Jun 21, 2007 7:47 am
by simba
So I just solved the problem, regextrans works with regular expressions & wildcards (as its name says :roll:) so the command was, for those who also have the problem with courier and INBOX.sent:

Code: Select all

imapsync --host1 server1 --user1 user --password1 secret  --host2 server2 --user2 user --password2 secret --regextrans2 's/Sent(.*)/Sent\ Items$1/'


and not:

Code: Select all

... --regextrans2 's/INBOX.Sent(.*)/Sent\ Items$1/'


as i thought...

greets & many thx 4 help

simba