Many people are aware that in order to get sub-boxes to appear in IMAP accounts, you must have more than one account. If you only have one real email account, you must create a dummy account. In certain versions of Mail, when you manually click the Get mail button, the dummy acount will be checked. This means mail tries to connect to dummy.com (or whatever you put as the mail server), and results in an annoying and useless error message taking the dummy account offline.
Unfortunately, when creating the dummy account, Mail forces you to enter a server name. You can get around this by entering a name, quitting, and manually editing ~/Library -> Preferences -> com.apple.Mail.plist. Search for the tag under the dummy account, and in the field that follows, remove the dummy hostname so you have:
<key>Hostname</key>
<string></string>
with no characters between the tags. Relaunch Mail, and enjoy your error-free existence.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040210181212492