The problem is a peculiar issue with the 'mailbox prefix' settings. The courier manual tells us to use 'INBOX,' which does indeed correctly show the subfolders. Unfortunately, courier-imap does not use this prefix for the main inbox, which is what is causing the problems.
The solution is server-side. In your mail directory, you will see sub-folders listed as following:
So, to keep both courier happy and fool Mail.app into thinking there is a mailbox called "INBOX," all that is needed is a little soft-link or two:
[user@server ~/Maildir]% ls -l 2 user vmail 4096 Nov 14 17:12 . 3 user vmail 4096 May 3 2003 .. 1 user vmail 393 Nov 10 09:16 courierimapsubscribed 1 user vmail 1705 Nov 14 17:12 courierimapuiddb 1 user vmail 95922 May 3 2003 courierpop3dsizelist 2 user vmail 176128 Nov 14 17:12 cur 5 user vmail 4096 Jun 12 12:55 .INBOX.bbedit 5 user vmail 4096 Mar 31 2003 .INBOX.bugtraq 5 user vmail 4096 Mar 14 2003 .INBOX.bugzilla
[user@server ~/Maildir]% ln -s . .INBOX [user@server ~/Maildir]% ln -s . .INBOX.I've been too lazy to find out which of the two did it, but with these links installed on the server, Panther's Mail.app correctly recognizes the inbox and allows you to use rules to sort to the sub-folders the way it should. Jay!
[robg adds: I trimmed the permission info from the ls output to narrow the display a bit. Since it's not used in the hint, it wasn't really necessary to see.]