First install on Linux: the order of operations, Debian to openSUSE
-
The order matters more than the commands. The package installs the server enabled and stopped, on purpose: it has no database yet, and nothing in a package can know which backend you have or its credentials. The full sequence, with the output each step prints, is §35.3. Take the exact file names from the downloads page, and note the RPM carries a
-1release field in its name.1. Install the package.
sudo apt install ./<file>.debon Debian and Ubuntu,sudo dnf install ./<file>.rpmon Fedora, RHEL and openSUSE. The maintainer script creates thehmailserversystem user and group, creates the directories, and enables the unit without starting it. It deliberately does not walk or chown an existing store.2. If your backend is MySQL or MariaDB, install the client library now. The server opens it at run time and no package manager will pull it in:
libmariadb3on Debian and Ubuntu,mariadb-connector-con Fedora and RHEL,mariadb-libson Arch. PostgreSQL needs nothing extra.3. Create the database role. Either let the role create its own database, or create an empty one yourself and leave the role without CREATEDB. §35.4 has both, and the SSL keys for a database on another host.
4. Edit
/etc/hmailserver/hMailServer.ini. Fill in[Database]. Two rules catch people. Only;starts a comment, and only at the start of a line. Text after a value on the same line is part of the value, soType=PostgreSQL ; the backendmatches no backend name. Write the port out: PostgreSQL wants 5432, MySQL and MariaDB want 3306. LeaveAdministratorPasswordalone.5. Set the administrator password.
sudo hmailserver --set-admin-passwordreads it from standard input with echo off and writes the hash into the file. This is the one step that runs as root, because the file is0640 root:hmailserver.6. Create the schema.
sudo -u hmailserver hmailserver --create-database.7. Check it before starting anything.
sudo -u hmailserver hmailserver --check-config, as the service user and without--config, so the server has to find the configuration on its own.Database type: 0means theTypekey did not take. It is a report and not a validator: it returns 0 unconditionally, so read the output rather than its exit status.8. Start it.
sudo systemctl start hmailserver, thenjournalctl -u hmailserver -f.A freshly created database already holds four listeners: SMTP on 25 and 587, POP3 on 110 and IMAP on 143, bound to every address with connection security set to none. Those are database rows, not INI keys, so you change them over the API or the Control Deck's Ports view before this faces the internet.
9. Turn on administration. Set
RestApiPort, leaveRestApiBindAddresson loopback, and reload. TLS is required unless the bind address is exactly127.0.0.1,localhostor::1, so tunnel over SSH rather than exposing it. §35.9 and §35.10 are the rest.Post what
--check-configprinted and the last lines ofjournalctl -u hmailserverif a step stops. §35.16 lists the Linux-specific failures by symptom.
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