Open mlandauer opened 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 :-)
:+1: to using Logstash
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: