Unplanned shutdowns or crashes of a mail server aren't uncommon. Hardware problems, disk space issues, antivirus programs that weren't excluded so they scan SmarterMail folders and make file changes, backup software that doesn't use Volume Shadow Copy and more can cause a mail server to crash or cause an unplanned hard reboot of a server, or even cause anomalies that affect users. When this happens, users and Domain Administrators may see a variety of issues including, but not limited to, the following:
- Users can't log into their mailboxes
- Users email clients start throwing errors when trying to sync
- Users are missing folders after they log in
- Users are outright missing
- The inability to change a user's password or view a user's password
- The inability to change user quotas (e.g., disk space)
Crashes and/or software conflicts tend to cause root file corruption of a mail server. SmarterMail uses JSON files for all user and domain settings, and when one of these files becomes corrupted, all kinds of issues can occur. Thankfully, resolving these issues in SmarterMail is very easy.
JSON Files Affected
When troubleshooting these types of issues, there are a few main JSON files to look at:
At the DOMAIN level:
- accounts.json -- this contains all of the accounts for a specific domain
- settings.json -- this contains the domain's settings
- folders.json -- this contains all the folders created for all users of the domain
At the USER level:
- folders.json -- this contains that user's folders
- settings.json -- this contains that user's settings
These files are stored within each domain folder. So, if you have the domain "example.exe" set up in SmarterMail, and you've used the default paths for your SmarterMail installation, these JSON files for example.exe would be located here:
C:\SmarterMail\Domains\example.com -- for the domain
C:\SmarterMail\Domains\example.com\Users\jdoe -- for the "doe" user
Restoring JSON Files
After a crash, any one of the JSON files can become corrupted. Opening them using something like Notepad ++ will show odd characters or the files may even be blank. DO NOT BE ALARMED!
You'll notice an Archived Data folder inside the example.com domain folder as well as within each User folder. This is what makes SmarterMail so cool: it makes backup copies of all of the domain AND user JSON files daily, and rotates those backups on a weekly basis. Therefore, all you have to do to fix your issues is restore an affected file from the most recent archive for the domain as a whole or for individual Users. To do this, do the following:
- Unzip your most recent archive. This will most likely be named with its backup date.
- Stop the mail service.
- Copy the archived JSON file.
- Delete the corrupted JSON file.
- Paste the archived JSON to replace the corrupted file.
- Restart the mail service.
You can repeat this for any JSON file that requires replacing. Once done, whatever issues you were seeing because of a crash should be resolved!