Mailcow.email (uses Postfix)

http://mailcow.email

is an interesting set of docker containers by means of docker-compose.

Mailcow uses Postfix for delivering mail. But up to now I did not find any post on using both Lightmeter and Mailcow.

The container running postfix in mailcow ships its logs into a Redis-DB and there is a small frontend for reading these logs. Lightmeter would be nicer and more complete. :wink:

From what I understand so far, Lightmeter scans/watches for log-files on a filesystem. Or did someone already build an interface for Redis-logs? What would be the best approach for an interface? (Redis-client to be implemented in Lightmeter subscribing to topics on a server or an intermediate container with a redis-client and writing (temporary) logs to a shared filesystem volume)

Thanks for any directions.

2 Likes

Welcome @meyca :wave::slightly_smiling_face:

Yeah Mailcow is cool and some other Mailcow users asked about Lightmeter also.

Not sure if it’d be easiest to connect Lightmeter to Mailcow’s packaged Postfix instance directly, or connect to Redis instead (or the intermediate FS you suggested).

What do you think @leandrosansilva ?

hi @meyca that sounds very interesting. I haven’t managed to try the ui for seeing the logs in mailcow (I used only their demo server so far). Would you be able to point out in their demo or with some screenshots how it looks like? It would also be interesting to know how the logs are published to redis.

@samtuke mailcow is shipped using docker compose, so deploying lightmeter with it should be fairy easy. The biggest part is supporting reading the logs from it (which I feel is not such a big task).

1 Like

Hi @leandro

mailcow uses syslog-ng to ship the logs. The postfix container log shipping is configured here

The UI looks like this:

Integration options I can think of:

  • “intermediate container” with a redis-client subscring to the logs and writing these logs into a container volume where lightmeter picks up the logs.
    • Pro: no change in lightmeter needed
    • Con: inefficient
  • “redis client for Lightmeter” implements a redis client within Lightmeter which can be configured to read the mailcow-redis-db-instance
    • Pro: more efficient
    • Con: changes in lightmeter needed

Regards
Carsten

1 Like