2

I am using imapsync to migrate my e-mail account from a CPanel (courier) mailserver to a Debian/Dovecot one. The issue I am facing has to do with some folders that contain Unicode characters. For example a mailbox folder containing Greek characters ιs migrated as INBOX.&A5QDtQO7A8QDrwOx- &A6QDzQPAA78DxQ-. Does anybody hava a solution on this?

lefterav
  • 233
  • 2
  • 8

2 Answers2

3

String "INBOX.&A5QDtQO7A8QDrwOx- &A6QDzQPAA78DxQ-" is the correct IMAP foldername code to represent something a more friendly email software could represent as "INBOX.Δελτία Τύπου"

So first, you should check both mailboxes at host1 and host2 from the same email client, it is possible that what you consider an issue is not one at all.

Second, if this is really an issue then this issue could come from Dovecot not allowing some utf-8 characters encoded in utf7_imap.

To be sure of that just try to create the folder in Dovecot by hand and if it works, folder created, look at how imapsync displays it.

To solve this issue, in case there is an issue, you may try to rename folders to an encoding more friendly with Dovecot with the help of imapsync option --regextrans2

To change "&A5QDtQO7A8QDrwOx- &A6QDzQPAA78DxQ-" to "Press Releases"

imapsync ... --regextrans2 "s/&A5QDtQO7A8QDrwOx- &A6QDzQPAA78DxQ-/Press Releases/"

To help finding what actual folder name corresponds to an utf7_imap code, the imapsync tarball contains a script called imap_utf7. Here is an example of its usage:

echo "INBOX.&A5QDtQO7A8QDrwOx- &A6QDzQPAA78DxQ-"  | ./W/learn/imap_utf7
INBOX.Δελτία Τύπου

(I wrote imapsync)

Gilles LAMIRAL
  • 405
  • 2
  • 7
1

Maybe you should try one of the tools dovecot suggests itself. Take a look at this perl script or the build in migration tool named dsync.

user218671
  • 31
  • 3