<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Moving to new hardware, and why Windows to Linux is a rebuild]]></title><description><![CDATA[<p dir="auto">Moving to new hardware is a restore onto fresh metal. <a href="https://www.progressiverobot.com/hmailserver-documentation/#15-backup-and-restore" rel="nofollow ugc">Chapter 15</a> is the prerequisite, and the first time, rehearse onto a test machine.</p>
<h3><a class="anchor-offset" name="the-plan-a-href-https-www.progressiverobot.com-hmailserver-documentation-332-moving-hmailserver-to-a-new-machine-rel-nofollow-ugc-33.2-a"></a>The plan (<a href="https://www.progressiverobot.com/hmailserver-documentation/#332-moving-hmailserver-to-a-new-machine" rel="nofollow ugc">§33.2</a>)</h3>
<ol>
<li>Check the new machine against the chapter 3 checklist. Size the disk for the mail store you have now, not the one you had at installation.</li>
<li>Install the same version, in the same path. The database records absolute paths to message files, so a different version or directory is where these go wrong.</li>
<li>Back up the old server. The built-in backup does not include messages unless you tick the option. For a large store, stop the service, copy <code>Data\</code>, dump the database natively, and take <code>hMailServer.INI</code>, <code>Events\</code> and your DKIM keys.</li>
<li>Stop the old service for good and set it to Disabled. Anything it accepts after the backup is stranded.</li>
<li>Restore the data directory, the database and <code>hMailServer.INI</code>, in chapter 15's order.</li>
<li>Re-enter the protected secrets.</li>
<li>Keep the host name if you can. Update the A record with a lowered TTL, get a PTR on the new IP, re-run the firewall rules, repoint your port forwards, and run Utilities, Diagnostics last.</li>
</ol>
<p dir="auto">Leave the old machine powered off but intact for a week or two. It is the rollback.</p>
<p dir="auto"><strong>Budget for step 6.</strong> With <code>ProtectStoredSecretsWithDPAPI=1</code>, the default, stored passwords are encrypted with machine-scoped Windows DPAPI and cannot be decrypted on the new machine. Re-enter the database connection password with <code>Bin\DBSetup.exe</code>, then route, smart-host relayer and external-account passwords in the Control Panel. Forget this and you get a server that cannot reach its own database. Linux to Linux is easier: secrets sit under <code>&lt;DataFolder&gt;/.hmailserver-secret-key</code>, so copy that file too, preserving mode 0600 and its ownership.</p>
<h3><a class="anchor-offset" name="windows-to-linux-is-not-a-migration"></a>Windows to Linux is not a migration</h3>
<p dir="auto">It is not supported and the project does not claim it is. The schema is the same on both, 6.3.3 needs 6040 either way, and the message store's on-disk format is the same. What is missing is a tested path: nobody has run a Windows installation onto Linux and verified the result (<a href="https://www.progressiverobot.com/hmailserver-documentation/#3514-moving-from-windows" rel="nofollow ugc">§35.14</a>).</p>
<p dir="auto">What is known to break:</p>
<ul>
<li><strong>SQL Server.</strong> An INI with <code>Type=MSSQL</code> or <code>Type=MSSQLCE</code> is refused by name. Move to PostgreSQL or MySQL on Windows first.</li>
<li><strong>Every DPAPI secret.</strong> Route, fetch-account and per-domain relay passwords, private-key passphrases and the administrator's TOTP secret. Each is reported once as HM6414 and answers empty.</li>
<li><strong>Event scripts and COM integrations.</strong> Neither exists on Linux.</li>
<li><strong>DKIM key paths.</strong> The per-domain key-file setting holds a Windows path such as <code>C:\keys\mail.pem</code>, which resolves to nothing on Linux. Copy the keys and re-point every signing domain.</li>
<li><strong>Directory case.</strong> The Linux build lower-cases directory names derived from an address; Windows leaves them as found. A store carrying <code>Test.com</code> is one this server looks for under <code>test.com</code>, and everything under it must end up owned by <code>hmailserver</code>.</li>
</ul>
<p dir="auto">So treat it as a rebuild and a cutover. A new installation on Linux, accounts and mail brought over at mailbox level by mirroring folders over IMAP from the running Windows server. The Import Tool is not an option here: it is a Windows .NET program that drives the COM API, and Linux has neither (<a href="https://www.progressiverobot.com/hmailserver-documentation/#338-importing-accounts-and-mail-the-import-tool" rel="nofollow ugc">§33.8</a>), verified against a still-running Windows server, DNS moved last.</p>
]]></description><link>https://www.hmailserver.co.uk/topic/28194/moving-to-new-hardware-and-why-windows-to-linux-is-a-rebuild</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 04:11:41 GMT</lastBuildDate><atom:link href="https://www.hmailserver.co.uk/topic/28194.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Sep 2026 01:15:00 GMT</pubDate><ttl>60</ttl></channel></rss>