3. Configuration

The configuration consists of files in YAML format on disk. The package comes with multiple example configurations in /opt/halon/share/examples.

The YAML configuration files can be edited directly, and validated against the JSON schemas using the halonconfig script. The schemas can be browsed using a tool like Bovet’s docson. They are also included in our Visual Studio Code integration, which provides validation, autocomplete and hover support when editing them.

The YAML configuration allows for byte format and time format syntax in a lot of places. For example time such as servers[].timeout.idle may be specified in the format of ?d?h?m?s. Size fields such as servers[].phases.data.maxsize may be specified in the format of ?(TiB|GiB|MiB|KiB|B).

The running configuration contains the bulk of the configuration data, including all the Halon script. It can be softly reloaded and deployed in a blue-green fashion using per-connection conditions, using the control sockets, API, command line interface or web administration. The default startup configuration loads the running configuration from /etc/halon/smtpd-app.yaml as per the environment.appconf directive.