Changes for nametrans between 6.5.2.1 and 6.5.3.1?

Andreas Herz andi at geekosphere.org
Tue May 8 15:02:33 BST 2012


Forgot to CC the ML:

On 08/05/12 at 15:51, Sebastian Spaeth wrote:
> 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.

I never had any nametrans for the local part, so no reverse nametrans.
But you are right with that it's now necessary.

> In your above setup, this happens:
> [...]
> So if you have this nametrans on the local side, things should work just
> fine:

And it does, although i used the reverse function from my example above. 

def localtransfolder_KVA(foldername):
    if(foldername == "KVA"):
        retval = "INBOX"
    else:
        retval = re.sub("KVA\.", "", foldername)
    retval = re.sub("\.", ".", retval)
    return retval

So i guess that 6.5.3.1 is more accurate and correct then 6.5.2.1 was, although
6.5.2.1 already had the reverse nametrans feature.

-- 
Andreas Herz




More information about the OfflineIMAP-project mailing list