Unable to create subfolders using Python/IMAPClient

I’m hoping to use a Python programme to create many subfolders at Runbox. I’ve been trying to get some code to work using the IMAPClient library, with no success.

Here’s what I have:
result = server.create_folder('Test')
Works properly - the new folder is visible in Runbox 6, Runbox 7 and Thunderbird.

(Delete folder Test)

Try to create Test plus a chain of subfolders

result = server.create_folder('Test.a.b.c')

No error is reported, but

  • In Runbox 7, the only new folders are Test and c. C is shown at root level. Test has no subfolders.
  • In Runbox 6, a new folder called Test.a.b.c is created. Test has no subfolders but is named differently.
  • In Thunderbird, no new folder is shown.

Environment: IMAPClient 3.0.0, Python 3.12.3

I must be making some sort of fundamental error here, and I would be glad if someone could suggest what it might be.