mboxviewer icon indicating copy to clipboard operation
mboxviewer copied to clipboard

Feature request: View and search globally (or within subfolders)

Open Kirkman opened this issue 1 year ago • 6 comments

As far as I can tell, though, mboxviewer pretty much only lets you explore one .mbox file at a time.

But I have lots of mbox files, in a large nested hierarchy, and I wish there was an option to let me see all the messages together in one view.

For example, let's say I have a folder structure like this in the left-pane:

  • Archives
    • Inbox
      • Home.mbox
        • mbox
      • Work.mbox
        • mbox
      • School.mbox
        • mbox
    • Inbox.mbox
      • mbox
    • Sent Items.mbox
      • mbox

It would be awesome if I could click "Archives" and see every message from every nested mbox together in one list view.

Similarly, it'd be super-helpful if mboxviewer could search across everything I've imported, instead of being limited to searching one mbox at a time. At the very least, the ability to search all sub-folders of a given folder I've selected would help. So, if I clicked "Inbox" and then did "Advanced Search", it would search the three mboxes within the Inbox folder.

I would like to be able to click "Archives" and have the Advanced Find apply to all the mboxes below it in the hierarchy.

Kirkman avatar Feb 14 '24 17:02 Kirkman

Hi,

Current MBox Viewer has rather simple database and it can't search across multiple archive files and show the results. What is possible is to merge all mbox files into a single mbox file. Once you have single mbox file, you can view all files and search across all files.

I recommend you try "File->Select root for merging" and accept default "Assign a label per each MBOX file". This will create single mbox file with hierarchy of labels representing folders and mbox files.

You can right click on mail header to see list of labels for that message.

Labels

if you see multiple X-Gmail-Labels: lines, ignore second and subsequent lines.

Not ideal solution since you need to create new mbox file. And you need to merge again and delete old merged file if you add new files. Let me know if that worked for you.

I was thinking to enhance MBox Viewer's database but that requires larger effort and I never started. Hopefully one day I will do what you ask.

zigm avatar Feb 14 '24 19:02 zigm

Hello in relation to the above topic: MBox Viewer is also useful to browse a collection of individual .eml files. Unfortunately, probably due to the above-mentioned design restriction, it is currently not possible to search accross several .eml files, which kills the purpose of managing .eml files.

joelafrite421 avatar Jun 25 '25 09:06 joelafrite421

I am mostly done with support of multiple languages unless I receive user feedback requesting enhancements.

I should have time to revisit the issue. Given current architecture, it is challenging to support some features including global search. Currently MBox Viewer loads index file into memory for single mail file and old/existing memory is released. Changing the current design to have single global database (SQL ??) would mean very large changes. Possibly more modest changes to support searching and limit some other features is doable without introducing risk of instability. Nobody will use MBox Viewer if it is not stable.

Thanks for your comments.

zigm avatar Jun 25 '25 18:06 zigm

Just curious. What is the number of .eml files you would like to support. It is probably not realistic to have very large number of eml files shown under Mail Tree. It likely makes sense to merge eml files automatically into single physical mail file for large number of eml files. Or possibly index files could be merged automatically. I am afraid having many thousands of eml files under Mail Tree will not work.

zigm avatar Jun 25 '25 20:06 zigm

Thanks so much for your answer. In my opinion, support for < 100 eml would be amply sufficient. The idea is to have a tool able to search within a set of .eml dealing with a specific topic. I agree managing a database is out of topic considering the scope of this project.

I kept delaying the answer because I observed a sporadic issue when dealing with nested .eml: if mboxview is defined as the system viewer for eml, it should spawn a new instance everytime I open an .eml within an .eml. Somehow this works as expected only when using the "ReleasePlusStackTrace" executable. I will create a new thread once I can describe the step by step to reproduce the issue.

Le mer. 25 juin 2025 à 22:50, zigm @.***> a écrit :

zigm left a comment (eneam/mboxviewer#56) https://github.com/eneam/mboxviewer/issues/56#issuecomment-3006106433

Just curious. What is the number of .eml files you would like to support. It is probably not realistic to have very large number of eml files shown under Mail Tree. It likely makes sense to merge eml files automatically into single physical mail file for large number of eml files. Or possibly index files could be merged automatically. I am afraid having many thousands of eml files under Mail Tree will not work.

— Reply to this email directly, view it on GitHub https://github.com/eneam/mboxviewer/issues/56#issuecomment-3006106433, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOOA5JWUQVOVJKVLFG6FABT3FMDQHAVCNFSM6AAAAACACZK5LWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMBWGEYDMNBTGM . You are receiving this because you commented.Message ID: @.***>

joelafrite421 avatar Jul 04 '25 14:07 joelafrite421

@joelafrite421

Thanks for update. MBox Viewer is the generic mail viewer and needs user input to decide how to present mails to users. By default MBox Viewer assumes all mail files are independent. This implies search is within single file only.

To support global search across number of files, MBox Viewer offers mail file merging to create, sort of, "global database" for selected mail files.

There are 3 ways of mail file merging supported, maybe too many -:)):

1. Via command line option:

-MBOX_MERGE_LIST_FILE=listFile Name and -MBOX_MERGE_TO_FILE=mergedFile Name command line options to merge content of mbox files listed in the listFile Name. The merged mbox file is automatically open in mbox viewer

You can use wildcard names to merge files.

2. Via Folder option. Right click on Folder name and select "Merge Mail Archive Files". Currently, you have to manually select files for merging. There is no support for wildcards and that may need to change.

3. Via "File->Select Root Folder for merging". That is currently best option for merging large number/all .eml files under the selected folder. There are number of steps required to complete the request for merging, see below. I am thinking default option could be added to bypass all intermediate steps to make merging more user friendly. The merged mail file would be created under default folder: ConfiguredDataFolder/MergeFolder

Other suggestions are welcome.

Image

Image

Image

Image

Image

zigm avatar Jul 04 '25 19:07 zigm