Changes for nametrans between 6.5.2.1 and 6.5.3.1?

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


On Mon, 7 May 2012 17:48:06 +0200, Andreas Herz <andi at geekosphere.org> wrote:
> I updated from 6.5.2.1 to 6.5.3.1 and i spent the whole day to get my
> mails working again. What changes came with the new version that weren't
> in 6.5.2.1?
> 
> 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 6.5.2.1. But now i got the message:
> "INFINITE FOLDER CREATION DETECTED!"
> And says that a folder KVA.KVA.foobar would be created.

> [andi at workstation ~]% ls Mail/KVA 
> KVA  KVA.INBOX.Drafts  KVA.INBOX.Junk  KVA.INBOX.KVA-ML  KVA.INBOX.Sent
> KVA.INBOX.Trash


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
fine:

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?

Sebastian




More information about the OfflineIMAP-project mailing list