import-export-tools-ng icon indicating copy to clipboard operation
import-export-tools-ng copied to clipboard

Importing nested folders

Open joaquin-oakland opened this issue 3 years ago • 9 comments

macOS 10.13.6 Apple Mail 11.5

I am switching from Apple Mail to Thunderbird. To avoid any problems from using Apple Mail export, I am exporting the mail folders using EagleFiler. When I export a folder with only messages--no subfolders--and then import the file created by EagleFiles using ImportExportTools NG by selecting the file that EagleFiler generated, it is imported as expected: that is, a folder is created in Thunderbird with the same name, and it contains the messages.

When I select in Apple Mail a folder with subfolders, EagleFiler creates a directory with subdirectories and an mbox file wherever there are messages. I see from the ImportExportTools NG Help that the correct choice might be Menu>Tools>ImportExportTools NG>Import all messages from a directory>also from its subdirectories.

When I make that choice, the selection window comes up, showing, as with single mail boxes, the EagleFiler directory EagleFiler is using. I select the folder created by EagleFiler (which has the structure of subdirectories with mbox files. ImportExportTools NG does not then import that directory and its subdirectories and messages. Instead the selection window changes to show the subdirectories, apparently wanting me to select one (the button [Open] does not change.

Now: Eagle Filer has not added the string '.sbd' to the subdirectory names. Could that be why the selection dialog goes down the directory hierarchy, instead of importing the selected directory with its subdirectories and mbox files?

Here is what Finder shows. I select Import. (Notice that Import-1 is empty.)

!(https://user-images.githubusercontent.com/36176593/88433852-bfdd1a80-cdb3-11ea-9bae-f4d8ce1ad603.png)

joaquin-oakland avatar Jul 24 '20 20:07 joaquin-oakland

To be perfectly clear, if I choose Import mbox file> Import directly..., and then navigate to and select the file, In, in the directory Import-2, that mbox file is imported as expected.

joaquin-oakland avatar Jul 24 '20 20:07 joaquin-oakland

@joaquin-oakland Thanks for the post and especially the donation! The menu structure has to be made clearer. I am hoping to do this in the next revision. What I did add is a good start at internal help pages, but I do make it clear what the menu options are. I am curious if you looked at that.

Couple of things, I think you may have seen some of the other posts regarding Apple Mail based on your first comment. I took a quick look at EgaleFiler but did not see the exact file name/file structure of an export. The extension as I took it over has some quirks regarding structured e-mail folders. First, we are clearly talking about importing mboxes, not EML. The menu item import mbox is the option you want to use. From the help you can see Import Messages is for EML files and not relevant for you. Obviously the menu is not very clear.

Concerning importing multiple mailboxes:

The radio button dialogue that comes up after choosing Import mbox gives you four options. as I understand it your file structure does not utilize 'sbd' names for subfolders. that is okay the problem is that the extension does not currently support importing a structure with mbox format, although it will traverse a structure and import all m boxes at the same level. this is a defficiency . I would like to address in the future. The names of the imported mailboxes folders will be that of the actual mbox filename, not the containing folder

Choosing the last important option will traverse the subdirectories but import at the same level. I think that is the closest thing to use. just for reference the EML import is the only way to maintain structure currently.

this was quick, does it describe things enough? as I dictate, I take some shortcuts! Christopher

For the example below: image

image

cleidigh avatar Jul 24 '20 22:07 cleidigh

Thanks for the quick response. I did look at ImportExportTools NG Help. I may not have read carefully. I do see the string 'EML' in the text, but I had no idea what that might mean, unless it meant e-mail message. (That is, I did not know there was a format with that name. (I see now at the top of Help, that it is listed as a format. At the multiple import entry, you might want to add this after 'EML' : '(only)'. That is quick and would help slow persons such as myself.

What I did with EagleFiler is first ask it to take in (into EF) a single Apple Mail folder, then used IET to import that as an mbox. Did that a couple of more times with larger mboxes. (Did not check to see if all were there, trusting Tsai and yourself.) Then tried a nested structure by asking EF to take it in. Looking at the result with both EF and Finder, the structure was as expected, two level "folders," some with a single mbox. The tried to get that imported by IET.

Of course, the reason for that was to reduce the work of importing many folders from Apple Mail.

I now understand that I must do this the longer way. I expect that (now that I know what works and what does not) I can 1) select the remaining 20 or so Apple Mail folders, hit the EF grab key, F1; 2) one by one, import the resulting mbox files; and then nest them by drag and drop. A small inconvenience. Much smaller than having to continue to live with a badly broken Apple Mail (maybe broken, from what I read, by my keeping so much mail that it overwhelms Apple's bizarre structure for storing messages).

That should work, right? Assuming EagleFiler continues to work as it has.

Thanks again, much.

joaquin-oakland avatar Jul 24 '20 23:07 joaquin-oakland

@joaquin-oakland I think that's the way to go, clearly this is a big gap in functionality that needs to be fixed. I have it on the list! cheers/thanks Christopher

cleidigh avatar Jul 25 '20 17:07 cleidigh

Hello, I freshly installed TB 78.5.1, created IMAP mailboxes (they work perfectly) and tried to import mailboxes from my Apple Mail under Catalina (which has become a real disaster as a mail client...). Using ImportExportTools NG after creating mbox files from my Mac but it doesn't work... Would you advise to install version 68.0 ? Thank's Daniel.

visiteur668 avatar Dec 13 '20 15:12 visiteur668

Ubuntu 20.04, Thunderbird 78.13.0 and Thunderbird 68.7.0

I have a similar problem - I am importing a mailbox directory, structured with almost 1,000 nested and named .sbd and mbox files.

I have tried all four import options and the best I have achieved is to import the emails in mbox, mbox1... mbox989 folders in a flat structure. The import process doesn't appear to recognise the names or the structure.

Is it possible to keep the sbd names, and maintain the folder structure?

Thanks

John

jrussell88 avatar Sep 15 '21 17:09 jrussell88

Does that help? https://github.com/thundernest/import-export-tools-ng/wiki#importing-from-apple-mail-mbox-format---notesscript-by-obar--thanks

jobisoft avatar Sep 15 '21 17:09 jobisoft

That's what I've been doing, with the results I mentioned: a series of numbered but unnamed flat folders.

Neither names nor folder structure are respected by this option.

Is this expected behaviour?

jrussell88 avatar Sep 15 '21 18:09 jrussell88

Ok looks like the conversion to mbox and sbd format was incorrect.

I found a better explanation of the mbox file format and after following that approach https://www.flawlessrhetoric.com/Using-libpst-to-convert-PST-to-MBOX,-and-understanding-Thunderbird's-folder-structure the second option on the import dialog has created the full tree structure.

The structure being a named mbox file for every folder, with a similarly-named sbd file alongside to contain its subfolders.

jrussell88 avatar Sep 15 '21 23:09 jrussell88