On 24.6.2012, at 18.57, Reinhard Vicinus wrote:
i try to migrate mails from a non dovecot imap server to a dovecot imap server with doveadm backup as described there:
http://wiki2.dovecot.org/Migration/Dsync
i first tried (local-mailbox port 18143 is the non dovecot imap server):
/usr/bin/doveadm -o imapc_user=user@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -R -f -u user@example.org -m Sent imapc:
and got the following error:
dsync(user@example.org): Fatal: dsync backup: Looks like you're trying to run backup in wrong direction. Source is empty and destination is not.
Strange. -R is supposed to make it copy from imapc to mdbox.. Have you tried if Dovecot can see mails at all from the remote server? Try doveadm -o mail=imapc: -o ... fetch instead of doveadm backup command.
As the dovecot imap account is newly created and therefore empty it seams to try to backup from the dovecot imap server to the non dovecot imap server. So i tried instead:
/usr/bin/doveadm -o imapc_user=user@example.org -o imapc_password=imappw -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o imapc_port=18143 -o mailbox_list_index=no -v -D backup -f -u user@example.org -m Sent imapc:
Now this is copying from mdbox to imapc, which is also why you're getting the crash:
Sometimes (every other time?) i got the following segmentation fault:
bt #0 0x00007f15e2c9ed74 in strcasecmp () from /lib/libc.so.6 #1 0x00007f15e327eaff in imapc_save_callback (reply=0x7fff56096a70, context=<value optimized out>) at imapc-save.c:168
Note how it's saving a mail to imapc. But still, that's a bug, fixed: http://hg.dovecot.org/dovecot-2.1/rev/20703dbd1168
dsync(user@example.org): Warning: Destination mailbox Sent has been modified, need to recreate it before we can continue syncing
I think this is also because it's going to wrong direction.
i think the problem could be that the account name on the remote server and the local server is absolute identical and doveadm backup has therefore problems discerning between the two locations. But that's only a stab in the dark and any help is appreciated.
Shouldn't be a problem.