Preparation
Hardware requirements
XCC and the MTAs are provided as images in the OVF format. Our Sizing Guide will help you determine the right configuration for the resulting VMs. Download credentials can be requested via email.Network requirements
Prepare your firewall and/or proxy such that the connections described in xorlab Network Guide are supported.Unfiltered DNSMake sure your DNS service for xorlab is unfiltered. Otherwise, xorlab requests for malicious domains/IPs will not be answered and processed messages will be stuck in a queue because of DNS timeouts.
Register required DNS records
-
Register DNS A records for the XCC and MTA VMs with your internal DNS server(s). For XCC, you can also use a CNAME record instead of an A record. For the MTA VMs, A records are required; see also RFC 2181. The table below shows an example setup for example.com:
-
Add an MX record for every MTA in your setup. Use the same priority for all MTAs to achieve automatic load-balancing. In our example, we use
mx.example.comand the DNS query result is:
Prepare the VMs
- Download the XCC and MTA images (OVF format). The link and credentials will be provided by us.
- Decompress the zip files and instantiate the XCC and MTA virtual machines using your Hypervisor.
Setup
Configure the network
The XCC and MTA VM images have DHCP configured on all network interfaces, which names matchen*.
If your environment requires static addresses, proceed with the steps below:
-
Open a shell on the VM using your hypervisor, log in and open the
/etc/netplan/00-xorlab-config.yamlfile with elevated privileges (sudo). Comment the dynamic configuration out, uncomment the static configuration, and set the appropriate values. In this example, for theens192interface, the config file should look like this: -
In case you want to add a second interface (or more) to your VM, you need to add a configuration for each:
Static IP configuration example for more interfaces
nameserversblock can have eithersearchoraddresses, or both defined. -
Apply the configuration by executing
sudo netplan apply. - Restart all docker containers.
Connect via SSH
All our virtual machines are running Ubuntu Linux. The OS comes with a pre-configured admin account. Use the credentials provided to you by xorlab to open an SSH connection.Resize the disk
Now, resize the disks of the VMs so that they meet the requirements from the Sizing Guide:- Configure your hypervisor to provide the correct amount of storage to the VMs. This step is not described any further here since it depends on your hypervisor.
- Execute the following steps on every xorlab VM (XCC and MTAs)
-
Run
lsblkto show the current structure of the disks and partitions. -
Run
sudo fdisk /dev/<disk>- replace<disk>with the desired disk as shown before. Then follow the highlighted instructions below. The partition number might be different.fdiskNo changes will be written to the disk before you execute thewcommand. You can accept the defaults by pressing the Enter key. -
Resize the file system with:
-
Verify that the partition has the correct size with
df -h.
Run the Setup Script
xorlab-setup will first determine the VM type it’s running on.
- Connect to the XCC VM via SSH and run
xorlab-setup. - Connect to the MTA VM via SSH and run
xorlab-setup.
/var/log/xorlab/host/host_bootstrap.log.
When you invoke it without arguments, it offers to update to the newest wrapper-managed setup script version before starting the interactive set-up. Direct invocation with arguments such as --help, --restart-services, or --reachability-test omits the update prompt and forwards the arguments directly to the local role-specific script.
Here you can find more information about the script:
- Script Breakdown: Step-by-step instruction on what the script does. Use this in case you need to manually apply certain steps.
- Script Coverage Overview: Overview of all config files changed by the script.
- Script Usage: Save and re-use inputs to the setup script.
EHLO configuration
Set the hostnames used by the MTAs for theEHLO when the SMTP connection is established. For every xorlab MTA, you will see one main.cf.vmx.<id> file: main.cf.vmx.1 will be applied on MTA 1, main.cf.vmx.2 on MTA 2, and so on. If there is only one MTA, you will only find the main.cf file.
- Open Expert Editor.
- Navigate to the
activeguard/mta/startup_cfg/postfix_custom/. - Edit each
main.cf*file and set themyhostnameparameter to the hostname that points to this MTA in your DNS (A record).
activeguard/mta/startup_cfg/postfix_custom/main.cf file should look like this:
main.cf
main.cf* changes become active within about one minute.
Set local NTP servers
xorlab uses the time provided by the OS. In order to configure the OS settings set theNTP line in /etc/systemd/timesyncd.conf:
Configure performance resources
This is informational only: The VMs are normally already pre-configured according to your expected email load. However if you expect that your load is different from the ordered VM, adjust the performance configuration according to VM Resource Configuration.Optional settings
Add host mapping for XCC
This is only required if the MTAs cannot resolve the domain of the XCC via DNS:- SSH connect to each MTA
- Edit
/etc/hosts, e.g.sudo nano /etc/hosts - Add a line with the IP and domain of the XCC:
hosts
Change Docker IP range
This is only required if your local network uses the172.16.0.0/12 IP address range. As xorlab uses the same IP range internally, this can lead to routing problems.
Follow these instructions to change the xorlab internal Docker network. This must be done for every xorlab VM (MTA and XCC).
-
To verify that xorlab actually uses 172.16.0.0/12 internally, you can execute
ip ron the command line. The output usually looks like this: -
Open the
daemon.jsonfile:daemon.json -
Specify the new IP range that xorlab should use internally. You have to set a subnet for
bipand a different one fordefault-address-pools. Make sure you don’t use those subnets in your network. More information can be found on the official Docker documentation: Networking overview and dockerd. -
To activate the changes, stop all running containers by executing
docker compose downin the following directories:- MTA:
/etc/xorlab/activeguard, and/etc/xorlab/monitored_mta - XCC:
/etc/xorlab/xcc,/etc/xorlab/auth,/etc/xorlab/elastic, and/etc/xorlab/monitoring
- MTA:
-
Restart the Docker service with:
-
Recreate the existing networks by executing
docker network rm <network> && docker network create <network>for the following<network>:- MTA:
activeguard.xorandmonitored_mta.xor. You can display existing networks withdocker network ls. - XCC:
xcc.xor,auth.xor, andmonitoring.xor
- MTA:
-
Restart the VM:
Replace built-in certificates
This is only applicable if you want to replace the pre-installed dummy certificates. These certificates allow for encryption of traffic but not for authentication. To install new TLS certificates, you have to:-
Replace the dummy certificate files on both the XCC and MTAs in
/etc/xorlab/tlswith your certificate files in PEM format: -
If certificates are used that are not signed by a generally trusted CA, i.e. self-issued / locally trusted certificates, you need to configure XCC and MTA VMs to trust all certificates:
- XCC
- MTA
-
/etc/xorlab/<stack>/bootstrap.env(auth,monitoringandxccstacks) -
/activeguard/core/active_guard.yml(using Expert Editor) -
/monitored_mta/promtail/config.yml(using Expert Editor) -
/activeguard/mta/audit/audit.yml(using Expert Editor)
-
Click Publish for the files edited in Expert Editor, then restart all containers on the XCC and MTAs to activate the changes. The
active_guard.yml, audit, Promtail, and Grafana settings listed above include entries that require component restarts; see How to Activate the Configuration.
Activate the firewall
This is only applicable if you want to manage a host firewall on the xorlab hosts. By default, new MTA and XCC VMs have their firewalls disabled, although the necessary iptables config files are present. To enable the firewalls, for XCC and each MTA VM, execute the following command:Post-installation checks
- Log in to the xorlab MTA admin interface on port 8443.
- Go to Health Check and confirm that the status is
RUNNING. - Go to Configuration → System Tests and confirm that all System Tests are green.
Further steps
- When the VM setup is finished, proceed to configuring monitoring tools.
- Start integrating xorlab into your environment: On-prem Integration.