3. History logging configuration
The history logging configuration controls the integration with Elasticsearch and the MTA, this enables users to for example release messages from quarantine and interact with the Halon queue directly.
3.1. Minimal configuration
Just like for the main configuration, the file in /opt/halon/msui/share/examples/ can be used as a baseline. To activate the history logging you need to first:
Set up History logging in Halon.
Specify the Elasticsearch settings in
msui.yaml
.Copy one of the following files to
/etc/halon/
.For transactions logging
$ cp /opt/halon/msui/share/examples/msui-history-transactions.yaml /etc/halon/msui-history.yaml
For delivery attempts logging
$ cp /opt/halon/msui/share/examples/msui-history-delivery-attempts.yaml /etc/halon/msui-history.yaml
Set the MTA settings (required for MTA interaction such as releasing and previewing messages).
3.1.1. Elasticsearch configuration
Add the fields to the /etc/halon/msui.yaml
configuration file.
servers:
- [...]
history:
elasticsearch:
index: 'halon-transactions-*'
nodes:
- url: https://elasticsearch:9200
auth:
username: elastic
password: badpassword
3.1.2. MTA configuration
Add the fields to the /etc/halon/msui.yaml
configuration file.
servers:
- [...]
history:
mta:
nodes:
- id: "hostname"
url: http://smtpd:8080
apikey: badsecret
auth:
username: admin
password: admin
3.2. Additional settings
3.2.1. Elasticsearch directives
- servers[].history.elasticsearch
The settings for Elasticsearch.
- servers[].history.elasticsearch.index
The index pattern for all Elasticsearch queries.
- servers[].history.elasticsearch.nodes[]
A list of Elasticsearch nodes.
- servers[].history.elasticsearch.nodes[].url
The Elasticsearch URL to connect to.
- servers[].history.elasticsearch.auth
Specify any credentials for authentication.
- servers[].history.elasticsearch.auth.username
The username for basic authentication.
- servers[].history.elasticsearch.auth.password
The password for basic authentication.
3.2.2. MTA directives
- servers[].history.mta
The Halon API connection settings.
- servers[].history.mta.nodes[]
List of Halon nodes.
- servers[].history.mta.nodes[].id
A unique identifier that will be used to locate where the email is located (e.g. hostname).
- servers[].history.mta.nodes[].url
The URL to Halon API.
- servers[].history.mta.nodes[].apikey
A secret key for authentication.
- servers[].history.mta.nodes[].auth
API credentials.
- servers[].history.mta.nodes[].auth.username
The username for basic authentication.
- servers[].history.mta.nodes[].auth.password
The password for basic authentication.
- servers[].history.mta.nodes[].tls
TLS settings.
- servers[].history.mta.nodes[].tls.rejectUnauthorized
Reject self-signed or invalid certficates.
3.2.3. Digest reports directives
- servers[].app.digestreport
Digest reports settings.
- servers[].app.digestreport.enabled
Enable or disable digestreports. Required.
- servers[].app.digestreport.secret
The password for digest report.
- servers[].app.digestreport.smtp
SMTP server address to relay emails to. Required.
- servers[].app.digestreport.smtp.host
The host for digest report. Required.
- servers[].app.digestreport.smtp.port
The port used for digest reports.
- servers[].app.digestreport.smtp.tls
Enable or disable TLS for digest reports.
- servers[].app.digestreport.smtp.auth
Enable or disable SMTP authentication for digest reports.
- servers[].app.digestreport.smtp.sender
The sender for SMTP.
- servers[].app.digestreport.smtp.recipient
Debug mode. This setting will send all digest reports to the same recipient.