thunderbird / import-export-tools-ng

Import Export Tools that supports Thunderbird v68-v128
Other
293 stars 31 forks source link

How to use Apple export script to import to Thunderbird #543

Open johnstonesnow opened 8 months ago

johnstonesnow commented 8 months ago

I have a load of local folders in Apple Mail (NOTE: It's running on OSX 10.14 Mojave, old style)i. exported these from Mac Mail which took a few hours at least.

I have followed instructions to import into TB via this plugin. Tried every option possible but fails every time with message: "Import Done 0/0"

Any ideas appreciated.

johnstonesnow commented 8 months ago

Not sure I understand. I am going from Mac Mail to Thunderbird?

cleidigh commented 8 months ago

oh right, that might be correct

johnstonesnow commented 8 months ago

Ok, looks like there' may be a problem.

Example:

One folder in particular, on Mac Mail it shows as having 37,374 messages in it. in TB on Fedora the same folder after the import contains 5127 messages.

Same folder on Mac contains emails back to 2006 but in TB only goes back to Feb 2023.

Also, the emails in that folder on TB seem duped:

Screenshot from 2024-03-06 22-52-08

I wonder if I should start again after runing a "rebuild" of mailbox on Mac. Not sure it can handle doing so, but could try.

johnstonesnow commented 8 months ago

Please don't feel any pressure to respond now. This is not urgent. But I will wait for your thoughts before doing anything else in case you have ideas. Thanks

cleidigh commented 8 months ago

Ok, unfortunately it sounds like we may have to do some mbox debugging. Isolate the folder that has that big discrepancy. We may have to look at it. Also I have beta for v14.0.2 which might have some relevant tweaks.

johnstonesnow commented 8 months ago

Is this something I can do on Fedora if I get that specific mbox folder onto it via USB stick? Or do I need to be on Mac?

"beta for v14.0.2 " - is this a reference to the script or the plugin/TB?

cleidigh commented 8 months ago

we can compare the usb export to the import all on fedora. v14.0.2 is the next ImportExportTools release I am finishing up now. It has a couple of mbox fixes. I am wondering if they may be relevant.

Let's find the folder and deal with it individually.

johnstonesnow commented 8 months ago

ok I have that file/folder in Fedora file manager. I checked on Mac, the exported mbox for that folder reports as 2.15GB on Mac. Same here on Fedora, so the file got here :)

cleidigh commented 8 months ago

Ok now on Thunderbird, right click on the folder and choose the IETNG option open folder location. Then get the file size of the folder file with no extension.

I'm going to go offline in a bit. We may have to take a deeper dive tomorrow. Unfortunately sometimes its very hard to diagnose without seeing the files.

johnstonesnow commented 8 months ago

Sure, no problem at all.

Hmm. Dangit. Tried that many times, nothing happens, FileManager doesn't even open. That could be a Fedora issue though

PS in case it helps, I don't mind if the folders get 'un-nested', would there be any better chance of it working if i just imported one folder at a time, I can shift them around later?

johnstonesnow commented 8 months ago

PPS, drop this whenever you like. Please. I could always delete all, start again and try the new revision of the script whenever it's ready.

cleidigh commented 8 months ago

well I think we look at the individual mbox from the usb and import that file.

johnstonesnow commented 8 months ago

I tried right clicking and choosing Properties on that folder, so I can get the location from there. Also, is the rebuild worth a shot? Assuming not.

image

johnstonesnow commented 8 months ago

well I think we look at the individual mbox from the usb and import that file.

I see. So I could create a new top level folder in Local Folders and import just that folder, shall I do that?

(Please let me know when you go offline. I don't want my replies to make you feel you have to stay any longer than you want to!)

cleidigh commented 8 months ago

No there is something tripping up a bunch of messages. I'm surprised as I have done a lot of work on this. If you look at the end of the folder do you see messages without a subject or date?

cleidigh commented 8 months ago

yes import separately I'll let you know when I have to go This is important to me that this is solid.

johnstonesnow commented 8 months ago

at the very bottom (which is oldest dated email as i re-sorted with oldest at bottom) there are 3 messages (which represent just one, twice duplicated) and THOSE THREE show no Subject, but do show a date. If that helps?

I will do a manual separate import of just this troublesome folder and let you know if i get a better number of imported emails.

cleidigh commented 8 months ago

ok that means email separators or From lines not being detected correctly. Tomorrow we can try my beta.

cleidigh commented 8 months ago

now I have to go

johnstonesnow commented 8 months ago

thank you, bye for now

johnstonesnow commented 8 months ago

PS I have stopped doing anything this end, I wont do the manual import as I expect to be wiping clean slate for another run. Til next time!

johnstonesnow commented 8 months ago

PPS - Final msg of today, as i fear it may be important to note:

You know how many years (nearly 2 decades!) of emails we are stretching back with my mbox files. All of that time was spent on macs, which were cloned to next machine when i bought newer machines (only a couple in that time). I DO remember having to "rebuild mailboxes" once or twice over the past 10-15 yrs. I haven't done it for a VERY long time though, and wondering if it's just worth considering, IF my old dog of an iMac is capable of it, rebuilding all those mailboxes and exporting again before trying a new conversion.

Just food for thought, ignore me as required! Cheers M

cleidigh commented 8 months ago

@johnstonesnow I think the rebuild makes sense. Import that to a new folder so we can compare to the old. After that we want to find small folders that also have errors. @cleidigh

johnstonesnow commented 8 months ago

heading to desk now to recap on above and see what to do next

johnstonesnow commented 8 months ago

Ok, so a rebuild in Mac Mail, a fresh export, then a fresh conversion.

Damn it I should have done this earlier, a rebuild it could take hours on this machine. I will kick it off now and see what happens. thanks Christoper

johnstonesnow commented 8 months ago

I think I should probably do both a rebuild and reindex, to be as sure as possible of intergrity:

https://www.computerworld.com/article/2476217/mac-os-x-how-to-fix-apple-mail-by-rebuilding-and-reindexing-the-mailbox.html

cleidigh commented 8 months ago

We can do some fun bash stuff on Fedora while it churns. I was thinking about how to analyze this last night. First we should verify the folder count and look at folders skipped, second find the smallest folders with errors. We can look on Fedora for these. Also can we rebuild individual folders?

johnstonesnow commented 8 months ago

You and me have very different ideas of "fun" !!

If you mean on Mac Mail, yes. In fact every guide I have seen says to click on a mailbox (which i think means mail folder) and choose "rebuild". I will be here forever doing that, so I block highlighted all my local folders (all in export tree) and asked it to rebuild all. It may have hung, it started but says "41 mailboxes selected (68586 messages)". We already know there's a lot more messages than that in those folders. Maybe I should kill it

cleidigh commented 8 months ago

maybe on mailbox at a time? But before you do that lets focus on a couple small folders first. Once we id those we can rebuild those quickly. Can you check on some smaller ones?

johnstonesnow commented 8 months ago

I killed it. I can go one at a time yes, but thing is... Mac Mail doesn't give ANY indication of whether it's working or not so I have no clue what its doing (if anything). Even the "Activity" window never shows anything even when it is dong something! Been like it for years, normal though I think.

Ok I am at your disposal. What do you mean by check on smaller folders, in Mac Mail, in Mac Finder (exptree), or in Linux?

johnstonesnow commented 8 months ago

PS that Acivity Window appears to only be for send/receive activity, I just saw it flash up that it was checking for new msgs.

cleidigh commented 8 months ago

well if you can traverse your max first and find a couple small folders then we can check the Thunderbird import of the same to look for a delta in messages. Once we find we can rebuild those and see what happens

cleidigh commented 8 months ago

we can also search in bash terminal

johnstonesnow commented 8 months ago

I have clicked on each and every mailbox on mac mail and asked it to Rebuild.

No response/feedback, but at least I clicked on every single one. Maybe it happens very quickly for LOCAL messages, maybe the time some say to expect it to take is due to most people doing it on IMAP folders where it clears and re-syncs everything over the web.

Are you asking me to look at Mac Mail, or mac Finder? Do you just mean pick out a few folders on Mac Mail which dont have a lot in, and compare those to their equivalent TB folders on Fedora for discrepancies?

johnstonesnow commented 8 months ago

I do wonder if the best thing to do would be to force a reindex of Mac Mail, do you think I should? I am happy to just sit here and do exactly what you suggest, one command at a time if necessary

cleidigh commented 8 months ago

your last statement, look in mac mail to find small folders then we look at Thunderbird

johnstonesnow commented 8 months ago

ok, will do some comparisons now thanks

johnstonesnow commented 8 months ago

ok. Some random picks:

  1. Folder called "Legal". On Mac - 102 messages. On TB - 102 messages.
  2. Planning - 7 msgs on both
  3. Security - 6 msgs on both
  4. Software - 13 msgs on both

So far they all seem the same. Weird! But won't hurry, will now go look at some slightly bigger ones....

johnstonesnow commented 8 months ago
  1. Privacy - 80 both
  2. ok, first discrepancy, but MORE on TB - Folder called H&J - 185 msgs on Mac, 192 on TB. Weird, not sure how to work out what's missing. I guess i can sort them the same way (which they aren't by defaut) and manually compare one by one.
cleidigh commented 8 months ago

good so far, that shows we are normal for those

cleidigh commented 8 months ago

good that will be easier to compare.

johnstonesnow commented 8 months ago

I had a theory which now looks like a failure. I wondered if Mac was counting conversations as 1, where TB counts them as however many msgs within it. But that's not the case. If that were the case, the discrepancy between H&J folders should be 20-30 emails. but it's only 7. That's odd. Shall I manually check every one to try and find the extras on TB?

cleidigh commented 8 months ago

no lets wait and find the smallest mac folder that has fewer messages on Thunderbird

johnstonesnow commented 8 months ago

OK but i have just been manually checking each email, may as well say what happened:

I went down from newest at top in H&J folder on both machines, cross referencing every single msg from top down.

Same until i noticed one appearing to be missing on TB, but it was actually further down, due to having a different DATE! On Mac the message date was August 29 2023 @ 15:20, same email in same folder on TB is dated July 17 2023 @ 10:36.

That's pretty weird! Let me know if you want me to stop comparing and find a folder as you said in your last message, or investigate this H&J folder further

cleidigh commented 8 months ago

yeah I think the folders with missing messages is best start

cleidigh commented 8 months ago

but note for later

johnstonesnow commented 8 months ago

Roger that.. Will find one

johnstonesnow commented 8 months ago

I quickly finished the manual check through H&J, was over half way.
I did find one (so may have missed others) instance of TB having a carbon copy duplicate of the same email, so 2 of same where only 1 of it exists in Mac folder. That may explain the slight increased numbers on soe TB folders.

Now to find a TB folder with fewer msgs...

johnstonesnow commented 8 months ago

Ok. I could describe my folder tree as being in two parts, whilst they are all in the same tree, there is a section at the top which is different. I basically have:

  1. Live Folders - where I store all imprtant stuff related to certain topics/people.
  2. What I call (and think of as) Archive folders. These are all subnested under a folder called Email Archves, and they contain all my sent items from past email accounts, a trash archive (I know I know!), various other old archives I keep because I'm just weird i guess. :)

Point being:

ALL Folders in Category 1 above seem good, at least numbers wise. There are NO TB folders with FEWER msgs than the Mac Mail counterpart. Some have a few more msgs in on TB (prob just harmless random duplicates) but none have less. That's Good .

Category 2 folders are, by nature, damn big. I wouldn't say it's unimportant if I lose some emails in those, but it's probably less important, whilst nice to have them all.

So I am working up through the archive folders now.

First one is "Trash Archive" - On Mac this shows 11797 msgs. On TB that folder shows 9672 msgs

I will keep checking but give you that bit of info in case you want me to stop here. I MAY find a smaller example but suspect they are all bigger beyond this one in archive folders.

johnstonesnow commented 8 months ago

ok next one is "Sent Archive" and this is bigger, with a bigger problem.

Mac - 37,374 msgs TB - 5116 msgs

(this is the one we looked at yesterday where I noticed the last few messages (most recent dates in folder) has no subject line)