<?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[The hmailserver command line on Linux: every verb, who runs it, the files, the unit]]></title><description><![CDATA[<p dir="auto"><em>Written for 6.3.4. hMailServer 6.3.6 (6 October 2026) carries .deb and .rpm packages for x86-64 and AArch64, one for each of Debian 12 and 13, Ubuntu 24.04, Fedora 43 and 44, Enterprise Linux 9 and 10, and openSUSE Leap 16.0 and Tumbleweed, both AppImages and the first container image. Its commands say what they did on their own output rather than in the error log, and the store commands run as root refuse a data directory that another account could have linked into. See <a href="/topic/28276">the 6.3.6 announcement</a>. From 6.3.6 the root helper applies hMailServer 6.3.7 (17 October 2026), a security release, by the live update, for the generic <code>.deb</code> and <code>.rpm</code> of either architecture and both AppImages; a server from one of 6.3.6's per-distribution packages is offered the generic package, which <code>apt</code> refuses on Debian 12 and <code>dnf</code> on Enterprise Linux 9, and is upgraded with its package manager and its release's own package, and from 6.3.4 or 6.3.5 install 6.3.7 with <code>apt</code>, <code>dnf</code> or <code>zypper</code>, not by the live update. A server whose <code>UpdateSigningIdentity</code>, <code>UpdateSigningIssuer</code> and <code>UpdateSourceRepository</code> still name the path the project began at refuses 6.3.7 and 6.3.8 until <code>sudo hmailserver --set-setting &lt;name&gt;=</code> clears each of the three and the service is restarted. See <a href="/topic/28277">the 6.3.7 announcement</a>. From 6.3.6 or 6.3.7 the root helper applies hMailServer 6.3.8 (2 November 2026), a security release, by the live update in the same way; a server from one of 6.3.6's or 6.3.7's per-distribution packages is upgraded with its package manager and its release's own package, and from 6.3.4 or 6.3.5 install 6.3.8 with <code>apt</code>, <code>dnf</code> or <code>zypper</code> rather than by the live update, or turn the live update's apply off first with <code>systemctl disable --now hmailserver-update.path</code>. 6.3.8 names files in UTF-8 whatever <code>LANG</code> says: on a server that ran under a <code>LANG</code> that is not UTF-8, rename each file and folder named outside ASCII to its UTF-8 name before upgrading, for example with <code>convmv -f iso-8859-1 -t utf-8 -r --notest &lt;folder&gt;</code>. The values <code>--set-setting</code>, <code>--apply-profile</code>, <code>--account</code> and <code>--domain</code> take, and <code>--config</code>, are read as UTF-8 and refused with exit 2 when they are not. See <a href="/topic/28278">the 6.3.8 announcement</a>.</em></p>
<p dir="auto">On Linux the server is one executable, <code>/usr/bin/hmailserver</code>, and what cannot be done over the REST API, from creating the schema to rewriting the message store, is done with its own options. This topic lists every verb 6.3.4's documents name and who runs it, where the package puts its files, what the systemd unit lets the service touch, and how the root helper applies a live update. What a Linux server has and lacks is in <a href="/topic/28189">hMailServer on Linux</a>, the first install in <a href="/topic/28190">First install on Linux</a>. The one thing to know first: on a package installation <code>/etc/hmailserver/hMailServer.ini</code> is <code>0640 root:hmailserver</code>, and the service cannot write it.</p>
<h3><a class="anchor-offset" name="where-the-package-puts-things"></a>Where the package puts things</h3>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Path</th>
<th>What it is</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>/usr/bin/hmailserver</code></td>
<td>the server, one file</td>
</tr>
<tr>
<td><code>/usr/bin/tlds.txt</code>, <code>/usr/bin/dh2048.pem</code></td>
<td>read from beside the binary; the second is required by every TLS context</td>
</tr>
<tr>
<td><code>/usr/share/hmailserver/DBScripts/*.sql</code></td>
<td>the schema creation and upgrade scripts</td>
</tr>
<tr>
<td><code>/usr/lib/systemd/system/hmailserver.service</code></td>
<td>the unit</td>
</tr>
<tr>
<td><code>/etc/hmailserver/hMailServer.ini</code></td>
<td>the configuration, a conffile an upgrade never overwrites; since 6.3.4 its <code>[Settings]</code> section is a copy of the database</td>
</tr>
<tr>
<td><code>/usr/bin/hmctl</code></td>
<td>since 6.3.4, the command-line client over the REST API</td>
</tr>
<tr>
<td><code>/etc/logrotate.d/hmailserver</code></td>
<td>the log rotation rule</td>
</tr>
<tr>
<td><code>/etc/fail2ban/filter.d/hmailserver.conf</code>, <code>/etc/fail2ban/jail.d/hmailserver.conf</code></td>
<td>the fail2ban filter and jail, the jail disabled as shipped</td>
</tr>
<tr>
<td><code>/usr/lib/hmailserver/hmailserver-update</code>, <code>/usr/lib/hmailserver/autoban-hook</code></td>
<td>the root update helper (since 6.3.4) and the firewall hook</td>
</tr>
<tr>
<td><code>/var/lib/hmailserver</code>, with <code>temp</code>, <code>events</code> and <code>database</code> under it</td>
<td>the mail store, one directory per domain and one per mailbox; scratch space; event scripts</td>
</tr>
<tr>
<td><code>/var/log/hmailserver</code></td>
<td>the logs</td>
</tr>
</tbody>
</table>
<p dir="auto"><strong>What the maintainer scripts do.</strong> They create the <code>hmailserver</code> system user and group, and the last two rows above, all <code>0750 hmailserver:hmailserver</code>; install the configuration; and enable <code>hmailserver.service</code> without starting it, on purpose, because there is no database yet. On an upgrade they run <code>hmailserver --upgrade-database</code> as the service user, only if a database is configured, then <code>try-restart</code> the service if it was running. On removal they stop and disable, and leave the mail store and the logs alone; a <code>.deb</code> purge removes the configuration as well, and <code>/etc/hmailserver</code> with it when nothing else is in it, and still leaves the store.</p>
<p dir="auto"><strong>Which packages exist.</strong> 6.3.4 carries two x86-64 packages, <code>hmailserver_6.3.4_amd64.deb</code> and <code>hmailserver-6.3.4-1.x86_64.rpm</code>, and no container image of 6.3.4 is published. The <code>.deb</code> installs on Ubuntu 26.04 and 24.04, not on Debian 12; the <code>.rpm</code> on Fedora 43 and 44 and Enterprise Linux 10, not on Enterprise Linux 9; the rest of the platform picture is in <a href="/topic/28189">hMailServer on Linux</a>. The packages carry no Sigstore bundle, so no live update installs them: 6.3.4 is installed by hand (<a href="/topic/28193">Upgrading to 6.3.4</a>).</p>
<h3><a class="anchor-offset" name="who-runs-what"></a>Who runs what</h3>
<p dir="auto"><strong>As root (<code>sudo</code>), because the file is root's:</strong> <code>--set-admin-password</code>, <code>--set-setting</code>, and the four stored-secrets verbs. All but the export write <code>/etc/hmailserver/hMailServer.ini</code>, and the export a new file of its own (below); <code>--set-setting</code> keeps the file's owner and mode.</p>
<p dir="auto"><strong>As the service user (<code>sudo -u hmailserver</code>), because the verb opens the database or writes the data directory:</strong> the rest, from <code>--create-database</code> to the store walks. <code>--apply-new-install-defaults</code> refuses to run as root (exit 2), whose certificate key the service could not read, and <code>--sample-domain</code> run as root leaves today's log owned by root.</p>
<p dir="auto">Two things follow from the file being root's. The running server cannot write its copy of a stored value back into <code>[Settings]</code>: a value stored over the API is in effect and the file's line goes stale, which the server says once a start in the application log, not as an error. The stale line is never taken for an edit, so nothing needs changing by hand; only what reads the file itself, such as a server that cannot read its table, sees the older value (<a href="/topic/28222">how the settings store works</a>). The exception is a <code>[Settings]</code> secret sealed once the stored-secrets key exists (below): its line cannot be rewritten, and <code>HM5803</code> names it at each start until <code>sudo hmailserver --set-setting &lt;name&gt;</code> writes it. And a server that verifies an older MD5 or SHA-256 administrator password hash cannot write it again as PBKDF2: it says so once a process (<code>HM7494</code>), and <code>sudo hmailserver --set-admin-password</code> does it.</p>
<h3><a class="anchor-offset" name="every-verb"></a>Every verb</h3>
<p dir="auto">Every row from <code>--check-database</code> to the stored-secrets verbs is new since 6.3.4.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Verb</th>
<th>Runs as</th>
<th>What it does</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--config &lt;file&gt;</code></td>
<td></td>
<td>The configuration to read. Default: <code>hMailServer.ini</code> beside the executable, then <code>/etc/hmailserver/hMailServer.ini</code></td>
</tr>
<tr>
<td><code>--foreground</code></td>
<td>the unit</td>
<td>Run in the foreground and log to standard error as well as the log directory. It is the default</td>
</tr>
<tr>
<td><code>--check-config</code></td>
<td>service user</td>
<td>Print the configuration path, the directories and the database type, and exit without opening a listener or the database. <code>Database type: 0</code> means the <code>Type</code> key did not take</td>
</tr>
<tr>
<td><code>--set-admin-password</code></td>
<td>root</td>
<td>Read a new administrator password from standard input with echo off, hash it with PBKDF2, and write it to the file</td>
</tr>
<tr>
<td><code>--create-database</code></td>
<td>service user</td>
<td>Create the database <code>[Database]</code> names, or use an existing empty one, and run the create script for its type. Refuses SQL Server and SQL Server Compact by name. Since 6.3.4, says the wiki's Installing on Linux, a database that holds this build's schema or an older one is left as it is with exit 0, and a newer one exits 1; 6.3.3 refused any database that held a schema. The documentation page (35.4, 35.7) still says a schema is refused, exit 1: test it on a scratch database first</td>
</tr>
<tr>
<td><code>--upgrade-database</code></td>
<td>service user</td>
<td>Run every upgrade script from the database's version to this build's, in order. Refuses a database from a newer build; stops rather than loops if a script runs and the version does not move. Safe to run by hand</td>
</tr>
<tr>
<td><code>--check-database</code></td>
<td>service user</td>
<td>Connect once with <code>TlsMode</code> and <code>TlsCaFile</code>, say whether the connection is encrypted and the certificate checked: exit 0 connected, 1 not, 2 not configured. Changes nothing, and runs beside a running service</td>
</tr>
<tr>
<td><code>--set-setting NAME=VALUE</code>, <code>--set-setting NAME</code></td>
<td>root</td>
<td>Store one <code>[Settings]</code> value in the database and write the server's copy into the file (below)</td>
</tr>
<tr>
<td><code>--apply-environment</code></td>
<td>service user</td>
<td>Store every setting the environment names (<code>HM_SETTING_&lt;key&gt;</code>, <code>HM_PROPERTY_&lt;name&gt;</code>, their <code>_FILE</code> forms, the container's <code>HM_REST_*</code>), each checked first: exit 1, with nothing stored, if one is refused. It writes the file's copy too, so the file must be writable, as the container's is; where it is not, as for the service user on a package installation, the verb refuses before it stores anything. <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/EnvironmentConfiguration.md" rel="nofollow ugc">EnvironmentConfiguration.md</a> says it has been run on Windows only, and on Linux compiled but not run: try it on a scratch database first</td>
</tr>
<tr>
<td><code>--apply-profile NAME [--confirm] [--once] [--if-new]</code>, <code>--revert-profile</code></td>
<td>service user, server stopped</td>
<td>Apply one of the four setting profiles (<code>office</code>, <code>gateway</code>, <code>relay</code>, <code>sender</code>; <code>none</code> records that none is wanted), or put back what the last one changed. Exit 3 means an entry needs <code>--confirm</code>, 5 that <code>--if-new</code> found ten accounts or more. On Windows the verb refuses while the service runs (exit 4); <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/Profiles.md" rel="nofollow ugc">Profiles.md</a> says that on Linux nothing tells it whether a server runs, and that the POSIX verbs have been written and read, and not run: try them on a scratch database first</td>
</tr>
<tr>
<td><code>--apply-new-install-defaults [--if-marked [&lt;file&gt;]]</code></td>
<td>service user, server stopped</td>
<td>The secure defaults of a new installation (below). Exit 0 applied, 1 something could not be written (<code>HM7510</code>, <code>HM7511</code>), 2 no database or run as root, 5 not a database this installation created, or not as the create script left it</td>
</tr>
<tr>
<td><code>--sample-domain create</code>, <code>--sample-domain remove</code></td>
<td>service user</td>
<td>Make or remove the throwaway <code>example.test</code>. Exit 0 done, 2 refused, 1 failed. Remove it before the server takes real mail</td>
</tr>
<tr>
<td><code>--measure-store</code></td>
<td>service user</td>
<td>What compressing the store and holding its large parts once would save. Changes nothing, and runs beside a running server</td>
</tr>
<tr>
<td><code>--compress-store [--decompress]</code>, <code>--recount-store</code></td>
<td>service user, server stopped</td>
<td>Rewrite the store in place, or back to plain RFC 822; recount the parts held once. Refused while the server runs (exit 4): on Linux the server holds a lock in the log directory for as long as it runs</td>
</tr>
<tr>
<td><code>--encrypt-store</code>, <code>--decrypt-store</code></td>
<td>service user, server stopped</td>
<td>Encrypt what a mailbox encrypted at rest stored before it was switched on, or put it back. <code>--decrypt-store</code> reads the domain's recovery passphrase from <code>HMAILSERVER_RECOVERY_PASSPHRASE</code>, never from the command line</td>
</tr>
<tr>
<td><code>--copy-store-to-object-storage</code>, <code>--copy-store-from-object-storage</code></td>
<td>service user</td>
<td>Copy the message store into the object store the settings name, or back, each file verified and a stopped run resumed. They run beside the server; <code>--remove-source</code> removes what was copied from once its copy is verified, and only with the server stopped (exit 4 beside it)</td>
</tr>
<tr>
<td><code>--verify-update &lt;file&gt;</code></td>
<td></td>
<td>Check a downloaded package or AppImage against the Sigstore bundle beside it; exit 0 when a signer the server trusts made it</td>
</tr>
<tr>
<td><code>--create-stored-secrets-key</code>, <code>--export-stored-secrets-key &lt;file&gt;</code>, <code>--import-stored-secrets-key &lt;file&gt;</code>, <code>--forget-sealed-secrets &lt;key id&gt;</code></td>
<td>root</td>
<td>Make the stored-secrets key, export it, import it on another node, or, with the server stopped (exit 4 beside it), clear what was sealed under a key lost for good (below)</td>
</tr>
<tr>
<td><code>--version</code>, <code>--help</code></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p dir="auto"><code>--measure-store</code>, <code>--compress-store</code>, <code>--encrypt-store</code>, <code>--decrypt-store</code> and the two copies take <code>--account &lt;address&gt;</code> for one mailbox or <code>--domain &lt;name&gt;</code> for one domain's, and neither for the whole store; <code>--decrypt-store</code> needs one of the two.</p>
<p dir="auto"><strong>Signals.</strong> <code>SIGTERM</code> and <code>SIGINT</code> stop the server. <code>SIGHUP</code>, which <code>systemctl reload hmailserver</code> sends, re-reads the configuration; it stops and restarts the listeners inside the running process, so do it when nothing is mid-delivery. Since 6.3.4 the server drains before it stops: the mail listeners close at the socket, so senders retry, and <code>ShutdownDrainSeconds</code> lets what is in flight finish. At its default of 0 nothing is waited for, and a session mid-DATA at the moment of the stop is cut: set it on a production server, where <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/Upgrading.md" rel="nofollow ugc">Upgrading.md</a> calls 30 a reasonable figure.</p>
<h3><a class="anchor-offset" name="code-set-setting-code-the-way-in-before-the-api-exists-since-6.3.4"></a><code>--set-setting</code>: the way in before the API exists (since 6.3.4)</h3>
<p dir="auto">From schema 6042 the database is the settings store. Every <code>[Settings]</code> key the file holds at the server's first start is taken into the database then, the packaged <code>RestApiPort=0</code> among them. Afterwards a line edited in the file is reported in the error log as <code>HM5804</code> and the stored value is used, so an edit to the file brings no listener up, and with the listener off nothing that speaks the API can change it either.</p>
<pre><code class="language-sh">sudo hmailserver --set-setting RestApiPort=8045
sudo hmailserver --set-setting RestApiBindAddress=127.0.0.1
sudo systemctl restart hmailserver
</code></pre>
<p dir="auto">The verb stores the value as the REST API does and prints what it stored. It refuses a name the server's settings loader does not read, a whole number that is not one, a port that is not 0 to 65535, and a <code>RestApiBindAddress</code> that is not an IP address or <code>localhost</code>: the checks <code>--apply-environment</code> makes, in the same words. A secret's value is refused on the command line, where the shell's history, the process list and sudo's log would keep it. Give the name alone, <code>sudo hmailserver --set-setting SRSSecret</code>, and type the value at a prompt that does not echo it, or pipe it in.</p>
<p dir="auto">Which sections and keys stay in the file rather than the database, and the file's <code>[SettingsOverride]</code> section, which forces a value over the stored one (<code>HM5807</code>, <code>HM5808</code>), are in <a href="/topic/28222">Settings: what is not stock, when a save takes effect</a>.</p>
<h3><a class="anchor-offset" name="the-stored-secrets-key-on-linux-since-6.3.4"></a>The stored-secrets key on Linux (since 6.3.4)</h3>
<p dir="auto">A Linux server has two secret stores. The <strong>machine's</strong> is the key file <code>&lt;DataFolder&gt;/.hmailserver-secret-key</code>, mode 0600, made by the server on first use: the database password in the configuration and the route and fetch-account passwords are kept under it as <code>LINUX1:</code> envelopes. It travels with the data directory. A secret moved to a machine without it cannot be opened (<code>HM6414</code>), and there is no re-keying command: replacing the file means re-entering every stored password. The <strong>installation's</strong> is the stored-secrets key, <code>[Security] StoredSecretsKey</code>, under which each account's TOTP second factor and the <code>[Settings]</code> secrets are sealed in the database as <code>HMK1:</code> envelopes, so that every node sharing the database can open them.</p>
<p dir="auto"><strong>The service never makes it.</strong> On a package installation <code>--create-database</code> runs as the service user, cannot write the root-owned file, makes no key and says what to run instead. An upgrade makes none. Until a key exists those secrets are kept as written, and the setup checklist's <code>stored_secrets_key</code> item offers the step. Make the key, export it and restart the service; nothing is sealed until that restart:</p>
<pre><code class="language-sh">sudo hmailserver --create-stored-secrets-key
sudo hmailserver --export-stored-secrets-key /root/hmailserver-stored-secrets.key
sudo systemctl restart hmailserver
</code></pre>
<p dir="auto">Keep the exported file with the database backups, apart from them: a database dump restored without it brings back every second factor and <code>[Settings]</code> secret unopenable. Carrying the key to a standby with <code>--import-stored-secrets-key</code>, what a node without it says (<code>HM7495</code>) and <code>--forget-sealed-secrets</code> for a key lost for good are in <a href="/topic/28241">Hardening a public mail server</a>.</p>
<h3><a class="anchor-offset" name="the-unit-and-what-it-lets-the-service-touch"></a>The unit, and what it lets the service touch</h3>
<p dir="auto">The packaged unit runs the server with <code>--foreground</code> as <code>hmailserver</code>, and before every start:</p>
<pre><code class="language-ini">ExecStartPre=-/usr/bin/hmailserver --apply-new-install-defaults --if-marked
TimeoutStartSec=300
</code></pre>
<p dir="auto">The unit's hardening: <code>ProtectSystem=strict</code>, which leaves <code>/etc</code> read-only to the service; <code>/usr</code> read-only, which with the single capability below is why the service can neither run the package manager nor stop itself; <code>ProtectHome=yes</code>, which hides <code>/home</code>; <code>ReadWritePaths</code> of <code>/var/lib/hmailserver</code> and <code>/var/log/hmailserver</code>; <code>RuntimeDirectory=hmailserver</code>, which is <code>/run/hmailserver</code>; and one capability, <code>CAP_NET_BIND_SERVICE</code>, which binds the mail ports. <code>CAP_NET_ADMIN</code> is deliberately not granted, so the firewall hook behind <code>AutoBanFirewall</code> cannot act until a drop-in (<code>systemctl edit hmailserver</code>) adds it to <code>AmbientCapabilities</code> and <code>CapabilityBoundingSet</code>; <code>sudo -u hmailserver /usr/lib/hmailserver/autoban-hook check</code> says whether it can. A <code>DataFolder</code> outside <code>ReadWritePaths</code> needs a drop-in too, before the first start:</p>
<pre><code class="language-sh">sudo systemctl edit hmailserver
# [Service]
# ReadWritePaths=/srv/mail
</code></pre>
<p dir="auto">A memory-safety fault is recorded in one line of <code>/var/log/hmailserver/crash-oracle.log</code>; core dumps are off by default.</p>
<p dir="auto"><strong>The first start secures a new installation.</strong> On a database <code>--create-database</code> made, the <code>ExecStartPre</code> line gives the server a self-signed certificate, STARTTLS on 25, 587, 110 and 143, and TLS required for authentication on the <em>Internet</em> IP range; mail clients warn about the certificate until ACME (<a href="/topic/28187">Let's Encrypt certificates</a>) or your own replaces it. It acts only on a database marked within a day of its clock and still as the create script left it; an older mark is kept for a run by hand, <code>sudo -u hmailserver hmailserver --apply-new-install-defaults</code> with the server stopped, and an upgraded or attached database is never changed. The mark, the certificate and the checklist item that follows up are in <a href="/topic/28241">Hardening a public mail server</a>.</p>
<h3><a class="anchor-offset" name="the-root-helper-code-hmailserver-update-code-since-6.3.4"></a>The root helper <code>hmailserver-update</code> (since 6.3.4)</h3>
<p dir="auto">A live update is applied outside the server's unit. The server writes a one-file request into <code>/run/hmailserver</code>; <code>hmailserver-update.path</code>, a root path unit the package enables, takes it and runs <code>/usr/lib/hmailserver/hmailserver-update</code>, a shell script readable end to end. The script:</p>
<ul>
<li>checks every line of the request against root's own configuration;</li>
<li>verifies the package, and the rollback image, again as root against their Sigstore bundles, with <code>hmailserver --verify-update</code>: the check the server made, made by a process the server could not have influenced;</li>
<li>refuses anything that is not a genuine upgrade: the package's own version is compared with what <code>dpkg</code> or <code>rpm</code> says is installed, so a signed but superseded release cannot be put back;</li>
<li>stops the unit, installs with <code>apt-get</code>/<code>dpkg</code> or <code>dnf</code>/<code>rpm</code>, starts the unit, and waits for the server to stay up, and for <code>/readyz</code> when the metrics listener is on;</li>
<li>reinstalls the previous version if it does not, and writes one line to <code>&lt;DataFolder&gt;/Updates/last-apply.txt</code>, which the server reports at its next check and the Control Deck shows.</li>
</ul>
<p dir="auto">A refused request is explained in <code>journalctl -u hmailserver-update</code> and nowhere else, on purpose.</p>
<pre><code class="language-sh">sudo /usr/lib/hmailserver/hmailserver-update check
</code></pre>
<p dir="auto">names the installer it would use, whether the path unit is active and whether the running unit has the runtime directory the request needs. The Debian and RPM packages enable and start the path unit; Arch does not enable units from a package, so there <code>sudo systemctl enable --now hmailserver-update.path</code> is yours to run. Nothing happens unless the update check is on and the install is asked for, from the Control Deck or over the API, and only for a release signed by a signer the server trusts, which 6.3.4 is not.</p>
<h3><a class="anchor-offset" name="code-hmctl-code-and-the-powershell-module"></a><code>hmctl</code> and the PowerShell module</h3>
<p dir="auto">The other command line is <code>hmctl</code> (<code>/usr/bin/hmctl</code>, one Python 3 file), with the <code>HmailServer</code> PowerShell module beside it in the repository. Both speak the REST API, so both administer a Windows or a Linux server, here or on another machine. They cannot turn the REST listener on, set the administrator password, or make or carry the stored-secrets key. They have a topic of their own: <a href="/topic/28265">hmctl and the PowerShell module</a>.</p>
<h3><a class="anchor-offset" name="logs-and-the-journal"></a>Logs and the journal</h3>
<p dir="auto">The server's own logs are in <code>/var/log/hmailserver</code>. The journal (<code>journalctl -u hmailserver -f</code>) carries the startup line, standard error and the operational events: <code>WindowsEventLogEnabled=1</code> is a Windows inheritance in name only, and on Linux means syslog. The logrotate rule uses <code>copytruncate</code>, because the server does not reopen its log on a signal.</p>
<h3><a class="anchor-offset" name="where-to-read-more"></a>Where to read more</h3>
<ul>
<li>On the wiki: <a href="https://gitlab.com/hmailserver/hmailserver/-/wikis/Installing-on-Linux" rel="nofollow ugc">Installing on Linux</a>, and <a href="https://gitlab.com/hmailserver/hmailserver/-/wikis/Command-Line" rel="nofollow ugc">Command Line</a> for <code>hmctl</code>.</li>
<li><a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/CommandLine.md" rel="nofollow ugc">CommandLine.md</a>, <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/SecretsAtRest.md" rel="nofollow ugc">SecretsAtRest.md</a>, <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/SecureDefaults.md" rel="nofollow ugc">SecureDefaults.md</a>, <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/Profiles.md" rel="nofollow ugc">Profiles.md</a> and <a href="https://gitlab.com/hmailserver/hmailserver/-/blob/v6.3.4/hmailserver/docs/MessageStore.md" rel="nofollow ugc">MessageStore.md</a>.</li>
<li>The documentation page: <a href="https://www.progressiverobot.com/hmailserver-documentation/#352-supported-platforms-and-packages" rel="nofollow ugc">35.2 Supported platforms and packages</a>, <a href="https://www.progressiverobot.com/hmailserver-documentation/#357-command-line-reference" rel="nofollow ugc">35.7 Command-line reference</a>, which lists none of the verbs new in 6.3.4, and <a href="https://www.progressiverobot.com/hmailserver-documentation/#358-the-systemd-service" rel="nofollow ugc">35.8 The systemd service</a>.</li>
<li>On this forum: <a href="/topic/28189">hMailServer on Linux</a>, <a href="/topic/28190">First install on Linux</a>, <a href="/topic/28193">Upgrading to 6.3.4</a> and <a href="/topic/28192">The Control Deck</a>; <a href="/topic/28247">Databases on Linux</a> for <code>--create-database</code> and the schema upgrade; <a href="/topic/28234">the update check and the live update</a> for what the root helper is asked to apply; and <a href="/topic/28233">message storage</a> for what the store verbs change.</li>
</ul>
]]></description><link>https://www.hmailserver.co.uk/topic/28245/the-hmailserver-command-line-on-linux-every-verb-who-runs-it-the-files-the-unit</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 09:05:51 GMT</lastBuildDate><atom:link href="https://www.hmailserver.co.uk/topic/28245.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Sep 2026 19:27:13 GMT</pubDate><ttl>60</ttl></channel></rss>