Hmailserver
Author: q | 2025-04-25
Compile the solution hmailserver source Tools hMailServer Tools.sln. This will build hMailServer related tools, such as hMailServer Administrator and hMailServer DB Setup. Compile Download the source code from this Git repository. Compile the solution hmailserver source Server hMailServer hMailServer.sln. This will build the hMailServer server-part (hMailServer.exe) Compile the solution hmailserver source Tools hMailServer Tools.sln. This will build hMailServer related tools, such as hMailServer Administrator and
hMailServer - Browse /hmailserver/hMailServer 4.0 at
HMailServerhMailServer is an open source email server for Microsoft Windows.This page describes how to compile and run hMailServer in debug.For other information about hMailServer, please go to hMailServerBranchesThe master branch contains the latest development version of hMailServer. This version is typically not yet released for production usage. If you want to add new features to hMailServer, use this branch.The x.y.z (for example 5.6.2) contains the code for the version with the same name as the branch. For example, branch 5.6.1 contains hMailServer version 5.6.1. These branches are typically only used for bugfixes or minor features.Environment set upRequired softwareAn installed version of hMailServer 5.7 (configured with a database)Visual Studio 2019 Community editionInnoSetup 5.5.4a (non-unicode version)Perl ActiveState ActivePerl Community Edition 32 bit works fineNOTEYou should not be compiling hMailServer on a computer which already runs a production version of hMailServer. When compiling hMailServer, the compilation will stop any already running version of hMailServer, and will register the compiled version as the hMailServer version on the machine (configuring the Windows service). This means that if you are running a production version of hMailServer on the machine, this version will stop running if you compile hMailServer. If this happens, the easiest path is to reinstall the production version.Installing Visual Studio 2019 Community editionDownload Visual Studio 2019 and launch the installation.Select the following Workloads.NET desktop developmentDesktop development with C++Select the following Individual componentsC++ ATL for latest v142 build tools (x86 & x64)Windows 10 SDK (10.0.18362.0)3rd party librariesSome 3rd party libraries which hMailServer relies on are large and updated frequently. Rather than including these large libraries into the hMailServer git repository, they have to be downloaded and built, currently manually. When you build hMailServer, Visual Studio will use a system environment variable, named hMailServerLibs, to locate these libraries.Create an environment variable named hMailServerLibs pointing at a folder where you will store hMailServer libraries, such as C:\Dev\hMailLibs.Building OpenSSLDownload OpenSSL 1.1.1* from and put it into %hMailServerLibs%.You should now have a folder named %hMailServerLibs%, for example C:\Dev\hMailLibs\openssl-1.1.1sStart a x64 Native Tools Command Prompt for VS2019.Change dir to %hMailServerLibs%.Run the following commands:Perl Configure no-asm VC-WIN64A --prefix=%cd%\out64 --openssldir=%cd%\out64 -D_WIN32_WINNT=0x600nmake clean nmake install_swBuilding BoostDownload Boost 1.72.0 from and put it into %hMailServerLibs%.You should now have a folder named %hMailServerLibs%, for example C:\Dev\hMailLibs\boost_1_72_0Start a x64 Native Tools Command Prompt for VS2019.Change dir to %hMailServerLibs%.Run the following commands:NOTE: Change the -j parameter from 4 to the number of cores on your computer. The parameter specifies the number of parallel compilations will be done.bootstrapb2 debug release threading=multi --build-type=complete --toolset=msvc address-model=64 stage --build-dir=out64 -j 4Building hMailServerVisual Studio 2019 must be started with Run as Administrator.Download the source code from this Git repository.Compile the solution hmailserver\source\Server\hMailServer\hMailServer.sln.This will build the hMailServer server-part (hMailServer.exe)Compile the solution hmailserver\source\Tools\hMailServer Tools.sln.This will build hMailServer related tools, such as hMailServer Administrator and hMailServer DB Setup.Compile hmailserver\installation\hMailServer.iss (using InnoSetup)This will build the hMailServer installation program.Running in DebugIf you want to run hMailServer in debug mode in Visual Studio, add the command argument /debug. You find this setting in the Project properties, under Configuration
hMailServer 5.7 - hMailServer forum
OverviewMost settings in an hMailServer installation is stored in the database. However, some settings are stored in the hMailServer.ini file. Examples of settings stored in the ini-file are paths and database connection information. This document lists all the available settings in hMailServer.ini.If you want to use a setting and it's not available in the hMailServer.ini file in your system, you can add the setting yourself. For example, to add the setting ConnectionAttempts to the Database section, simply add the line ConnectionAttempts=5 below the line [Database] in hMailServer.ini. In some cases, you may need to add the actual section ([SectionName]) as well. If the section already exists in the file, you should add the setting to that file. You cannot have two ini file sections with the same name in the same ini-file.SectionsDirectories ProgramFolder - The path to the hMailServer directory. By default, C:\Program Files\hMailServer. DataFolder - The path to the hMailServer data directory. By default, C:\Program Files\hMailServer\Data. LogFolder - The path where hMailServer logs are stored. By default, C:\Program Files\hMailServer\Logs TempFolder - The path where hMailServer stores temporary files, such as attachments during virus scanning. By default C:\Program Files\hMailServer\Temp EventFolder - The path where the hMailServer event file is located. By default, C:\Program Files\hMailServer\EventsGUILanguages ValidLanguages - A list of valid hMailServer user interface languages. hMailServer Administrator uses this list to determine which languages to display in the Language menu.Database Internal - 1 if the internal MySQL database is used, 0 otherwise. hMailServer uses this setting to determine whether scripts should be applied to the MySQL database on the first launch. For example, if a new version of MySQL is included with the installation program, hMailServer might run SQL scripts to patch it. Type - Type of database. Can be either MySQL or MSSQL. hMailServer uses it to determine what methodhMailServer with JavaMail - hMailServer forum
Scottkeen Normal user Posts: 35 Joined: 2016-10-28 23:10 Do you have tips for migrating from ArGoSoft Mail Server .NET to hMailServer? I've been a long-time registered user of ArGoSoft Mail Server Pro and .NET, and as much as I like and appreciate Archie who wrote the software and has always been good with replying to support questions on the ArGoSoft Google Groups forum, I find myself fighting the software too much and it's high time that I make the switch to something that is more reliable. The big problem is that the server will peg 100% CPU utilization with the ArGoSoft Mail Server .NET process unexpectedly for who-knows-why, and it brings the server to a grinding halt.So, I really want to make a go at migrating to hMailServer.For those of you who have made the migration from ArGoSoft Mail Server .NET to hMailServer,1. Are you glad you did it?2. Can you please share some tips, suggestions, and preferably outline the steps and procedures that you went through to make it successful?3. What WebMail interface do you recommend?I've asked this forum before about the copying mailboxes with IMAPCopy, and if I have to reset everyone's passwords, then that's OK.Really looking to hear from someone who has made the migration.Thanks nschoot New user Posts: 14 Joined: 2014-02-26 22:07 Re: Do you have tips for migrating from ArGoSoft Mail Server .NET to hMailServer? Post by nschoot » 2018-11-15 18:14 1. Yeah, I migrated from MS Exchange at the time (looong time ago) and moved to hMailserver. It's been working stable for me all the time with a few dozens of users and about a dozen domains. I quite infrequently install updates, but they always work fine for me.2. Don't tie your Hmailserver to your active directory - which obviously was the case when I was still running Exchange. Keeping that separated will make things a lot less complex in terms of maintenance, migrations. Set up Antivirus (I use ClamAV), black lists, SpamAssassin, security certificate asap. 3. Roundcube (via IMAP). Works fine. I've Horde running on it as well to try out ActiveSync, but. Compile the solution hmailserver source Tools hMailServer Tools.sln. This will build hMailServer related tools, such as hMailServer Administrator and hMailServer DB Setup. CompilehMailServer and Sendgrid - hMailServer forum
To use to connect to the database server, and which syntax to use for SQL statements. Username - hMailServer will use this username when connecting to the database server. If it's left empty, and MSSQL is used, hMailServer will try to use Windows Authentication. Password - The password hMailServer should use when connecting to the database server. If the passwordencryption is set to 1, the password is encrypted using blowfish. Passwordencryption - If set to 1, the database password is encrypted using blowfish. In this case, the hMailServer service decodes the password before connecting to the database. Port - The port hMailserver should connect to on the database server. Server - The database server host name hMailServer should connect to. Database - The name of the database hMailServer should try to use. NumberOfConnections - The number of connections should open to the database. The default value of this setting is 5, which means that hMailServer will open 5 connections to the database server. hMailServer often wants to execute several database queries at the same time. Since a specific database connection can only be used for one SQL statement at a time, multiple database connections improves performance. ConnectionAttempts - The number of times hMailServer should try to connect to the database before giving up on start-up. Default 6 times. (hMailServer 4.4 and later) ConnectionAttemptsDelay - The number of seconds hMailServer should pause between each connection attempt during start-up. Default 5 seconds. (hMailServer 4.4 and later)Security AdministratorPassword - The main hMailServer administration password. The user for example needs to enter this password when starting hMailServer Administrator. This password is encoded using MD5.SettingsThe settings below should be edited carefully. The exist in the ini file only for database compatibility reasons. They will be moved to the database in an upcoming version. When youIs Hmailserver safe? - hMailServer forum
Install a future version of hMailServer, you may need to change the setting once again, using hMailServer Administrator. DNSBLChecksAfterMailFrom - By default, hMailServer runs DNS blacklists checks after SMTP/MAIL FROM. Some users prefer to have it running after the SMTP/RCPT TO command. In this case, set the value of this setting to 0. DisableAUTHList (from 5.6.3) - Setting DisableAUTHList allows you to specify a comma-separated list of SMTP ports which authentication should not be enabled for. This is useful when working with legacy systems with malfunctioning SMTP support. AddXAuthUserHeader - If set to 1, hMailSever will add a X-AuthUser header containing a username to messages received using SMTP, if the user has authenticated. GreylistingEnabledDuringRecordExpiration - This setting lets you configure hMailServer to temporarily disable grey listing functionality while old grey listing records are cleaned away. This may be required if you have a large amount of greylisting records and are using SQL. When hMailServer deletes old records, the entire greylisting table will become locked for a long time. If other database connections tries to access the table meanwhile, they will have to wait for the deletion to complete. If this takes several minutes, this is likely to cause problems. Default value is 1, which means that hMailServer will continue to use grey listing when deleting records from the database. GreylistingRecordExpirationInterval - This setting defines how often hMailserver should delete expired greylisting records from the database. Deleting records may be a time consuming task. The default value is 240, which means that hMailServer will clear expired records every 240 minute (every 4th hour). PreferredHashAlgorithm - This setting allows you to specify which hashing algorithm hMailServer should use for passwords in the hMailServer database. In old versions of hMailServer, passwords were stored in plain text. In hMailServer 4, passwords were stored inTrouble Installing hMailServer - hMailServer forum
MD5. In hMailServer 5, the default preferred hash is now salted SHA256. The following values are valid for this setting: 0 - None. Store passwords in clear text. This is not recommended. 1 - Blowfish. Store passwords encrypted using Blowfish. This is not recommended, since the password used for encryption is known. Hence, this is no more safe than option 0. 2 - MD5. Store passwords in MD5 hash. This is only recommended to preserve backwards compatibility if you have application which integrates with the hMailServer database. 3 - SHA256 - Store passwords in SHA256 hashes. This is currently the recommended option which gives the highest level of security. RewriteEnvelopeFromWhenForwarding (from version 5.6.2 b 2223) - When performing forwarding, hMailServer now keeps the original From address rather than changing to that of the forwarding account. This change was made to reduce risk of message delivery failures. To force the previous behavior, set RewriteEnvelopeFromWhenForwarding=1. Compile the solution hmailserver source Tools hMailServer Tools.sln. This will build hMailServer related tools, such as hMailServer Administrator and hMailServer DB Setup. Compile Download the source code from this Git repository. Compile the solution hmailserver source Server hMailServer hMailServer.sln. This will build the hMailServer server-part (hMailServer.exe) Compile the solution hmailserver source Tools hMailServer Tools.sln. This will build hMailServer related tools, such as hMailServer Administrator andComments
HMailServerhMailServer is an open source email server for Microsoft Windows.This page describes how to compile and run hMailServer in debug.For other information about hMailServer, please go to hMailServerBranchesThe master branch contains the latest development version of hMailServer. This version is typically not yet released for production usage. If you want to add new features to hMailServer, use this branch.The x.y.z (for example 5.6.2) contains the code for the version with the same name as the branch. For example, branch 5.6.1 contains hMailServer version 5.6.1. These branches are typically only used for bugfixes or minor features.Environment set upRequired softwareAn installed version of hMailServer 5.7 (configured with a database)Visual Studio 2019 Community editionInnoSetup 5.5.4a (non-unicode version)Perl ActiveState ActivePerl Community Edition 32 bit works fineNOTEYou should not be compiling hMailServer on a computer which already runs a production version of hMailServer. When compiling hMailServer, the compilation will stop any already running version of hMailServer, and will register the compiled version as the hMailServer version on the machine (configuring the Windows service). This means that if you are running a production version of hMailServer on the machine, this version will stop running if you compile hMailServer. If this happens, the easiest path is to reinstall the production version.Installing Visual Studio 2019 Community editionDownload Visual Studio 2019 and launch the installation.Select the following Workloads.NET desktop developmentDesktop development with C++Select the following Individual componentsC++ ATL for latest v142 build tools (x86 & x64)Windows 10 SDK (10.0.18362.0)3rd party librariesSome 3rd party libraries which hMailServer relies on are large and updated frequently. Rather than including these large libraries into the hMailServer git repository, they have to be downloaded and built, currently manually. When you build hMailServer, Visual Studio will use a system environment variable, named hMailServerLibs, to locate these libraries.Create an environment variable named hMailServerLibs pointing at a folder where you will store hMailServer libraries, such as C:\Dev\hMailLibs.Building OpenSSLDownload OpenSSL 1.1.1* from and put it into %hMailServerLibs%.You should now have a folder named %hMailServerLibs%, for example C:\Dev\hMailLibs\openssl-1.1.1sStart a x64 Native Tools Command Prompt for VS2019.Change dir to %hMailServerLibs%.Run the following commands:Perl Configure no-asm VC-WIN64A --prefix=%cd%\out64 --openssldir=%cd%\out64 -D_WIN32_WINNT=0x600nmake clean nmake install_swBuilding BoostDownload Boost 1.72.0 from and put it into %hMailServerLibs%.You should now have a folder named %hMailServerLibs%, for example C:\Dev\hMailLibs\boost_1_72_0Start a x64 Native Tools Command Prompt for VS2019.Change dir to %hMailServerLibs%.Run the following commands:NOTE: Change the -j parameter from 4 to the number of cores on your computer. The parameter specifies the number of parallel compilations will be done.bootstrapb2 debug release threading=multi --build-type=complete --toolset=msvc address-model=64 stage --build-dir=out64 -j 4Building hMailServerVisual Studio 2019 must be started with Run as Administrator.Download the source code from this Git repository.Compile the solution hmailserver\source\Server\hMailServer\hMailServer.sln.This will build the hMailServer server-part (hMailServer.exe)Compile the solution hmailserver\source\Tools\hMailServer Tools.sln.This will build hMailServer related tools, such as hMailServer Administrator and hMailServer DB Setup.Compile hmailserver\installation\hMailServer.iss (using InnoSetup)This will build the hMailServer installation program.Running in DebugIf you want to run hMailServer in debug mode in Visual Studio, add the command argument /debug. You find this setting in the Project properties, under Configuration
2025-04-14OverviewMost settings in an hMailServer installation is stored in the database. However, some settings are stored in the hMailServer.ini file. Examples of settings stored in the ini-file are paths and database connection information. This document lists all the available settings in hMailServer.ini.If you want to use a setting and it's not available in the hMailServer.ini file in your system, you can add the setting yourself. For example, to add the setting ConnectionAttempts to the Database section, simply add the line ConnectionAttempts=5 below the line [Database] in hMailServer.ini. In some cases, you may need to add the actual section ([SectionName]) as well. If the section already exists in the file, you should add the setting to that file. You cannot have two ini file sections with the same name in the same ini-file.SectionsDirectories ProgramFolder - The path to the hMailServer directory. By default, C:\Program Files\hMailServer. DataFolder - The path to the hMailServer data directory. By default, C:\Program Files\hMailServer\Data. LogFolder - The path where hMailServer logs are stored. By default, C:\Program Files\hMailServer\Logs TempFolder - The path where hMailServer stores temporary files, such as attachments during virus scanning. By default C:\Program Files\hMailServer\Temp EventFolder - The path where the hMailServer event file is located. By default, C:\Program Files\hMailServer\EventsGUILanguages ValidLanguages - A list of valid hMailServer user interface languages. hMailServer Administrator uses this list to determine which languages to display in the Language menu.Database Internal - 1 if the internal MySQL database is used, 0 otherwise. hMailServer uses this setting to determine whether scripts should be applied to the MySQL database on the first launch. For example, if a new version of MySQL is included with the installation program, hMailServer might run SQL scripts to patch it. Type - Type of database. Can be either MySQL or MSSQL. hMailServer uses it to determine what method
2025-03-26To use to connect to the database server, and which syntax to use for SQL statements. Username - hMailServer will use this username when connecting to the database server. If it's left empty, and MSSQL is used, hMailServer will try to use Windows Authentication. Password - The password hMailServer should use when connecting to the database server. If the passwordencryption is set to 1, the password is encrypted using blowfish. Passwordencryption - If set to 1, the database password is encrypted using blowfish. In this case, the hMailServer service decodes the password before connecting to the database. Port - The port hMailserver should connect to on the database server. Server - The database server host name hMailServer should connect to. Database - The name of the database hMailServer should try to use. NumberOfConnections - The number of connections should open to the database. The default value of this setting is 5, which means that hMailServer will open 5 connections to the database server. hMailServer often wants to execute several database queries at the same time. Since a specific database connection can only be used for one SQL statement at a time, multiple database connections improves performance. ConnectionAttempts - The number of times hMailServer should try to connect to the database before giving up on start-up. Default 6 times. (hMailServer 4.4 and later) ConnectionAttemptsDelay - The number of seconds hMailServer should pause between each connection attempt during start-up. Default 5 seconds. (hMailServer 4.4 and later)Security AdministratorPassword - The main hMailServer administration password. The user for example needs to enter this password when starting hMailServer Administrator. This password is encoded using MD5.SettingsThe settings below should be edited carefully. The exist in the ini file only for database compatibility reasons. They will be moved to the database in an upcoming version. When you
2025-04-08Install a future version of hMailServer, you may need to change the setting once again, using hMailServer Administrator. DNSBLChecksAfterMailFrom - By default, hMailServer runs DNS blacklists checks after SMTP/MAIL FROM. Some users prefer to have it running after the SMTP/RCPT TO command. In this case, set the value of this setting to 0. DisableAUTHList (from 5.6.3) - Setting DisableAUTHList allows you to specify a comma-separated list of SMTP ports which authentication should not be enabled for. This is useful when working with legacy systems with malfunctioning SMTP support. AddXAuthUserHeader - If set to 1, hMailSever will add a X-AuthUser header containing a username to messages received using SMTP, if the user has authenticated. GreylistingEnabledDuringRecordExpiration - This setting lets you configure hMailServer to temporarily disable grey listing functionality while old grey listing records are cleaned away. This may be required if you have a large amount of greylisting records and are using SQL. When hMailServer deletes old records, the entire greylisting table will become locked for a long time. If other database connections tries to access the table meanwhile, they will have to wait for the deletion to complete. If this takes several minutes, this is likely to cause problems. Default value is 1, which means that hMailServer will continue to use grey listing when deleting records from the database. GreylistingRecordExpirationInterval - This setting defines how often hMailserver should delete expired greylisting records from the database. Deleting records may be a time consuming task. The default value is 240, which means that hMailServer will clear expired records every 240 minute (every 4th hour). PreferredHashAlgorithm - This setting allows you to specify which hashing algorithm hMailServer should use for passwords in the hMailServer database. In old versions of hMailServer, passwords were stored in plain text. In hMailServer 4, passwords were stored in
2025-04-17OverviewThis page describes how to upgrade from hMailServer version 5.2 to 5.3. If you follow these steps, the server downtime will only be a few minutes. Before upgrading, you should make sure that you have a backup of the entire hMailServer directory, hMailServer database and hMailServer.ini, in case something goes wrong. The steps below are the same regardless of the database server type that hMailServer is using. Please read through this entire page before you upgrade.Before installation If you are using the internal MySQL database, and are upgrading from 4.2 or earlier, you should install the latest 4.4-build prior to upgrading to version 5. If you do not do this, the database upgrade will fail. If you are using other software which communicates with hMailServer, make sure that that software is compatible with the hMailServer version you are upgrading to. This may be the case for example if you're using 3'rd party web interfaces for the server.Install the new version IMPORTANT: Back up your hMailServer database, your data directory and the hMailServer.ini file. Read the Backwards compatibility section below. If something is unclear, it's recommended that you install hMailServer 5 on a test server first to learn about the new functionality. Download hMailServer 5 from the hMailServer website. Launch the setup executable by double-clicking it. You should not stop or uninstall the current version before instaling the new version. Run through the setup dialogs and click Install in the Ready to install dialog. The setup software now makes a copy of the files. After the files have been copied, the setup software will automatically start hMailServer database upgrade. If you see the text "Creating the hMailServer database" in the installation wizard for more than 15 seconds, and no "Database upgrade"-dialog is shown, it's likely that the upgrade dialog is located "behind" the wizard. So if the upgrade dialog is not shown, try moving the installation wizard window. Click Upgrade to upgrade the database to the latest structure. Click Exit to return to the setup wizard Click Finish to exit the setup and start hMailAdmin. Â
2025-04-23Properties -> Debugging.Running testshMailServer source code contains a number of automated tests which excercises the basic functionality. When adding new features or fixing bugs, corresponding tests should be added. hMailServer tests are implemented using NUnit. To run them in Visual Studio, follow these steps:NOTE: When running tests, your local hMailServer installation will be updated with test accounts. Existing domains and accounts are deleted. Each tests prepares the server configuration in different ways. In other words, do not run the automated tests in an environment where you need to preserve hMailServer data.Make sure hMailServer.exe is built and can be run. The tests will launch the service.Open the test solution, \hmailserver\test\hMailServer Tests.slnIn Visual Studio, select Test Explorer from the View-menu.Locate a test to run under "RegressionTests"Right-click on a test or test category and select "Run".You can also navigate to the source code for a test, right-click anywhere and select "Run Test(s)" to run it.Releasing hMailServerWithout finding any serious issues:Run all integration tests on supported versions of Windows and the different supported databases.Run all server stress testsEnable Gflags (gflags /p /enable hmailserver.exe) and run all integration tests to check for memory issuesRun for at least 1 week in production for hMailServer.comWait for at least 500 downloads of the beta version
2025-04-11