Overview
The MailEssentials Configuration UI can sometimes throw an error when you attempt to access the Email Blocklist configuration by navigating to GFI MailEssentials > Anti-Spam > Email Blocklist. The error message points to a corrupt Whitelist/Blocklist database named ControlLists.sdf which is a SQL Server Compact database file.
This article describes the procedure to recover from the corrupt ControlLists.sdf database.
Diagnosis
Confirm the ControlLists.sdf database corruption by navigating to GFI MailEssentials > Anti-Spam > Anti-Spam Filters > Email Blocklist. The following error message is displayed on the UI:
The Debug log file for Data Access Layer located at ...GFI\MailEssentials\Antispam\DebugLogs\MailEssentials.ControlLists.DAL.log
which writes data to the ControlLists.sdf database will indicate the following database errors:
"info ","MailEssentials.ControlLists.DAL","<< Init(False)"
"info ","MailEssentials.ControlLists.DAL",">> Init()"
"info ","MailEssentials.ControlLists.DAL","DataAccessLayer - DBPath: C:\Program Files (x86)\GFI\MailEssentials\Antispam\Data\ControlLists.sdf"
"info ","MailEssentials.ControlLists.DAL","DataAccessLayer - Connection String: Data Source=C:\Program Files (x86)\GFI\MailEssentials\Antispam\Data\ControlLists.sdf; Max Database Size=2048; Default Lock Timeout=20000; Max Buffer Size = 1024;"
"warning","MailEssentials.ControlLists.DAL","Warning: Error while creating session factory - Error Message: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
"info ","MailEssentials.ControlLists.DAL","Will try to repair the database..."
"info ","MailEssentials.ControlLists.DAL","Verifying database..."
"info ","MailEssentials.ControlLists.DAL","Verifying database...verification failed. Will repair database."
"error ","MailEssentials.ControlLists.DAL","Error: Error while creating session factory - Error Message: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
Solution
- The procedure described below will wipe out all the existing email blocklists which will have to be recreated afresh once the UI is restored. If you have access to SQL Server Management Studio or any 3rd party database tools that can open and repair corrupt SDF files, you may attempt to repair the corrupt file and recover the existing blocklists.
- Ensure that you are running the latest release of MailEsssentials (Version 21.6 Release 20200204 with all available patches installed) before proceeding with the recovery steps.
Replace the corrupt blocklist database with an empty blocklist database to restore access to the Email Blocklist configuration screen by following these steps:
- Stop all GFI MailEssentials services and the Exchange transport or SMTP service.
- Rename the current Blocklist database file located at
...GFI\MailEssentials\Antispam\Data\ControlLists.sdf
toControlListsBkp.sdf
- Download the empty
ControlLists.sdf
file attached at the bottom of this article and copy it to...GFI\MailEssentials\Antispam\Data\
- Restart all GFI services stopped in step 1.
Testing
Navigate to GFI MailEssentials > Anti-Spam > Anti-Spam Filters > Email Blocklist.
The Email Blocklist configuration page should now open successfully and permit the creation/importation of new blocklist entries without errors.