Closed Bug 2051917 Opened 4 months ago Closed 4 months ago

Archive emails into read-only ZIP files that I can mount back if needed

Categories

(Thunderbird :: Untriaged, enhancement)

Thunderbird 140
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 37124

People

(Reporter: csongor, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0

Steps to reproduce:

This is not a bug report, more like a feature request. I filed it many years ago but cannot find it now, probably it got lost in a migration.

Because my Mail folder grows to ~1GB in a year, I archive it ~once a year. From the last ~20 years, I have ~20 big large ZIP files of the mailbox folder of every year. Searching in the old emails is a pain. Here is what I do now:

When creating an archive:

  • I configure my accounts away so that they don't fetch emails any more (*)
  • quit TB
  • create a zip file from the Mail folder
  • write it to DVD
  • restart TB
  • delete all emails (but don't delete the folders as it would ruin the filters)
  • reconfigure the accounts to fetch the emails again.

When I want to search in the old archives, I follow one of two options:

Simple text search

  • I enter the ZIP file eg. via TotalCommander
  • search for the known text of the email (very limited, as I cannot search in a specific field, like From or Subject field only, etc.)

Better search capabilities:

  • quit TB
  • create a backup of the current Mail folder
  • restore the old version Mail folder from the old ZIP (it doesn't fetch new emails if I didn't forget the (*) step above
  • open TB
  • search for the mail (access to content, attachments, etc.) to find what I wanted to
  • quit TB
  • delete the restored Mail folder
  • recreate the current one from the backup

Both of these options are quite bad solutions.

Instead of this, I would love to do this:

  • right click on an account and pick "Move emails into ZIP archive" for archiving one account or "Message -> Move emails into ZIP archive" to archive all accounts
  • save the ZIP file and write it to DVD (two ZIP files would be even better: one for the emails and one for the index, so that I can store only the mails space-efficiently and the index as well for convenience).
  • Mount ZIP files in read-only mode (potentially dozens of them) from archives of many years.

As a result, TB would show my old emails in a Mounts/ folder as if it was a separate account, like this:

> account-1@gmail.com
  Inbox
  Drafts
  Sent
> account-2@hotmail.com
  Inbox
  Drafts
  Sent
> Local Folders
> Mounts
  > 2020-01-01
    > account-1@gmail.com
      Inbox
      Drafts
      Sent
    > account-2@gmail.com
      Inbox
      Drafts
      Sent
  > 2021-01-01
    ...
  > 2022-01-01
    ...

Unfortunately, the currently available Archive functionality does something else. It keeps the emails in the current Mail folder, which is just growing every year. With this new feature, I could mount the old emails when I need them but easily unmount them if I don't.

Actual results:

Current Archive functionality doesn't do what I need.

Expected results:

I want an easy-to-use way to mount read-only archives.

Whilst developers ponder over your request:

Possible Suggestions

  1. Use an addon - take a look at the Add-on extension called 'ImportExportTools NG'
    Various Options to Export eg: as mbox zipped file or export all messages in eg: eml format - each email is stored as a separate file, so search on headers is available. You can also choose the format of the filename eg: Subject, date .eml
    I export using format .eml to a folder I created eg: 'TB 2025' on computer or external drive. Each email is stored separately. I can open the folder and do a search in folder and when I've found what I want - I can open the EML file - I have computer set to open eml files using Thunderbird.
    Never need to actually import anything.

  2. Alternative suggestion which may be useful as it gets a complete copy - quick to create. Use the Profiles.
    Create a new profile - put year in the name. Exit Thunderbird. Access Profiles.
    Clear all contents from new profile - Copy all contents in the current in use profile name folder and paste into new profile.
    In effect you have a duplicate profile at this point. Store new profile on other drive and set up Thunderbird to know where that profile is located.
    use Thunderbird profile manager to open and use that profile when required. No need to import anything.
    I also use this and it saves a lot of time and means I can store the profile on another drive.

Hi Anje, thank you for your suggestions. Please find my responses inline.

Whilst developers ponder over your request:

Possible Suggestions

  1. Use an addon - take a look at the Add-on extension called 'ImportExportTools NG'

This add-on promises doing an excellent job in exporting mails. However, it doesn't solve the problem I would like to solve.
I would like to have a read-only archive of my old emails, that I can unmount from and mount to TB again and again, without worrying that I delete something from them or interfere with my current (non-archived) emails.

...

After installing this add-on and playing with it a little bit, I can see it is not a good solution for me.

The most promising feature this add-on offers is exporting mails into eml files. But when I want to import them back, a couple of issues happen:

The imported mails become part of my Mail folder again. This is not what I want, it defeats the purpose of archiving. When I archive, I want to keep my old emails in their own file (on a DVD, read-only network drive, etc.) and keep the current Mail folder small. I want to keep those old files separately, and use them only on an on-demand bases by quickly mounting and unmounting the ZIP files of the previous years, maybe multiple times a day or not using them for several months.

When I import the old emails back from eml files, TB runs my filters again. This is bad because I have filters that move incoming mails to various folders based on the sender, from where, I move them away after sorted them out. For example, the bills from electricity provider and gas provider go into a bills_to_pay folder. When I pay those bills, I move them further to the paid_bills folder.

But when I import the old emails into mount/last_year, the emails are processed again by the filter. An old email I already paid for, is processed again and the filter places it into the current bills_to_pay folder, as if I still needed to pay for it.

I cannot see how I could prevent it. Maybe there would be a solution with fine tuning the filters so that they don't run for the emails I am importing from a backup but even if such a solution exist (which I don't know), the risk of filtering the old emails wrongly is too big for me.

Therefore, I would prefer to have a native feature in TB that can move complete folders to compressed zip files, from where, I can mount back later for read-only purposes. Emails in mounted folders should not interfere with existing emails.

But when I want to import them back,

The point of exporting as eml means:

  1. you do not need to import them again. It's not required - that action is now superfluous.
  2. you can search just the eml files in folder they are stored in using Windows search because the addon let's you choose the format of the filename - you can set the filename to include Subject and sender and date
  3. You can set up computer to open a selected eml file using Thunderbird.

(In reply to Anje from comment #3)

But when I want to import them back,

The point of exporting as eml means:

  1. you do not need to import them again. It's not required - that action is now superfluous.
  2. you can search just the eml files in folder they are stored in using Windows search because the addon let's you choose the format of the filename - you can set the filename to include Subject and sender and date
  3. You can set up computer to open a selected eml file using Thunderbird.

That is not the same. If I have the emails in Thunderbird, I can search for any specific field, I can combine various search conditions. For example, a text field contains or doesn't contain something, the age of the message is between X and Y, etc.

By contrast, if I export them into eml files and I want to avoid full text search, I need to think ahead and put every relevant field into the filename I ever may want to search for. Even after that, I cannot differentiate between searching for "abc" in the From field versus searching for the same in the To field. I can search only for "filenames that contain abc", regardless of which part of the filename contains "abc" (the one that came from the From field versus the part that came from the To field).

I admit, a very poor result still can be achieved by plain text search in email files but, for example, searching for email which contain "abc" in the From field would be very hard because an eml file can contain "From: abc@..." not just in the header but in the body as well, which would produce false positive hits.

What about the other option to copy one profile data into another new profile?
You can store the profile on another drive; use Profile Manager to open that profile manually when required ( or via 'about:profiles').
No importing required. You just have a profile specifically for the data/emails for a particular year.
Set profile to always open in offline state. Suggest delete the stored passwords so no access to server is valid, so nothing new gets downloaded - just in case you open in Online state. You can also access the mbox files and set up as 'read-only'.
Then you have a Thunderbird profile running a specific year of data at your choice when required and no importing involved.

I think bug 37124, bug 266175.
That wouldn't cover the zip aspect, but I'm not sure that's very fixable in Thunderbird. Better solution to fix it on the file system level. See e.g. NTFS compression or other similar solutions.

Status: UNCONFIRMED → RESOLVED
Closed: 4 months ago
Duplicate of bug: 37124
Resolution: --- → DUPLICATE

Sorry but I think those bugs are not duplicates of this one. Could you reopen this one, please?

This one depends on those ones (as I want to read emails from a read-only device) but they are not duplicates.

In this feature request, I asked for mounting in multiple archives into my current mailbox. I want to see them together, searching in them without jumping between them, and so on.

That's why @anje's proposal also not solves the problem.

With my suggestion, I could do this:

  • mount in 10 ZIP files from 10 previous years (they can be on DVD, NAS, whatever).
  • search in all of the 10 archives at the same time
  • when I shut down TB today and restart it tomorrow, I still can have the old mounts, remount not even needed.
    Meanwhile, my current profile is small, as it contains only the newer emails since the last archive.

Other solutions, like copying old mailboxes into the current one, all defeat the purpose of my suggestion, as they would lead to huge profiles again.

Please reopen this one. Thank you.

I think that's exactly what bug 37124 requests. Like I say, without zip. But we're not going to fix that as there are better solutions.

Sorry, you are right, indeed, it is very similar.

The file-system compression doesn't solve the ZIP topic as DVDs and many other file systems don't support compression. On a DVD, storing the ZIP file is the obvious solution.

OK, let's keep this ticket closed then. (The other one is 26 years old, I don't really think it ever will be fixed...)

Well, OTOH, probably few people use DVDs, and you can get a 128G USB stick for 14EUR or so that will cover many years of emails...

You need to log in before you can comment on or make changes to this bug.