Upgrading from 5.x, 6.2 or 6.3: the 24 changes without a switch, and rolling back
-
Written for 6.3.4. hMailServer 6.3.6 (6 October 2026) adds three one-way schema steps (6106 to 6108), changes more without a switch (DANE lookups that do not come back whole, external accounts' days to keep messages, the COM helpers, Windows folder permissions, the REST listener's Host) and installs by the live update from 6.3.4 or 6.3.5: read the 6.3.6 announcement before upgrading. hMailServer 6.3.7 (17 October 2026), a security release, adds no schema step (6108 stays, so the live update's rollback from it to 6.3.6 meets no newer schema) and installs by the live update from 6.3.4, 6.3.5 or 6.3.6, with the exceptions its announcement lists; it too changes what an upgraded server does without a switch: an authenticated submission is DKIM-signed as another hosted domain only when the account may send as the From address; a domain's or an account's rule may no longer set From, Sender, Resent-From, Resent-Sender, DKIM-Signature or the loop count, nor a Sieve script add or delete them or send notify from an arbitrary :from; RuleLoopLimit 0 stops out-of-office replies; the serveradmin role with a list of domains is confined to those domains over COM; forwards of outside mail take an envelope sender in the hosted domain only on a DMARC pass; the anti-virus action that removes attachments replaces a single-part attachment message with its note and deletes unreadable mail; SASL PLAIN acting as another account is refused; on Windows
/ProtectFoldershardens the program folder,BinandControlPanel, the x64 installer's MariaDB Connector/C 3.4.11 drops MySQL Enterprise's Windows authentication, and an upgraded server keeps the .NET 10 Desktop Runtime it had, where the installers carry 10.0.13. See the 6.3.7 announcement. hMailServer 6.3.8 (2 November 2026), a security release, adds no schema step either (6108 stays, so the live update's rollback from it meets no newer schema) and installs by the live update from 6.3.4, 6.3.5, 6.3.6 or 6.3.7, with the exceptions its announcement lists; of what it changes without a switch, these are the most likely to need something done before upgrading:TlsMode=verify-fullon MySQL or MariaDB withoutTlsCaFile, to a database server on the same machine, is refused with HM7535; on Windows a file whose path holds characters outside ASCII - the database'sTlsCaFileorPostgreSQLSslRootCert, a TLS certificate or private key file,dh2048.pem, a client-certificate CA file,MessageStoreObjectCaFile,OAuth2PublicKeyFileorAcmeCertificateDirectory- may be refused with HM7534 or HM7536; on Linux files are named in UTF-8 whateverLANGsays, so where a server ran under aLANGthat is not UTF-8, each file or folder named outside ASCII is to be renamed to its UTF-8 name; a sign-in name spelt otherwise than the stored address, in more than the case of the letters A to Z, or with white space at either end, may no longer sign in; an IP range of your own that allows some addresses none of SMTP, POP3 and IMAP now closes the web services listener to them too; a REST body that is not one JSON object within the bounds is answered 400; anAcmeDomainshost the certificate lacks is ordered at the first check, and one the CA cannot validate holds the renewal for the others; and on Windows setup refuses with exit code 7 a program folder,BinorControlPanel, or a folder or a link on the way to them, that another account controls, and refuses an installation of the original hMailServer's 5.7, which no upgrade step reaches: move such a server's mail over IMAP instead. See the 6.3.8 announcement.This topic covers what comes after the installer in an upgrade to 6.3.4 (27 September 2026, schema 6104): the 24 changes CHANGELOG.md lists under "What changes on upgrade without a switch", with what to do about each; what else differs coming from 5.x or early 6.x; what the server says when the schema and the server do not match; and how to go back. The path, the slow steps and the backup are in Upgrading to 6.3.4.
Know this first: an upgrade cannot undo itself. An older server refuses a newer schema rather than misread it, so the database backup taken before the installer ran is the only way back. Going back from 6.3.4 can also need the
hMailServer.iniyou had before the upgrade, as Rolling back from 6.3.4 below explains. Keep a copy of both.The 24 changes, and what to do about each
Numbered as CHANGELOG.md numbers them; all are since 6.3.4.
# What changes What to do Detail 1 The database is the settings store (schema 6042); [Settings]inhMailServer.iniis its copy. A line edited in the file is put back and named asHM5804Do not edit the file to prepare the upgrade; restart the old service once after your last change. Afterwards use the Control Panel, COM ( Settings.SetIniSetting), REST (PUT /api/v1/settings/ini/{name}) or, on Linux,hmailserver --set-setting NAME=VALUEUpgrading to 6.3.4; Settings 2 211 keys apply when saved, 28 at a reinitialise, 2 at a restart A script that counted on nothing happening until the next start now sees its change at once Settings: when a save takes effect 3 SPF follows RFC 7208: 127.0.0.0/8 and ::1no longer pass before any policy is read. SPF now works on Linux, where every check had been TempErrorA content filter that re-injects mail authenticates, or connects from an IP range with anti-spam off The anti-spam stack 4 The audit trail is on (schema 6043), kept until a retention is set; alerts are on, but nothing is mailed until AlertRecipientandAlertSenderAddressare setSet AuditRetentionDays, and the two addressesAlerts and the audit trail 5 Compromised-account detection starts in watch mode (schema 6071): it raises account.compromisedand holds nothingSet compromise_detection_modetoenforcewhen you want a takeover heldHardening: compromised-account detection 6 A 421, or a provider's rate-limit 4xx, pauses that destination for OutboundBackoffMinutes(2, doubling to 60)Nothing; 0 turns it off Outbound shaping 7 A backup carries what an account keeps beyond its mail: address book, preferences, calendars, S/MIME keys, keywords and more Expect larger archives. One from 6.3.3 or earlier restores as it did, without them Backup and restore 8 The out-of-office memory is a table (schema 6060) Nothing: a restart no longer sends everyone the reply again Rules and Sieve: vacation replies 9 Collected addresses are suggestions under Other contacts; CardDAV serves only kept contacts Tell users a phone no longer receives collected addresses; Keep makes one a contact Calendars and contacts 10 In the container image, HM_SETTING_<key>andHM_PROPERTY_<name>are stored at every start, and the setting is refused to the other interfacesRemove the variable and start once without it. No container image of 6.3.4 is published In a container 11 GET /api/v1/me/searchgoes on from where it stoppedBelow Below 12 IMAP answers as the RFCs say: NOrather thanBADfor a missing mailbox,\Seenset by everyBODY[<section>]without.PEEK, SORT and THREAD ordering, APPEND byte for byteTest clients and scripts that relied on the old answers Connecting a mail client 13 MySQL and MariaDB tables become utf8mb4(schema 6102), every table rebuiltMySQL 5.7.9 or MariaDB 10.2.2 or later, the ALTER privilege on the database, free disk of the order of the largest table Upgrading to 6.3.4; Databases on Linux: the upgrade floor 14 Schema 6101 adds two columns to hm_messagesOn a large store, time it on a copy first Upgrading to 6.3.4 15 The database connection is encrypted when the database server offers TLS, for MySQL and MariaDB without checking the certificate; PostgreSQL is unchanged Read the application log at the first start, or run --check-database;TlsModeandTlsCaFilein[Database]choose otherwiseChoosing a database: encrypting the link 16 The administrator password is hashed again at the first successful administrator sign-in; a browser session made under the old hash ends once Sign in once. A file the service cannot write keeps the old value ( HM7494)Hardening a public mail server 17 A COM change to a route, an incoming relay, a DNS black list, an SSL certificate or five more kinds of shared object takes effect at Save()Add Save()where a script relied on setting a property; the Control Panel is not affectedThe COM API on Windows: Save() 18 Mail labelled ISO-8859-1 is decoded as windows-1252 Below Below 19 A restore refuses an unsafe archive whole ( HM7540)Nothing: no backup this server writes has such an entry Backup and restore 20 A rule's Run function action must name a plain function: otherwise HM5018on Windows, and on Linux nothing runs and the ERROR log has a Script Error lineRename such functions to ASCII letters, digits, _and$, not starting with a digitEvent scripts: the 6.3.4 security fix; the advisory 21 A domain can no longer be named as one of the server's own directories Below Below 22 A one-time code is taken once, over COM and REST: a TOTP code the server has accepted is refused if it comes again within its window, but not counted as a wrong code, so it locks nobody out A script that sent the administrator's password and a code with every REST request now has only its first request in each half minute accepted, the others refused with 401: sign it in once with POST /api/v1/sessionand use thehmailsessioncookie, or give it an API keyThe REST API: one-time codes 23 The outbound relay sends its OAuth2 token over TLS only: a route or the SMTP relay whose host is on OutboundOAuth2Hostsand whose connection security is none, or STARTTLS optional against a server that does not offer it, fails with a temporary450 4.7.0(HM5912), and the message waits for the route's retriesSet that connection security to TLS or STARTTLS required. A route to Exchange Online on 587, set up as Microsoft documents it, is not affected Routes, relays and smart hosts: OAuth2 24 A hash stored before 6.3.4 of a password with a character above U+00FF is refused Set such passwords again, and soon Upgrading to 6.3.4; Hardening a public mail server Three that no table row can hold
ISO-8859 (18). ISO-8859-1 is decoded as windows-1252, as every mail client reads it, and ISO-8859-2 to -9, -13 and -15 by their own code pages. There was no ISO-8859 name in the server's table at all, so a Western Windows server decoded Latin-1 right by accident and decodes it as before, one with another ANSI code page now decodes it right too, and on Linux Latin-1 is no longer turned into replacement characters. There is nothing to set.
Reserved domain names (21). A domain's mail is kept in the directory named after it under the data directory, beside the server's own stores. So a single-label name such as
protected,confidential,recoverable,discovery,quarantine,files,listsorblobs, in any case, ortemp,eventsanddatabase, which the Linux packages put there, is refused for a new domain and for a rename over COM (Domain.Save) and REST, and so in the Deck. The Control Panel already refused every name without a dot. A domain that already has such a name is still saved, so that it can be managed, and is named asHM7597in the error log at every start and asdomain_name_reservedon the first-hour checklist. Rename it: the rename moves each of its accounts' mailboxes and leaves the store's files where they are. Until then, a domain namedrecoverable,discovery,confidentialorprotectedhas its mail in a folder the backup leaves out.The search route (11). Only a client of
GET /api/v1/me/searchother than the webmail needs to change. A search with more hits thanlimitansweredcomplete: true, more: trueand could not reach the rest; it now answerscomplete: false, more: truewithnext_before_id, whichbefore_idcontinues from. Hits come newest first across every folder by message id, where they came folder by folder (Performance.md).Coming from 5.x or early 6.x
The 24 apply to you too, and so do the changes of every release in between: section 5 of Changes Since 6.2.10 lists what came without a switch from 6.2.10 to 6.2.28. On 5.3 to 5.5, back up first and test the restore. Four things are particular to an older installation, all on Windows:
- The Administrator is replaced by the Control Panel.
hMailAdmin.exewas retired in 6.2. The Control Panel,hMailCP.exe, does everything it did, and its navigation tree mirrors the old layout. Your TOTP secret carries over. - The PHP WebAdmin is gone. Administer a remote server with the Control Panel, which connects to it directly, or from a browser with the Control Deck. The "Administrative tools" component now only registers the COM type library for scripts on another machine.
- A pre-5
hMailServer.inimoves intoBin. The installer copies it from the Windows directory toBin\hMailServer.ini, leaves a.oldcopy where it was and deletes the original; the server reads only the one inBin. - The .NET 10 runtime. Since the first release after 6.2.18 the Control Panel and the setup tools (
DBSetup,DBSetupQuick,DBUpdater) need the .NET 10 Desktop Runtime. The installer bundleswindowsdesktop-runtime-10.0-win-x64.exeand installs it/quiet /norestartwhen it is missing (6.3.7's installers carry 10.0.13 and install it only where no .NET 10 Desktop Runtime is installed at all: an upgraded server keeps the one it had, 10.0.12 where 6.3.4 to 6.3.6 installed it, and brings it to 10.0.13 or later through Microsoft Update or Microsoft's installer).
If the runtime does not install. Upgrading.md says the server, native code with no .NET dependency, is left working without the Control Panel. The documentation's 18.5 says otherwise, and for an upgrade to 6.3.4, which always moves the schema, it is right: Upgrading.md itself says the setup tools need the runtime too, and the server refuses to start against an old schema, so there is no mail server until the schema is moved. Install the runtime (x64) by hand from
https://dotnet.microsoft.com/download/dotnet/10.0, runDBUpdater.exefrom the installation'sBinfolder, then start the service.When it goes wrong
At every start the server compares the version in
hm_dbversionwith the one it requires and refuses to run if they differ, in either direction. The ERROR log has one of these:Code and message What it means What to do HM5011:The database is too old for this version of hMailServer. Please run hMailServer Database updater (DBUpdater.exe) to upgrade it.The schema did not get all the way up Run DBUpdater.exefrom the installation'sBinfolderHM5011:The database is too new for this version of hMailServer. Please upgrade hMailServer.An older server against a newer schema: an old binary left in place, or a previous release reinstalled Install the matching or a newer server. Do not try to downgrade the database HM5010:Database version could not be detected.hm_dbversioncould not be read at allCheck the connection details in [Database]and that the login can read the tableBoth
HM5011messages end withDatabase version: <n>, Required database version: <m>. On Windows the service reports itself running before this check, so a refused start leaves a service Windows calls Running with nothing listening: read the ERROR log. A 6.3.3 server against a 6.3.4 database is the too-new case on purpose: step 6041 to 6042 changes only the version, the fence that keeps a 6.3.3 server, which letshMailServer.INIwin, away from a database that is now the settings store.Resuming. DBUpdater picks up from whichever version the database actually reports, so a retry after a partial upgrade resumes rather than restarting. A failed step leaves PostgreSQL exactly as it was and SQL Server normally so; MySQL, MariaDB and SQL Server Compact commit DDL as it executes and keep the steps that ran. The same chain also runs:
- on Windows, since 6.3.4, as
hMailServer.exe --upgrade-databasewith the service stopped, without DBUpdater's window or the administrator password; it exits 0 (done, or nothing to do), 1 (failed; the output names the step) or 2 (no[Database]configured); - on Linux as
hmailserver --upgrade-database, which the.deband.rpmrun after installing; - at the service's own start with
UpgradeOnStart=1in[Database](since 6.3.4, off by default): a failing step refuses the start withHM5011naming the step, and the next start resumes there. It backs nothing up, and belongs on one node at a time (Warm standby).
DBUpdater exits 0 on success, 1 when the upgrade failed, 2 on a configuration error, and 3 when authentication was cancelled or, under
/silent, could not be satisfied: seeHM_ADMIN_PASSWORDin Unattended installs. The installer fails with a non-zero exit code of its own; treat that, or a schema version still on the old value, as the failure:select value from hm_dbversion;Asking for help. Give the versions you started from, the step DBUpdater stopped on and the database's own error number; Read this before you post has the rest. Without a GitLab account, email the Service Desk address, contact-project+hmailserver-hmailserver-86730559-issue-@incoming.gitlab.com: GitLab files it as a confidential issue, and replies come by email.
Rolling back from 6.3.4
- Uninstall 6.3.4.
- Restore the pre-upgrade database backup. This is the essential step: the schema is at 6104, and the release you go back to refuses it.
- Put the right
hMailServer.iniin place before the older installer runs, because its/Registerreads the file. Which file depends on whether 6.3.4 sealed the stored secrets, that is, whether a stored-secrets key was made:- Sealed: restore the pre-upgrade
hMailServer.ini. 6.3.4 writes the[Settings]secrets into the file asHMK1:envelopes, and an older server reads them as they are: its/RegisterhandsServiceAccountPassword's envelope to Windows as the service account's password, and the service cannot log on. Its first moments also run SRS, BATV and OAuth2 on the envelopes. - Not sealed: the 6.3.4 file can stay. Its
[Settings]section is a complete copy of the stored settings, and an older server reads the file as the truth, so a setting changed after the upgrade survives, wherever the server could write the file, which a Linux package installation's unit does not allow. Delete the[SettingsStore]section, which older builds ignore. They ignore[SettingsOverride]too, so move any value only it supplied into[Settings].
- Sealed: restore the pre-upgrade
- Check
PasswordPepper. Since 6.3.4 it is kept in the file only, never sealed and in no backup 6.3.4 writes. The file the older server starts with must carry the value the hashes were made with: no pepper, or a different one, refuses every account hashed with Argon2id or scrypt. PBKDF2, the default, is not peppered. - Install the release you came from.
- Sealed, with no pre-upgrade file? Set
ServiceAccountPassword, and any other of those secrets you use, again with the older version's Control Panel, then runhMailServer.exe /Registeragain.
The wiki's and the documentation's 18.6 reinstall before they restore the database; Upgrading.md restores first. Follow Upgrading.md: the older installer runs DBUpdater, which refuses a database newer than its own build, and its
/Registerreads the file.The data directory normally stays. Upgrading.md and the wiki's 18.6 say it does not normally need restoring, because no upgrade step rewrites message files; the documentation's 18.6 says to restore it with
hMailServer.INI. Left in place, mail that arrived after the backup exists on disk with no metadata row in the restored database, and is invisible. That is what a rollback costs.What it does not do
- The rollback above is the Windows one. Chapter 18 and Upgrading.md give no package command for going back on Linux; the database rule is the same.
- No backup carries a
[SettingsOverride]value; it lives only in the file of the machine that has it. - Moving to another machine is not an upgrade: Moving to new hardware.
Where to read more
- Upgrading hMailServer, 18.5 and 18.6; the documentation's 18.6
- Upgrading.md and its wiki copy, Upgrading Guide
- CHANGELOG.md, 6.3.4, and Changes Since 6.2.10, section 5
- SecretsAtRest.md, "Rolling back", and Settings Overview
- SetupChecklist.md and AccountRecovery.md, for items 21 and 22
- Troubleshooting, for a start that fails
- The Administrator is replaced by the Control Panel.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login