# [Solved!] No subfolders are displayed by IMAP clients

## warpster

Hello.

I set up my own SMTP server with IMAP following this guide --> http://gentoo-wiki.com/HOWTO_Email_System_for_the_Home_Network pretty much verbatim. I can send and even receive mail fine, the only problem is that, when accessing the account with my IMAP client (so far I tried the latest versions of Sylpheed-Claws and Mozilla Thunderbird), none of the subfolders in my maildir are seen. I played a bit with Courier's config ( I'm using Courier IMAP-SSL 3.0.8 ), enabling for instance the option IMAP_CHECK_ALL_FOLDERS, and I made sure that the clients were similarly configured. This however didn't seem to help.

When I open my mail with Mutt, it will see all my folders no problem, showing all of them when I press c (to change folders) and only the ones I specified in .muttrc when I start it as "mutt -y". But I'm trying to create a setup where I can access my mail (in the same maildir) either with Mutt, or with a GUI client, or through the web (Squirrelmail), choosing whatever is more appropriate at the moment. The mail gets fetched by fetchmail or getmail and not through the clients, and all the accessing is done through IMAP (except in mutt's case, of course, because mutt is always used locally), so it should work... and it does: my GUI clients correctly display the mail in INBOX, just as Mutt does. But the subfolders are not displayed.

Does anyone have any suggestions for me? I would greatly appreciate any help... I've asked in #gentoo several times for help on this but have never received any reply. Googling and reading the docs has only plunged me deeper into confusion so far... what I need is some simple troubleshooting, as I'm sure that whatever I'm doing wrong must be pretty obvious. Also, I think this deserves to be in the HOWTO I followed, because most people that use it will likely need this functionality. Please help me write that addendum!  :Smile: 

Thank you so much.

--warpster

PS: Oh, also, I'm sure that many of the more experienced users out there who have set up their own SMTP servers have opinions on my setup. I would welcome any comments and/or suggestions with regards to making my server more secure/better/more flexible/whatever. I don't want to turn this into a thread about which is the best mailserver setup, I just mean to let you know that I'm open to any suggestions for improvement. Thanks again.Last edited by warpster on Mon Feb 14, 2005 4:29 am; edited 1 time in total

----------

## j-m

Hmm, AFAIK you must subscribe to any folders except the special ones (Inbox, Trash, Sent, Drafts) unless your client supports  IMAP_CHECK_ALL_FOLDERS. Many clients don´t.

----------

## warpster

Yes, I know, but when trying to subscribe (through the client's IMAP configuration), the only folder seen is still INBOX. Any other ideas?

----------

## justanothergentoofanatic

Are you sure you created the subfolders using maildirmake with the -f flag? 

For example:

```
maildirmake -f test /var/mail/virtual/user/.maildir
```

I just use Courier for everything because it is a lot easier to set up than a half dozen separate programs thrown together. But there isn't anything fundamentally wrong with your chosen setup.

-Mike

----------

## warpster

Thank you so much! That worked. Apparently, I hadn't created those folders with maildirmake after all... even though I thought I did. Again, thanks for helping me solve my problem, and for the comments about my setup as well.

----------

## dalcorta

I also did the same server but I also followed these instrucctions to show the folders ( I'm using thunderbird):

 Folders Not Showing Up In Email Client

One problem that may exist is your subfolders which you have redirected email to using procmail are not showing up in your email client. One option to look for is to subscribe to all folders. Many email clients, even SquirrelMail require the user to specify which subfolders to subscribe to before they show the email there. Also, keep in mind that the subfolders will be created by procmail when email arrives. There's no need to maildirmake any directories aside from the main one (~/.maildir).

Another place to look is the file ~/.maildir/courierimapsubscribed. If you open this file in a text editor you'll notice it has a list of your subsribed folders. Simply add any folders you want in this file. One such example:

Code: ~/.maildir/courierimapsubscribed

INBOX.gentoo

INBOX.gentoo-gwn

INBOX.gentoo-announce

Normally your email client will take care of this, but this is another place to look for errors. Simply restart your courier-imapd-ssl server after editing this file and you're set. Thanks to Fragbeestje for bringing this to our attention. 

I edited the file courierimapsubscribed.

The prob is when I click on the folder it say (thunderbird): Mailbox does not exist, or must be subscribed to...

How do I fix it?

Thanks

----------

## fourhead

Hi, perhaps I find some help here. I've set up a very similar mail server, but on a Debian server. I manage my IMAP account with KMail, and all folders (personally created subfolders and those special ones like Drafts, Sent, Trash etc.) are shown UNDER the Inbox. Well it's a little confusion to have Inbox->sent. OK, I have the option to use a folder prefix, if I set this to INBOX then ALL folders are displayed BESIDES Inbox, even the ones that I want to have within the Inbox. Until today I didn't find a way to have subfolders in Inbox, and the special Sent&Trash folders BESIDES the Inbox, just the way it should be and how every mail client normally does it. Is there ANY way to do this? I've read a lot of posts about this with no solution, but like this IMAP is really not nice to handle.

Tom

----------

