Changes for nametrans between and

Sebastian Spaeth Sebastian at
Tue May 8 14:51:09 BST 2012

On Mon, 7 May 2012 17:48:06 +0200, Andreas Herz <andi at> wrote:
> I updated from to and i spent the whole day to get my
> mails working again. What changes came with the new version that weren't
> in
> I use this script for nametrans for remote:
> import re
> def oimaptransfolder_KVA(foldername):
>     if(foldername == "INBOX"):
>         retval = "KVA"
>     else:
>         retval = "KVA." + foldername
>     retval = re.sub("/", ".", retval)
>     return retval
> and i call this function for my mail account under remote at nametrans =
> and it worked up to But now i got the message:
> And says that a folder KVA.KVA.foobar would be created.

> [andi at workstation ~]% ls Mail/KVA 

You will need to show us the reverse nametrans rule. Folder creation on
the remote server will require to translate names in both directions.

In your above setup, this happens:

your remote folderfilter prefixes "KVA." so INBOX.Junk becomes
KVA.INBOX.Junk on the local maildir.

On the next sync, OLI will try to create the KVA.INBOX.Junk directory on
the server, as it exists on the local side and there is no nametrans
rule to apply. BUT it does a sanity check and notices that if
KVA.INBOX.Junk on the remote would again be propagated as
KVA.KVA.INBOX.Junk to the local side, causing an infinite cycle.

So if you have this nametrans on the local side, things should work just

folderfilter = lambda f: f == 'KVA' and 'INBOX' or re.sub('^KVA.','',f)

(Attention: smart lambda here, it basically returns INBOX if you input
KVA and strips of any leading "KVA." otherwise.

Does this solve your problem?


More information about the OfflineIMAP-project mailing list