hMailServer with Microsoft SQL Compact
I have been using hMailServer for more than ten years. It is open-source and free, but unfortunately, it is not updated very often. Also, it is easy to set up and start using it, especially for a small company like mine. I did a fresh install recently with Microsoft SQL Compact edition chosen as the backend database.
I made that choice for the first time because:
I didn't have SQL Server available for this server.
PostgreSQL made a recent change in the data dictionary, and it was not compatible with hMailServer when I made the installation.
A short time after I tried to connect to the database - problems started to arise. First of all, you need to install Microsoft SQL Compact 3.5 versions x86 and x64. Yes, version 4.0 it's not good because the hMailServer database is created using version 3.5 and will not let you connect to it.
Next, you need to install Standalone Toolbox for SQL Compact 3.5 - open source on Github Now, start SqlCe35Toolbox.exe and create a connection.
The filename field - as shown in the image below - is located under the 'Database' folder. Unfortunately, it will not connect to the hMailServer database without the password.
In the installation folder of hMailServer, there is a folder called 'Bin', which contains the 'hMailServer.INI' configuration file. You will find this setting inside the file: PasswordEncryption=1 - which means the database password is encrypted. Copy into the clipboard the value of the 'Password' key and then navigate to this folder: Addons\Utilities.
Run the script file 'DecryptBlowfish.vbs', enter the passwords required and at the end, you will get the SQL Compact database password. Come back to 'add the new connection screen', enter it there, and connect. And that's it. It is important to be able to connect to the hMailServer database if you intend to automate some actions (e.g. blacklist IP addresses that are trying to use your SMTP as an open relay by brute-forcing username/password combinations).
