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?

2 Answers 2


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)


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.

  • Thanks. Unfortunately Ι have the same issues with both the perl script and dsync
    – lefterav
    May 26, 2014 at 0:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .