Skip to content

Viewing Logs

An important part of routine opperations is checking logs. KumoMTA compressed logs are found in /var/log/kumomta/ and are named by date stamp. Logs are segmented by a combination of size/time and stored in compressed files named after the time that the segment was started. To read these, you need to unpack them first. You have many options for configuring logging.

├── 20230311-033705
├── 20230311-033844
├── 20230312-182542
└── 20230314-181435

Using tailer

The tailer utility, found at /opt/kumomta/sbin/tailer, is the easiest way to quickly review logs. The --tail flag will follow the log files in real time:

$ sudo /opt/kumomta/sbin/tailer --tail /var/log/kumomta
waiting for more files

The above example is shown artificially wrapped for the purposes of displaying nicely in this documentation. The actual log records are not output with wrapping.


We can take a look at a specific log by decompressing it and since these are zstd compressed, you can view all but the current one with zstdcat. ZSTD is a streaming compression utility so the current file cannot be accessed until it is flushed and closed. You can force the current log to close by stopping KumoMTA.

The default for log segments is to flush them after 1GB of data is written, but you can adjust them to flush after a certain amount of time if you find that you are regularly wanting to inspect the logs on a live system.

kumo.configure_local_logs has all of the available logging configuration options.

Using the example above, we can see the content of the newest file after stopping KumoMTA with a zstdcat /var/log/kumomta/20230314-181435.

If you have not done so already, you will want to install zstd with a (dnf or) apt install zstd. Below there is a sample of a decompressed received log:

$ zstdcat /var/log/kumomta/20230428-201424_recv`

These JSON formatted logs can be programatically consumed or read manually as shown above for debugging and maintenance.

Formatting can also be applied using the Mini Jinja tempating engine.