On 4/3/19 2:23 PM, Sami Ketola via dovecot wrote:
On 3 Apr 2019, at 13.40, Michael Goth via dovecot <dovecot@dovecot.org> wrote:
Hi!
I'm trying to migrate a mailbox from an old IMAP server (not Dovecot) to a new Dovecot server with 'doveadm backup'. The command fails because of an unexpected character in a mailbox name:
doveadm -o imapc_user=ag@example.org
-o imapc_password=XXX
-o imapc_host=old-mailserver.webflow.de
-o imapc_port=993
-o imapc_ssl=imaps
-o imapc_ssl_verify=no
-o imapc_features=rfc822.size,fetch-headers
-o ssl_client_ca_dir=/etc/ssl
backup -R -f -x ~* -u migration-ag@example.org imapc:dsync(migration-ag@example.org): Info: imapc(old-mailserver.webflow.de:993): Connected to 1.1.1.1:993 (local 2.2.2.2:46154) dsync(migration-ag@example.org): Error: Failed to access mailbox Entw?rfe: mailbox does not exist
The problem is with "Entw?rfe" here. It's actually Entw<0xfc>rfe, which translates to "Entwürfe" in ISO-8859-1.
Why can't doveadm find that mailbox? Is the old mailserver misbehaving (I hope not because I have no idea how to change that...), or does this happen on the new server? Can I tell doveadm something that makes this work?
Can you log on the remote imap server with telnet or nc and ask for: A LIST "" "*"
I think your legacy server does not encode the folder names correctly.
That too includes the <FC> byte in its output. But I've found that only a couple of mailboxes are affected, so i just renamed the folders.
Thanks for your help!
Michael