Importing a locally stored mailbox hierarchy


I would like to import into DTPO the contents of a few hundred mailboxes stored locally in Apple Mail. These mailboxes are organized in a hierarchy which ultimately goes up to the ‘On my Mac’ mailbox.

Using ‘File/Import/Email/’, I do see an option to archive the entire ‘On my Mac’ mailbox. However, I just want to archive the mailbox ‘Clients’, its children and grandchildren (/On my Mac/Clients/Adams/, /On my Mac/Clients/Benson/, /On my Mac/Clients/Coleman/2013/, etc)

Unfortunately, when I select ‘Clients’ in the mail import menu, neither ‘Import’ nor ‘Archive’ are accessible. It is as if DTPO does not recognize mailbox hierarchies in ‘On my Mac’ as opposed to those in IMAP accounts.

I tried to work around this problem by writing an applescript importing the actual folders where the mails are stored (~/Library/Mail/V2/Mailboxes/…) but the result was unsatisfactory, as I got a bunch of emlx files with the metadata organized nowhere near as when importing eml files through ‘File/Import/Email/’.

Is there a way for me to import in one single move all the mailboxes that I need, without the drudgery of importing them one by one? I am ready to script if needed.

Many thanks, W.