Offlineimap 6.4.1 and nested labels in Gmail

less than 1 minute read

I just upgraded to offlineimap 6.4.1 and I was getting the following error message:
"ERROR: INFINITE FOLDER CREATION DETECTED! Folder '.foo' (repository 'gmailLocal') would be created as folder '/foo' (repository 'gmailRemote'). The latter becomes '' in return, leading to infinite folder creation cycles. SOLUTION: 1) Do set your nametrans rules on both repositories so they lead to identical names if applied back and forth. 2) Use folderfilter settings on a repository to prevent some folders from being created on the other side."

It seemed a little strange that this particular folder was throwing an error message while others did not. I realized it's because the label "foo" itself didn't exist in my list of labels. I only had labels nested within it. In other words I had the folders "foo/bar", "foo/bla" but I didn't have "foo" by itself. It was working fine before I upgraded never really thought about it much before today.

I created the top level labels in Gmail where needed, and now everything seems to be fine.