MozillaZine

Archiving your e-mail

From MozillaZine Knowledge Base

This article was written for Thunderbird. None of the extensions mentioned in this article support other applications, but the other solutions may work with the Mozilla Suite or SeaMonkey.

Beginning with version 3.x, Thunderbird has built-in support for archiving e-mail. The "archived" messages are moved to a dedicated folder (or hierarchy of folders) within the Thunderbird profile. It does not happen automatically, you have to either press the Archive button or use the 'A' keyboard shortcut.

Image:Tb50archiveOptions.png
TB 5.0 new Archive settings with enable box and options button

Each account has a "Archive Options" button in Tools -> Account Settings -> Copies & Folders (except Gmail as they don't support child folders [1]) that provides several ways to organize the archive folders:

  • A single (flat) arrangement, grouping by year (default), or by year and month.
  • A checkbox to keep the structure of the original folder in the "Archives" folder, which are arranged underneath the optional year and month folders.

The folder tree shows an example for the resulting folder structure and is not derived from any of your own folders. In addition to the per-account settings, you can set the defaults for the following preferences using the Config Editor. Any account which doesn't have specific settings will inherit from those preferences:

  • mail.identity.default.archive_enabled
  • mail.identity.default.archive_granularity
  • mail.identity.default.archive_keep_folder_structure

Starting with Thunderbird 5.0 you can disable the built-in archive support on a per-account basis by unchecking "Keep message archives in" in Tools -> Account Setting -> Copies & Folders.

Instead of individually selecting messages to be archived, you could use an advanced search to quickly find all messages in any account(s) and/or folder(s) that meet your search criteria (e.g., older than 90 days), and then move those messages all at once to an archive folder of your choice. One possible way to do this:

  1. Create a new folder in Local Folders and call it "Archive".
  2. Go to the "Edit" menu and choose "Find -> Search Messages...".
  3. Where it says "Search for messages in", select "choose this folder" for the account whose messages you want to archive. If you are using Thunderbird's Global Inbox with multiple POP accounts, you can select Local Folders as the account.
  4. Make sure that the checkbox for "Search subfolders" is checked.
  5. Define the search criteria as "Age in Days is greater than 90" (or however many days you want).
  6. Click the "Search" button. The list of "old" messages will appear in the lower pane.
  7. Select all messages listed in the search results, and use the "File" button to move them all to the "Archive" folder you created in step 1.
  8. If you have more than one mail account that you want to archive, repeat the above steps for each additional account. (If all your accounts use a Global Inbox, you do not need to repeat the above steps.)

You could create a Saved Search folder so that in the future you can perform the same search (steps 2-6) with a single click. If you want to exclude certain folders from being searched, just right-click on the Saved Search folder, choose "Properties...", click the "Choose" button, and (de)select folders as desired.

Some alternatives or workarounds that don't archive messages in mail folders are listed below. When you consider what method you want to use it helps to first figure out if you care about the ability to read those messages without a email client, or the ability to ever import the archived messages back into a email client.

Contents

Using the ImportExportTools extension

The ImportExportTools extension can be used to import or export messages (.eml files) or folders (mbox files). It can also export all of the messages in a folder as either HTML or plain text files, plus an index. This extension used to be called the MboxImport extension. See Importing Folders for information on how to download and install that add-on, and how to use it to import folders.

You can archive individual messages as a .eml file or folders as mbox files, save them somewhere else, delete the original, and then import them again later on if needed. If its more convenient you can use the Archive! button from the Buttons! extension to archive messages as .eml files and just use this extension to import them. You can also use the MboxViewer to view archived folders if you didn't want to import them again.

Using Mbox2xml (Windows only)

Mbox2XML is a Windows application for backing up one or mbox files (folders) in a .XML file that can be displayed using a modern browser such as IE, Firefox or Opera. It converts any HTML messages to plain text. The user has the option to include attachments, or to append messages to an existing (archived) folder. It uses UTF-8 encoding, which provides support for most character sets.

It can be useful for archiving messages so that you can read them without a email client. However, unlike most of the other alternatives you can not restore its archived messages in Thunderbird.

Using MailStore Home

MailStore Home is a Windows application that can archive email from multiple email clients including Thunderbird, Outlook and Windows Mail. It includes a integrated CD/DVD burning utility, and the ability to preview or search the archived messages.

PDF file

PDFCreator is a Windows utility that lets you save a message as a .PDF file by printing it, or combine several messages into one .PDF file. Combining several messages requires you to print a message to the PDFCreator printer, select wait, print the next message(s) and on the last message select the messages you want to merge, and press the Combine button.

Note: If your PC supports Data Execution Prevention (DEP) don't press the Options button or use File -> Options. All that appears to do is let you save settings in a .ini file rather than the registry so its no real loss.

PDF995 , Bullzip PDF Printer and DoPDF are similar free utilities. Linux supports several different ways to print a message as a PDF file such as cups-pdf or Kprinter .

If you saved the messages you want to archive as .eml files you could try Crème Fraiche, though the authors comments in Does anybody need eml2pdf conversion? imply he is not going to finish debugging it if nobody is going to use it .

Using IMAPSize (IMAP accounts, Windows only)

If you store your messages in remote folders you could use IMAPSize to incrementally back up messages from one or more folders or accounts as .EML files in a directory on your hard disk and then back up those files normally. An incremental backup means that the messages that have already been backed up will not be backed up (downloaded) again. IMAPSize supports command line arguments so you can back up using either a batch file or the GUI. The Account/RestoreBackup menu is used to restore backups.

You could use Message aging to automatically delete old (and presumably backed up) messages if you automate running IMAPsize using the Windows scheduler.

See also

External links