5.1. Installation¶
The Halon programs are installed using a Linux distribution package manager
according to the corresponding instructions, or by manually copying the files to the
/opt/halon
directory.
In preparation; if you have another MTA running on the same host (eg. Exim, Sendmail or Postfix), you should in most installations stop it. To stop Postfix for example:
$ systemctl disable postfix
$ systemctl stop postfix
5.1.1. Ubuntu¶
To install the .deb package use the following commands. The dpkg command will install the halon package and the apt-get will install all dependencies.
$ apt-get update
$ dpkg -i /path/to/halon.deb
$ apt-get install -f
5.1.2. CentOS¶
To install the .rpm package use the following commands.
$ yum install -y epel-release
$ yum install -y /path/to/halon.rpm
The default configuration allows users in the staff group to manage the MTA
$ sudo groupadd staff
5.2. Configuration¶
Each program has a small startup configuration,
which contains settings such as
control socket paths and user privilege drop. Most importantly,
they point at the running configuration load path via environment.appconf
.
The default startup configuration files in /opt/halon/share/examples can normally be used.
The running configuration contains the bulk of the configuration data,
including all the Halon script.
To quickly get started, follow the steps below.
$ mkdir -p test/dist
$ cd test
$ cp -r /opt/halon/share/examples src
$ halonconfig
$ sudo cp dist/* /etc/halon/
- The default configuration in /opt/halon/share/examples is copied to a working directory
- The
halonconfig
script prepares the configuration files- It validates the configuration files in src/config against the JSON schemas
- It “packs” the script in src/hooks and src/files into the smtpd-app.yaml running configuration
- It writes the result to the dist directory
- The prepared configuration is copied from dist/ to /etc/halon/
When the initial configuration is in place, the programs can be enabled on system boot and started with:
$ sudo systemctl enable halon.service
$ sudo systemctl start halon
The default configuration allows you to relay email on port 587 from localhost, so you can send a test email using for example swaks:
$ swaks --server 127.0.0.1 --port 587 --to [email protected]