Fixing a corrupted OS X Mail structure after an import of mailboxes from the previous system volume Due to various and persisting problems, I had to reinstall 10.8.2.

What I did


Shut down iMac with internal system disc A.
Started 10.8.2 recovery system
Copied iMac's system disc A to an external disc B as an image using Disc Util
Erased system disc A as HFS / journaled
Run a clean install on A


Then, I told OS X Mail to import old mailboxes from B into the fresh Mail system.

Ugly result

Unfortunately, I got tons of tons of deeply nested folders, which eventually contain email:

/Import-5
  V2
     POP-something
        Drafts
          0563726277
              Data
                   9
                     7
                       8
                          Mails
                            &lt;this folder finally contains some emails&gt;


Not hardly to see, I can't use these imported folder structure any more.

Question

Is anybody aware of a tool to fix such problems?
That "ugly" result is not a corruption or mistake, it's the way the Mail folder is structured now.

If you've been messing with its contents, I'd suggest emptying ~/Library/Mail/V2 and starting over again from your original source, re-importing or using Migration Assistant. 

No, I don't know why either.