If you use IMAP with Apple's Mail, but are using Dovecot as your mail server (standard with Fedora and many Linux distros), you may have noticed a huge problem in making nested folders work. This is primarily because Dovecot uses a different separator from most mail servers, and the 10.4 version of Mail simply won't let you make nested mail folders.
There's an easy fix though. Simple open up a Terminal window and log into your Linux account. (Presumably this is the same with BSD, Solaris or other Unix variants running Dovecot, but I've only tested on Linux) There is a directory with your IMAP mail, typically named mail. In it there are files representing your mailboxes.
First create the mailboxes you plan on using via Apple's Mail (via the plus button on the lower left -- make sure you create an IMAP mail box). Mail will create them on the top level. In Terminal in your Linux mail directory, create a directory with mkdir with the name of the "mother" directory you wish to use. Then move (mv) the directories you created with Mail into this directory. Mail.app should now show your mother directory in white, and then your moved mail directories as nested in it.
Note that some other IMAP clients may have trouble with this if you don't also modify .subscriptions. This is in the top level of your mail directory on your Linux home directory. But it is hidden, so it won't show up with ls unless you do a ls -a. (In Unix all directories starting with a period are hidden.) Simply open this up with your favorite editor (I usually use vi), and make sure that the mailboxes you created in Mail.app have the right paths -- they should be of the sort mother/daughter.
I hope this helps, as I'd searched the internet trying to figure out how to do this and arrived at this by trial and error. I'm sure a lot of other people who use Fedora as their server were getting frustrated with Mail.
Mac OS X Hints
http://hints.macworld.com/article.php?story=2007090423071517