mlandauer / cuttlefish

Transactional email server with a lovely web interface
http://cuttlefish.io
Other
1.54k stars 177 forks source link

Replace watching log file with network logging #148

Open mlandauer opened 9 years ago

mlandauer commented 9 years ago

Postfix logs to syslog which logs by default to a file. We're tailing the file for info.

It would be nicer if we asked syslog to forward mail logs to another syslog server which is a special server that we write that parses the log files.

We can also ask syslog to queue logs in case our daemon ever goes down.

This has a few advantages:

lorello commented 9 years ago

Have you evaluated Fluentd or Logstash instead of a daemon written from scratch?

You could configure Fluentd or Logstash to read from postfix logfile and solve for you the problems about file rotation or daemon restart. They both can forward logs to Mysql or Mongodb or ElasticSearch and many other destinations.

In a docker environment postfix should log to standard output and you can forward container logs from the docker host to a remote Fluentd or Logstash service, probably running in another container.

My 2 cents :-)

mlandauer commented 6 years ago

:+1: to using Logstash