Contents
Configuring receipt of Postfix events
You can configure the receipt of Postfix events in KUMA. Integration is only possible when sending events via syslog using the TCP protocol. The resources described in this article are available for KUMA 3.0 and newer versions.
Configuring event receiving consists of the following steps:
- Configuring Postfix to send events.
- Creating a KUMA collector for receiving Postfix events.
- Verifying receipt of Postfix events in the KUMA collector
You can verify that the Postfix event source server is correctly configured in the Searching for related events section of the KUMA Console.
The Postfix system generates events in two formats:
- Multi-line events containing information about messages (with a unique ID). These events have the following form:
<syslog PRI> time host process_name: ID: information from base event 1
<syslog PRI> time host process_name: id: info from base event 2
- Single-line events containing information about errors (without an ID). These events have the following form:
<syslog PRI> time host process_name: severity: basic information for parsing
A set of KUMA resources is used to process Postfix events; this set of resources must be applied when creating a collector:
- Normalizer
- Aggregation rule
- Filters for destinations
The collector aggregates multi-line base events based on event ID, normalizes them, and sends the aggregated event to the storage and the correlator.
The aggregated event has the following form:
Service information from the aggregation rule: ID: information from base event 1, information from base event 2, information from base event n
After aggregation, the received event is sent to the same collector where the aggregated event is normalized.
Processing algorithm for Postfix events
Configuring Postfix to send events
By default, audit events of the Postfix system are output to /var/log/maillog or /var/log/mail.
To send events to KUMA:
- Create a backup copy of the /etc/rsyslog.conf file.
- Open the /etc/rsyslog.conf file for editing.
- Add the following line to the end of the /etc/rsyslog.conf file:
mail.* @@<IP address of the KUMA collector>:<port of the KUMA collector>
- Save the /etc/rsyslog.conf file.
- Restart the rsyslog service:
sudo systemctl restart rsyslog
Configuring a KUMA collector for receiving and processing Postfix events
To configure a KUMA collector for receiving Postfix events:
- Import the [OOTB] Postfix package from the KUMA repository. The package is available for KUMA 3.0 and newer versions.
- Create a new collector, and in the Collector Installation Wizard, configure the following:
- At the Transport step, in the Type field, select the tcp type, and in the URL field, specify the FQDN or IP address and port of the collector.
- At the Event parsing step, click Add event parsing, and in the displayed Basic event parsing window, in the Normalizer drop-down list, select the [OOTB] Postfix syslog normalizer.
- At the Event aggregation step, click Add aggregation rule, and in the displayed Event aggregation window, in the Aggregation rule drop-down list, select [OOTB] Postfix. Aggregation rule.
- At the Routing step, click Add and in the displayed Create destination window, create three destination points one by one—the same collector with the name "Loop", a storage, and a correlator.
- Create a destination named "Loop" with the following parameters.
- On the Basic settings tab, in the Type drop-down list, select the tcp transport type; in the URL field, specify the FQDN or IP address and port of the collector that you specified before at step 2.1 of these instructions.
- On the Advanced settings tab, in the Filter drop-down list, select the Postfix. Filter for event aggregation filter.
This configuration is necessary to send the aggregated event to the same collector for subsequent normalization.
- Create a correlator destination:
- On the Basic settings tab, in the Type drop-down list, select correlator and fill in the URL field.
- On the Advanced settings tab, in the Filter drop-down list, select the Postfix. Aggregated events to storage and correlator filter.
- Create a storage destination:
- On the Basic settings tab, in the Type drop-down list, select storage and fill in the URL field.
- On the Advanced settings tab, in the Filter drop-down list, select the Postfix. Aggregated events to storage and correlator filter.
This configuration is necessary to send the aggregated normalized event to storage and the correlator.
- Create a destination named "Loop" with the following parameters.
- Click the Create button.
The collector service is created with the settings specified in the KUMA Console. The command for installing the service on the server is displayed.
- Copy the collector installation command and run it on the relevant server.
The collector is configured to receive and process Postfix events.
Page top