Not able to open Archive


I stupidly deleted some of the .dat files in my MailStore archive to save some space as I thought which were from an email address I didn’t need anymore.

Now I can’t open MailStore - it gives me the message:

Unable to open the master database in C:\Users\..........\MailStore Home. 
A database error has occurred. Code: 335545108. Details: Invalid crypt key 

I tried to restore the files I deleted but it didn’t work. I need the info in some of my .dat files.

How can I fix this situation or access these files? Please help.


Dear SMB,

please do not manually delete any files from the archive folder. These files are database files and are interconnected. You cannot identify which file contains what data, so any removal would destroy the information structure, if not all. Also, all files need to be in the same “state” to fit together.

So let us see if we can find a workaround:

  1. How did you recover the missing files?
  2. Do you have a complete backup we might be able to make use of?
  3. Enable the debug log to have a closer look at the specific errors that occur during startup. The article below helps you get going:
    :link: Article: Create a debug log

Since your debug log contains sensitive data, such as email addresses and names, you are welcome to send me a log file via private message - just click on avatar and choose: Message


I assume that only a backup is your solution to this issue. It proves time and again that one should regularly do a BACKUP of the archive and its data. This is particularly true BEFORE you do any actions that may impact operation of a product (like deleting files in a directory).

IMPORTANT: Make regular backups of your data!

You should always have a current and valid backup of your archive!


Dear @SMB,

from your logs, I find the location of your archive is
...\OneDrive ...\....

Do you have OneDrive installed and synchronizing your documents folder?

Cloud synchronisation is not supported with MailStore Home,
as both OneDrive and MailStore Home will keep fighting for the exclusive right to access files.

Please exclude the MailStore Home folder inside of Documents from OneDrive synchronisation or consider placing the archive to a non synchronized location.

Instead, you can use the included backup feature in MailStore Home to create a valid backup.
This backup location can also be a folder synchronized with OneDrive to provide extra safety.

Can you please close MailStore Home and then navigate to the archive folder via Windows Explorer?
Right click on MailStoreMaster.key and select “Open with…”, choose Editor / Notepad.

Does the file contain readable information, or is it just blank spaces?
It should have a format as shown in the image:


Yes, OneDrive is syncing the folder but it has been for over a year, so don’t think this is the problem. I tried turning off the sync and still had the issue.

The MailStoreMaster.key file has readable information similar to your example. Do you want a copy of this?


Please stop OneDrive from syncing the MailStore Home folder.
It uses database structures.
Even Microsoft Access files are not supported and must not be synchronized with a cloud service.

The error you keep receiving either means the key file does not match with the files, or the files to be encrypted do not exist at all.

Do you have the following files in your MailStore Home folder?



The number of dat-files varies due to the size of you archive, my example has 58 dat files.

With your files in the name format

  • MailStoreMaster
  • MailStoreFileGroup

there should always be a pair of .key and .fdb.


Ok, I have stopped syncing the MailStore files on OneDrive.

It does not look like I have the MailStoreFileGroup.key file.


I found a back up of the MailStoreFileGroup.key, in OneDrive.


That is great.
Without the key file, there is no handle to decrypt the database.

For the future, I would recommend to either not synchronize Documents,
or to move the archive to a place that is not synchronized by OneDrive.

To move the complete database, make sure MailStore Home is closed,
then move the folder MailStore Home from your documents folder to a different place.
Then, open MailStore Home - Configuration and define the folder you have created to be the new archive location.

Then you can start MailStore Home again as usual.


I have done what you suggested but it is still giving me the same message “Unable to open the master database in C:\Users\Sheldon Baird\Documents\MailStore Home. A database error has occured. Code: 335545108. Details: Invalid crypt key”


So you have both files in that archive folder?

  • MailStoreMaster.fdb
  • MailStoreMaster.key

Do they have a similar file date?
Does this particular key file, opened with Editor, look like the screenshot of a key file earlier?


Yes both files are in the archive folder.

.fdb is Oct 23 7:12AM
.key is Oct 22 3:51PM

Below is the screen shot of the .key file
— removed —


Please do not post a key file to public.

Although it is not likely, it could be used to decrypt your database. It is your personal secret.

If this constellation is unusable and you cannot recover both MailStoreMaster files with the same file date, which really is only your settings and profiles, we can try to recover only the actual archive with emails and folders. Then we create a fresh new archive folder and import the recovered items.

To export/extract all content of an archive, do the following:

  • create a new helper folder, i.e.: C:\MailStoreTemp
  • shut down / close MailStore Home (if still open)
  • open a Windows command prompt, i.e. click on Windows Startmenu icon, type the letters cmd and wait for the result “Windows Command Prompt”. Right click and choose: Open as administrator
  • in command prompt, navigate to the program folder of MailStore Home, which would be by default:
    C:\Program Files (x86)\MailStore\MailStore Home\
  • type the following, replacing CAPITAL LETTER paths with your personal situation:
    MailStoreHome.exe /recover /inputDir="C:\PATH\TO\YOUR\CURRENT\ARCHIVE" /keyFile="C:\PATH\TO\YOUR\CURRENT\ARCHIVE\MailStoreFileGroup.key" /outputDir="C:\MailStoreTemp"

In the event that the archive is still valid, this will extract all emails into email files in the given directory.

To re-import the extract into a new archive, do as followed:

Then you open MailStoreHome - Configuration and start a complete new archive by assigning a new empty folder.
Once you opened MailStore Home, it will be empty and new.

  • In Archive E-Mail, create a new profile to archive from the file system (“EML and MSG files”).
  • assign the location of the source folder, in our example C:\MailStoreTemp.
  • set the profile to archive a `MailStore Export’
  • run the profile.

This will import all previously recovered emails with the same folder structure into the new archive.

Finally, set up archiving profiles again for future archiving.

Please let me know if you run into any issues here.


This command doesn’t seem to be working. Do you see any issues with my input? I have double checked all the file paths.


Check again the syntax. I assume that you are missing a hyphen (").
See below:

Also, you would need to execute the command inside the directory where MailStoreHome.exe is located
(so not from within “C:\Windows\system32” like in your screenshot shown)

Follow these steps once the command prompt is visible:

  • in command prompt, navigate to the program folder of MailStore Home, which would be by default:
    C:\Program Files (x86)\MailStore\MailStore Home\

  • type the following (this only applies to @smb) in one line before hitting ⏎

    MailStoreHome.exe /recover 
    /inputDir="C:\Users\Sheldon Baird\Documents\MailStore Home\" 
    /keyFile="C:\Users\Sheldon Baird\Documents\MailStore Home\MailStoreFileGroup.key" 


Thanks that got me a little further, now the following box pops up.


Now what?


Please remove the trailing backslash ( / ) from the inputDir string and ensure that you have created the output directory already.

The command line should be (in one line, please):

MailStoreHome.exe /recover 
/inputDir="C:\Users\Sheldon Baird\Documents\MailStore Home"
/keyFile="C:\Users\Sheldon Baird\Documents\MailStore Home\MailStoreFileGroup.key" 


Ok Thanks!
The MailStore recovery utility ran. But the output file is empty. A condensed log from the file recovery is below. Is there something else I can try?

C:\Program Files (x86)\MailStore\MailStore Home\MailStoreHome.exe /recover /inputDir=C:\Users\Sheldon Baird\Documents\MailStore Home /keyfile=C:\Users\Sheldon Baird\Documents\MailStore Home\MailStoreFileGroup.key /outputDir=C:\MailStoreTemp
Precheck container file validity ... 
Scanning C:\Users\Sheldon Baird\Documents\MailStore Home...
1934 container files found.
Scanning container #1...
    0 recovery records found. Failed recoveries    0.
Scanning container #10...
    0 recovery records found. Failed recoveries    0.
Scanning container #100...
    0 recovery records found. Failed recoveries    0.
Scanning container #1000...
    0 recovery records found. Failed recoveries    0.
Scanning container #995...
    0 recovery records found. Failed recoveries    0.
Scanning container #996...
    0 recovery records found. Failed recoveries    0.
Scanning container #997...
    0 recovery records found. Failed recoveries    0.
Scanning container #998...
    0 recovery records found. Failed recoveries    0.
Scanning container #999...
    0 recovery records found. Failed recoveries    0.

Count of recovery records  : 0
Count of recovered mails   : 0
Count of failed recoveries : 0


Hello @SMB,

Please shut down MailStore Home and make a clean copy of the complete archive folder for backup reason,
as we are going to remove files from our working directory now.

Open your archive folder (the one you can tamper with) with file explorer and remove the following files:


any following file ending with:


Then start the same command in the command line prompt (cmd) you tried earlier.
This time there are no new recovery records introduced with MailStore Home 11,
so it will use the former file extraction recovery instead.