Email archiving woes

I’ve been in the slow process of archiving my emails off my High Sierra iMac and into a specific DEVONThink database. The archive a mail box function won’t work because I need to split them up by year in the receiving database. Drag and drop is bloody slow. I had one case where I was moving about 2000 messages out and it ran for over 3 days before it finally finished. I’ve been back and forth with DT Support trying things because they can’t figure out why it’s so slow on my machine. Anyway as yet another relatively short transfer of less than 1000 messages was stalled at 4 days and counting I was told to stop it and then try the message send to DT3 option.

That appeared to work but somehow, and I am not sure at all how it happened, my entire reference folder was empty. It appeared as if all messages are now gone. Contacts with Apple Support said to try a Rebuild even though all my mail accounts are POP accounts. I questioned the advice but decided to try anyway. Total CF. I still have an empty on my Mac folder.

So, next attempt was to pull that mailbox file from Time Machine, which failed for lack of space on my hard drive. Found ways to delete some stuff, dumped a bunch of backups off onto our NAS server, stopped some automatic backup things I had running and tried again. It appears to have run and I had a new .mbox file in a separate location. (I did not want to overwrite whatever was already in the system yet.)

Then following Apple support instructions I am trying to import that as a new mailbox on my iMac. That is now stuck, or appears to be stuck. It’s been running for over 30 hours and I have no indication that anything is happening at all.

The .mbox in question contained something like 35K messages that I need to save.

So does anyone have any other ideas on how to recover the messages into Apple mail so I can then copy them to DEVONThink and then delete them out of mail?

The entire project is to try to clean up my iMac in preparation for a nuke and pave install of Catalina. My email has been moved forward from machine to machine and operating system to operating system for over 15 years so I am sure there is a lot of junk hanging on that needs to be dealt with. For that and other software reasons I feel a full nuke and pave is the better install option.

can’t you just import the mbox file into DevonThink?

Not without everything coming into the same folder in DT. I have to split out the messages into folders for each year. Import mailbox is useless for that.

How about importing the whole mbox, then using smart folders to divide them out by year. From there, you could drag them into “dumb” folders if you prefer.