Migrate local (On My Mac) mail folders to another mac
I've searched lots and tried the suggestions, but cannot find a way to do this without restoring from Time Machine (another issue). So I've just changed from a 21.5" to a 27" iMac, and have set up the larger device from scratch, reinstalling all the required software from scratch and then copying over the relevant files/folders from old to new. My stumbling block has been mail.
As per suggestions, I've copied over the com.apple.mail.plist file from Preferences and the Mail folder from HD > My Account> Library, and whilst the inbox is now matching my phone, I had about 40 'On My Mac' folders that I cannot see in Mail. I initially tried to export/import mailboxes but no joy there, so tried the Mail/Preferences approach, but neither have made the On My Mac folders visible.
Can anyone tell me how to get the folders over? I'm keen to wipe and refresh the old Mac, but can't do anything until this is sorted.
Thanks in advance
Martin
iMac, macOS Sierra (10.12.5), 27" 16GB RAM