[Dovecot] Is it possible to migrating mail to dovecot using imapc?
I'm excited to hear that dovecot now supports imap as a mailbox type.
I've got a mailbox over on another imap server, which I want to migrate to dovecot. I was wondering whether I could use 'doveadm backup' to setup a two way synchronisation process between the old imap mailbox and the new dovecot mailbox. That way I can do the migration, and can coordinate the mail clients changing where they pick up their email from later.
But, I can't find much documentation on imapc, other than it exists.
Is this kind of move possible now? Would someone mind giving me some hints as to how to make it work please?
Thanks :), Joe
On 30.3.2012, at 22.44, Dr Josef Karthauser wrote:
I'm excited to hear that dovecot now supports imap as a mailbox type.
I've got a mailbox over on another imap server, which I want to migrate to dovecot. I was wondering whether I could use 'doveadm backup' to setup a two way synchronisation process between the old imap mailbox and the new dovecot mailbox. That way I can do the migration, and can coordinate the mail clients changing where they pick up their email from later.
But, I can't find much documentation on imapc, other than it exists.
Is this kind of move possible now? Would someone mind giving me some hints as to how to make it work please?
One-way sync will work fine. Two-way sync might be a bit troublesome. For redesigned dsync I've started thinking about kind of a 1,5-way sync. :) That would make sure that all messages from A are copied to B and no messages are deleted from B, but doesn't try to copy new messages from B to A.
http://wiki2.dovecot.org/Migration/Dsync anyway has some docs.
On 30 Mar 2012, at 20:52, Timo Sirainen wrote:
On 30.3.2012, at 22.44, Dr Josef Karthauser wrote:
I'm excited to hear that dovecot now supports imap as a mailbox type.
I've got a mailbox over on another imap server, which I want to migrate to dovecot. I was wondering whether I could use 'doveadm backup' to setup a two way synchronisation process between the old imap mailbox and the new dovecot mailbox. That way I can do the migration, and can coordinate the mail clients changing where they pick up their email from later.
But, I can't find much documentation on imapc, other than it exists.
Is this kind of move possible now? Would someone mind giving me some hints as to how to make it work please?
One-way sync will work fine. Two-way sync might be a bit troublesome. For redesigned dsync I've started thinking about kind of a 1,5-way sync. :) That would make sure that all messages from A are copied to B and no messages are deleted from B, but doesn't try to copy new messages from B to A.
http://wiki2.dovecot.org/Migration/Dsync anyway has some docs.
But, 'dsync mirror' does a two way sync, doesn't it? Can't I just do that with imapc as the source mailbox?
Joe
On 30.3.2012, at 22.55, Dr Josef Karthauser wrote:
One-way sync will work fine. Two-way sync might be a bit troublesome. For redesigned dsync I've started thinking about kind of a 1,5-way sync. :) That would make sure that all messages from A are copied to B and no messages are deleted from B, but doesn't try to copy new messages from B to A.
http://wiki2.dovecot.org/Migration/Dsync anyway has some docs.
But, 'dsync mirror' does a two way sync, doesn't it? Can't I just do that with imapc as the source mailbox?
It does, but the two way sync mirroring relies on messages having GUIDs. IMAP protocol doesn't have such a concept. I guess it could be kind of emulated by using e.g. GUID = sha1(message header). The pop3-replication plugin kind of does this already. But adding such code makes the regular "doveadm backup" slower since now it has to fetch first message headers and then message bodies. But I guess this could be an optional feature. Hmh.
On 30 Mar 2012, at 20:59, Timo Sirainen wrote:
On 30.3.2012, at 22.55, Dr Josef Karthauser wrote:
One-way sync will work fine. Two-way sync might be a bit troublesome. For redesigned dsync I've started thinking about kind of a 1,5-way sync. :) That would make sure that all messages from A are copied to B and no messages are deleted from B, but doesn't try to copy new messages from B to A.
http://wiki2.dovecot.org/Migration/Dsync anyway has some docs.
But, 'dsync mirror' does a two way sync, doesn't it? Can't I just do that with imapc as the source mailbox?
It does, but the two way sync mirroring relies on messages having GUIDs. IMAP protocol doesn't have such a concept. I guess it could be kind of emulated by using e.g. GUID = sha1(message header). The pop3-replication plugin kind of does this already. But adding such code makes the regular "doveadm backup" slower since now it has to fetch first message headers and then message bodies. But I guess this could be an optional feature. Hmh.
I have a need of it right now. If there's something quick and dirty that I can do, that would be great. It would take the risk out of migrating my users over to dovecot. :) How much code would what you propose be?
Joe
On 30.3.2012, at 23.02, Dr Josef Karthauser wrote:
It does, but the two way sync mirroring relies on messages having GUIDs. IMAP protocol doesn't have such a concept. I guess it could be kind of emulated by using e.g. GUID = sha1(message header). The pop3-replication plugin kind of does this already. But adding such code makes the regular "doveadm backup" slower since now it has to fetch first message headers and then message bodies. But I guess this could be an optional feature. Hmh.
I have a need of it right now. If there's something quick and dirty that I can do, that would be great. It would take the risk out of migrating my users over to dovecot. :) How much code would what you propose be?
I suppose to do it quick and dirty you could just copy&paste the get_hdr_sha1() from http://hg.dovecot.org/dovecot-2.1/rev/78317179b4af to imapc code and have imapc_mail_get_special() use it for returning GUID.
On 30 Mar 2012, at 21:08, Timo Sirainen wrote:
On 30.3.2012, at 23.02, Dr Josef Karthauser wrote:
It does, but the two way sync mirroring relies on messages having GUIDs. IMAP protocol doesn't have such a concept. I guess it could be kind of emulated by using e.g. GUID = sha1(message header). The pop3-replication plugin kind of does this already. But adding such code makes the regular "doveadm backup" slower since now it has to fetch first message headers and then message bodies. But I guess this could be an optional feature. Hmh.
I have a need of it right now. If there's something quick and dirty that I can do, that would be great. It would take the risk out of migrating my users over to dovecot. :) How much code would what you propose be?
I suppose to do it quick and dirty you could just copy&paste the get_hdr_sha1() from http://hg.dovecot.org/dovecot-2.1/rev/78317179b4af to imapc code and have imapc_mail_get_special() use it for returning GUID.
Do you think that this will reliably do the trick?
Joe
On 30.3.2012, at 23.26, Dr Josef Karthauser wrote:
I suppose to do it quick and dirty you could just copy&paste the get_hdr_sha1() from http://hg.dovecot.org/dovecot-2.1/rev/78317179b4af to imapc code and have imapc_mail_get_special() use it for returning GUID.
Do you think that this will reliably do the trick?
If it works at all, I guess it should work reliably. :)
On 30 Mar 2012, at 21:28, Timo Sirainen wrote:
On 30.3.2012, at 23.26, Dr Josef Karthauser wrote:
I suppose to do it quick and dirty you could just copy&paste the get_hdr_sha1() from http://hg.dovecot.org/dovecot-2.1/rev/78317179b4af to imapc code and have imapc_mail_get_special() use it for returning GUID.
Do you think that this will reliably do the trick?
If it works at all, I guess it should work reliably. :)
Hmm. Didn't appear to:
% dsync -Dv -u joe@local.com -o imapc_host=mail.remoteimap.com -o imapc_port=143 -o imapc_username=joe@ remoteimap.com -o imapc_password='somepass' mirror imapc: > & /tmp/output
produced the following output.
What do you think?
Joe.
On 30.3.2012, at 23.42, Dr Josef Karthauser wrote:
% dsync -Dv -u joe@local.com -o imapc_host=mail.remoteimap.com -o imapc_port=143 -o imapc_username=joe@ remoteimap.com -o imapc_password='somepass' mirror imapc: > & /tmp/output
produced the following output.
dsync(joe@email.com): Error: Mailbox INBOX changed its GUID (f38c263a4919764f1b560100c516a7a4 -> c92f64f79f0d1ed01e6d5b314f04886c)
dsync + imapc requires indexes. So you need to use e.g. imapc:/tmp/dsync-imapc
participants (2)
-
Dr Josef Karthauser
-
Timo Sirainen