Elasticsearch integration (PRO only)
Larger poste.io instances can overwhelm the host machine's disk IO due to one of Poste's best features - logging. Poste with default settings logs almost everything possible to later help with problematic delivery, help with dealing with external/internal bugs or find misbehaviour due to invalid settings. Elasticsearch integration is part of the log viewer (PRO only) which logs SMTP and delivery transactions - essentially what Haraka produces.
We have tried to make the setup as easy as installing Poste.io itself. You can turn it on at any time and turn it off at any time later - but of course the continuity of the logs will be affected.
Setup
- 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
- Use Poste environment variable to connect to the Elasticsearch
-e "ELASTICSEARCH=123.123.123.123:9200"
. If your ES instance runs at same machine but in different network (Poste'shost
network cause inability to resolveelasticsearch
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
- That is all! There are no changes to the frontend behaviour.