Knowledge base

Running in an image

containerised deployment
The same steps, performed at build time

Running the engine in a Docker container on Linux; Windows containers are not supported yet, and the capability itself is marked experimental.

The image is built with the same installation steps: the package, the license file in /etc/pmta, the volume-audit-api-key line for a volume-based license, and starting pmtad.

A license bound to a MAC address requires the same address on the container — with the –mac-address option. The engine needs the machine’s fully qualified name: without host-name it is set with the –hostname option.

Node state must live outside the image — the configuration, spool and accounting are attached as volumes, otherwise recreating the container loses them.

The main trap is a MAC-bound license. Without an explicit –mac-address the container gets a random address, and a key bound to the machine’s address does not fit.
What the Hub does. Not used: the Hub installs the engine as a package on the machine over SSH.
Recommended values

What to set at startup:

What How
MAC-bound license docker run –mac-address=…
volume-based license volume-audit-api-key in the configuration
fully qualified machine name host-name or –hostname
own configuration a volume over /etc/pmta/config
The experimental status, build steps, MAC address, machine name and attaching the configuration come from the manual (§ 11.23). The table is ours.
Example configuration
# a container with the MAC address from the license and its own configuration
docker run --mac-address="12:34:56:78:90:ab" --hostname="pmta.docker" -v /absolute-path-to-my-config/config:/etc/pmta/config --name=test pmta-centos7
An example from the manual: the address must match the one the key is bound to.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.
Compatibility
PowerMTA 6.0
described in the manual of this version · linux
The vendor does not state the first version for every directive — there is no note here. The name also appears in the 5.0 edition of the manual.
How to check on the node
Check the engine inside the container:
docker exec -ti test pmta show status
The command inside the container answers the same as on a machine; a startup failure is looked for in the startup log inside the container.
In the Hub
Cost of a mistake
disruptive: applying it interrupts the node
Scenarios
Prepare a node for sending