poste.io2

Elasticsearch integration (PRO only)

Larger poste.io instances might overgrow host machine disk IO due one of the best advantage of Poste - logging. Poste with default settings logs very much everything possible to later help with problematic delivery, help with dealing external/internal bugs or find misbehaviour due invalid setting. Elasticsearch integration is part of log viewer (PRO only) which records SMTP and delivery transactions - essentially what Haraka produces.

We tried to make setup as hassle free as Poste.io installation itself. You can switch on anytime and you can always revert later - but of course logs continuity will be affected.

Setup

  1. Start your elasticsearch instance
$ docker run --name elasticsearch \
--restart always \
-e discovery.type=single-node \
-e node.name=es01 \
-e ingest.geoip.downloader.enabled=false \
-e bootstrap.memory_lock=true \
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /data/elasticsearch:/usr/share/elasticsearch/data \
-t elasticsearch:7.17.4
  1. Use Poste environment variable to connect to Elasticsearch -e "ELASTICSEARCH=123.123.123.123:9200". If your ES instance runs at same machine but in different network (Poste's host network cause inability to resolve elasticsearch name) you need to resolve IP by yourself like this:
$ ESIP=`docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' elasticsearch`
....
$ docker run --name mailserver \
--restart always \
--net=host \
-h "mail.test.com" \
-e "ELASTICSEARCH=$ESIP:9200" \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /data/mailserver:/data \
-t poste.io/mailserver:development
  1. Thats it! There is no changes in frontend behaviour.