Skip to content

Experimental and basic Support for handling logs from multiple mail servers, including understanding relayed messages

Leandro Santiago requested to merge feature/relay_support into future/release-2.0

This is a long MR that introduces support for reading logs from multiple sources, and being able to recognize when a message pass through two servers, by their message IDS, so that it's not recognized as two messages, but only one.

Ref #4

This is done when using Postfix relay support.

In order to enable it, you have to receive logs from multiple servers, for instance, by using -watch_dir=/path multiple times, and enabling the feature with -node_type=multi (or environment variable LIGHTMETER_NODE_TYPE=multi)

lightmeter -node_type=multi -watch_dir=/path/logs_of_server_1 -watch_dir=/path/logs_of_server_2

By default the single mode is used, which correspond to the way we've been tracking the logs so far (pre 2.0).

It's important to notice that this support is very basic and relies A LOT on some assumptions that match our current needs, but not necessarily other user's, namely:

  1. when a message is relayed between servers, there's no authentication (all servers are part of the same postfix mynetwork setting)

  2. The "entrypoint" of a message into the network (managed postfix servers) is done via an authenticated connection (usually via submission port (587 or 465). Unauthenticated connections are not supported (as it conflicts with 1.).

Edited by Leandro Santiago

Merge request reports