There is a bug when doing “export mailbox” and import mailbox functionality.
> Open Finder and under the “Go” menu, hold down the option key. The “Library” sub-menu will show up.
> Copy the entire “Library > Mail” folder to a USB disk (it will not work if copying to a shared drive for some reason)
> Take the USB disk to the new computer and do an “Import Mailbox” and select the copied Data file. There will be LOTS of folders that come up for import, you can browse through and deselect what you don’t need (e.g. trash or junk mail), OR just import everything and then clean up from your mailbox.
> The imported folders will show up in mail under the “On My Mac” area.