How to extract messages from a damaged MailStore archive

How to extract messages from a damaged MailStore archive

When an archive store is damaged (typically due to power issues or third party antivirus interaction), the following steps can be used to extract the messages from the problematic archive to your local hard drive and then re-archive the old data into your current installation.

Note: unless there is a specific reason you want to create an exported copy of the emails in the archive store, you may prefer to merge the contents of the problematic archive store directly into a new archive store using the merge operation described in this article instead.

MailStore Version 10 and above

(message extraction with encryption key)
Before we begin we need to make will make a few assumptions here:

MailStore is installed at C:\Program Files (x86)\deepinvent\MailStore Server

You have a directory called C:\EML that contains enough space to hold all of your recovered email. The disk must have sufficient free space. Calculate it with the sevenfold size of the archive storage directory [C:\MailArchive\DefaultFileGroup”]. As MailStore compresses and deduplicates messages, this process will create uncompressed message files.

The paths used do not need to be on C:\ and you can use mapped drive letters if needed. Adjust the instructions as needed based on your folder paths:

  1. Detach the defective archive store from MailStore by following this article
  2. Create a new Storage Location and mark it as active.
  3. Shut down the MailStore Service.
  4. Create the C:\EMLfolder if it doesn’t already exist.
  5. Open a Windows Command Prompt and enter the following command:

    “C:\Program Files (x86)\deepinvent\MailStore Server\MailStoreServer_x86.exe” /recover /inputDir=”directory_path_of_broken_archive_store” /outputDir=”C:\EML” /keyFile=”path_to_broken_archive_store_key_file”

    Note: This may take a significant amount of time, and will export all of your archived mail.

  6. Start the MailStore Server service.
  7. Login to MailStore Client
  8. navigate to 'Archive E-mail' -> 'E-mail Files' -> 'EML and MSG Files' -> 'MailStore Export' – Archive from C:\EML, leaving 'Include Subfolders' and 'Read MailStore Headers' enabled.
This should re-archive mail into the new Storage Location created in step 2.

MailStore Version 9 or earlier

(message extraction with no encryption key)

Before we begin we need to make will make a few assumptions here:

MailStore is installed at C:\Program Files (x86)\deepinvent\MailStore Server

You have a directory called C:\EML that contains enough space to hold all of your recovered email. The disk must have sufficient free space. Calculate it with the sevenfold size of the archive storage directory [C:\MailArchive\DefaultFileGroup”]. As MailStore compresses and deduplicates messages, this process will create uncompressed message files.

The paths used do not need to be on C:\ and you can use mapped drive letters if needed. Adjust the instructions as needed based on your folder paths:

  1.  Detach the defective archive store from MailStore by following this article
  2. Create a new Storage Location and mark it as active.
  3. Shut down the MailStore Service.
  4. Create the C:\EML folder if it doesn’t already exist.
  5. Open an elevated Windows Command Prompt and enter the following command:

    “C:\Program Files (x86)\deepinvent\MailStore Server\MailStoreServer_x86.exe” /recover inputDir=”C:\MailArchive\DefaultFileGroup” /outputDir=”C:\EML”

    Note: This may take a significant amount of time, and will export all of your archived mail.

  6. Start the MailStore Server service.
  7. Login to MailStore Client.
  8. Go to 'Archive E-mail' -> 'E-mail Files' -> 'EML and MSG Files' -> 'MailStore Export' – Archive from C:\EML, leaving 'Include Subfolders' and 'Read MailStore Headers' enabled.
This should re-archive mail into the new Storage Location created in step 2.
    • Related Articles

    • How to recover from a corrupt archive store by merging stores

      When an archive store is damaged (typically due to power issues or third party antivirus interaction), the following steps can be used to extract the messages from the problematic archive and merge them into a new archive store. Check Infrastructure ...
    • Attaching and Detaching Archive Stores

      Existing archive stores can be detached from the archive. To do so, right-click on an archive store in Administrative Tools -> Storage -> Storage Locations and select Detach: The detached archive store and the emails contained within it are now no ...
    • MailStore Data integrity fails with "Message #xxxxx: Header for mime entity #xxxx is not available..."

      After running a MailStore data Integrity check ( Or verify Store command) If you then see errors that look like: Message #148472: Header for mime entity #840552 is not available. Container: 3909.dat, Entry #29 This is explaining that the message with ...
    • Rebuilding Damaged MailStore Database using gfix.exe tool

      In some cases, it is possible to recover a MailStore Database file that has damage using the built-in Firebird database backup and recovery tool gfix.exe The location of the gfix.exe tool varies based on the version of MailStore: MailStore version 10 ...
    • Explaining MailStore SPE Admin Accounts

      MailStore SPE differs from MailStore Server in several ways. One of the key differences is to do with administrator access. In MailStore SPE there is a different level of administrator access for MSPs logins compared to customer administrator access ...