Differences between revisions 5 and 6
Revision 5 as of 2013-05-31 08:40:50
Size: 2417
Editor: maegger
Comment:
Revision 6 as of 2018-11-23 16:08:53
Size: 0
Editor: maegger
Comment: We use now Maildir and Maildir is capable of that
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Problem =
I would like to create some subfolders within imap. How can i do that?

= Solution =
Since our Mail infrastructure is using the [[http://en.wikipedia.org/wiki/Mbox|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.

 * open a Terminal and change into the Mail directory.
{{{
cd
cd Mail
}}}
 * If you type {{{ls}}} you should see the files which represent the folders in your email program.
{{{
user@machine:~/Mail $ ls
Junk Membership Sent Tickets Drafts Templates Trash
}}}
 * We want a {{{classes}}} directory which then contains a file for each class (class-a, class-b and class-c).
{{{
mkdir classes
touch classes/class-{a,b,c}
}}}
 * to create another subfolder into the classes subfolder do the same steps.
{{{
mkdir classes/bigclass
touch classes/bigclass/{males,females}
}}}
 * The structure should now look like the following:
{{{
maegger@rista:~/Mail $ ls * */*
Junk Membership Sent Tickets Drafts Templates Trash

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

classes/bigclass:
females males
}}}
 * Depending on the program you are using to view your mails you have maybe to {{{subscribe}}} to folders (e.g. thunderbird). In other cases (e.g. if you are using [[https://email.ee.ethz.ch/|webmail]] ) the new folders are still visible after you login.

{{{#!wiki caution
'''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'''.
}}}
 * '''Screenshot of Thunderbird'''<<BR>>{{attachment:imap_subfolder_thunderbird.png}}
 * '''Screenshot of Webmail'''<<BR>>{{attachment:imap_subfolder_webmail.png}}
----
[[CategoryMAIL]]