A lot of people have noted that there is no support built into Mail for importing a pre-existing IMAP mailbox (.imapmbox). In fact, the developers did build support for importing in, they just didn't know it. Mail.app will read the contents of an .imapmbox if it thinks that such a folder exists on an IMAP server somewhere. Once it believes that such a folder exists and it reads the file, you can copy the files out of this folder into the account you want. Here's the trick. Let's assume that you're trying to import "Foobar.imapmbox" into your account named "Personal."
- In Mail.app, create a dummy IMAP account. I call mine "converter." Enter all bogus information so that there isn't a chance it can contact the machine.
- Create a folder in the converter account having exactly the same name as the folder you want to import (in this case "Foobar").
- Create an empty folder in the Personal account having the name "Foobar" -- it will be empty for now.
- Close Mail.app.
- Now we're going to suddenly populate the "Foobar" folder in the converter account: Locate the local directory where the converter folders are cached. It's probably ~/Library/Mail/IMAP-d@converter or something. Copy your version of Foobar.imapmbox into this directory (it may overwrite an existing version, don't worry about this).
- Now open Mail.app up again. You should see the folder Foobar in the converter account populated with your mail. These messages can now be copied into the Foobar folder in Personal (or wherever else).
[
robg adds: I haven't tested this one...]