My advanced IMAP server settings dialog has "Server supports folders that contain subfolders and messages" checked, "INBOX." and "shared." as folder namespaces, and "allow server to override these namespaces." I don't remember if I had to set these manually. The only thing I had to manually reset is to bump down the maximum number of server connections to 4. It's possible that your random problems are due to Mozilla's default concurrency setting of 5, which exceeds Courier-IMAP's default limit of 4 connections accepted from the same IP address concurrently, which may result in random problems.
I'd love to get to the bottom of this. I was hoping it was just a Mozilla bug and would eventually go away with a new release, but it hasn't. Here's a document with screenshots that describes the problem:
http://karmak.org/2003/courier-imap/problems/mozilla-imap/
Based on that, the obvious conclusion I make is that a bug was introduced in Mozilla 1.3.
If you set IMAPDEBUGFILE in order to log the IMAP session, it's almost a certainty that you'll see an invalid command coming out of Mozilla.
pgp00000.pgp
Description: PGP signature
