Revision 4 as of 2010-09-15 12:12:47

Clear message

Problem

I would like to create some subfolders within imap. How can i do that?

Solution

Since our Mail infrastructure is using the Mbox format every folder you see is in reality one file. This restricts your email client to only create one subfolder without any subsubfolders.

But since your Emails are all stored in ~/Mail you can manually create some subfolders. In these "real" subfolders your email program can then create one level of subfolders. If you need more subfolder-depth you can create them manually.

See the following example on how to create a classes folder which then contains some subfolders ans subsubfolders.

cd
cd Mail

user@machine:~/Mail $ ls
Junk   Membership   Sent   Tickets   Drafts   Templates   Trash

mkdir classes
touch classes/class-{a,b,c}

mkdir classes/bigclass
touch classes/bigclass/{males,females}

maegger@rista:~/Mail $ ls * */*
Junk   Membership   Sent   Tickets   Drafts   Templates   Trash

classes:
bigclass/  class-a  class-b  class-c

classes/bigclass:
females  males

Important Warning!

Since this solution is some kind of dirty Hack we don't guarantee that it will work everywhere and under any circumstances. Every client handels this situation slightly different. E.g. while the webmail client can show the bigclass sub-subfolder and its folders males and females Thunderbird allows only to subscribe to the folders within classes.