UW-IMAP
from http://wiki.horde.org/ImpUWIMAPNamespaces
To restrict UW-IMAP to the mail/ directory, while still keeping mbox in ~/.
Alternative Method 1 (Unsupported)
If you can not, or do not want to, recompile your UW-IMAP server you can try using this unsupported method of setting the mail subdirectory (folder) location. Here, unsupported means primarily that the UW-IMAP authors do not support this setup - therefore Horde does not fully support this method either. However, many have reported good success with this setup. For more information on this method, refer to docs/imaprc.txt2 in the c-client/imapd distribution.
Create a file called /etc/c-client.cf and insert the following two lines. The last part of the second line is the subdirectory that you want the c-client to use for accessing folders (which is 'mail/' in the following example).
I accept the risk set mail-subdirectory mail
The first line is required to state that you are accepting the risk of using an unsupported configuration file. The second line sets the mail subdirectory that the c-client routines will use (in the above example, it is set to 'mail/').
Note: If you have any other mail clients configured to use a folder prefix (e.g. 'mail/' or similar) they will now need to be reconfigured to remove this setting.
You may also be able able to use this same file to remove unwanted namespace entries. Again, this is totally unsupported. If you want to try this unsupported method of removing shared namespaces (such as #news for example), try adding the following lines to your /etc/c-client.cf file:
set news-state-file /etc/news set restrict-mailbox-access all
Note the above would be in addition to any previously mentioned lines; in particular you always need the "I accept the risk" line in order to your the c-client.cf file.