From e386d94bb2a08b536a3fac9d6405efdd686de401 Mon Sep 17 00:00:00 2001 From: beertje44 <101147154+beertje44@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:36:48 +0200 Subject: [PATCH] Update dovecot-solr.md syntax highlighting --- .../content/examples/tutorials/dovecot-solr.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/content/examples/tutorials/dovecot-solr.md b/docs/content/examples/tutorials/dovecot-solr.md index c278708d..2f6973ca 100644 --- a/docs/content/examples/tutorials/dovecot-solr.md +++ b/docs/content/examples/tutorials/dovecot-solr.md @@ -5,7 +5,7 @@ One of these is Apache SOLR, a fast and efficient multi-purpose search indexer. Firstly you need a working solr container, for this the official docker container will do: -``` +```yaml --- services: solr: @@ -15,17 +15,18 @@ services: volumes: - :/var/solr restart: always -``` +```yaml We'll assume dms will connect internally to solr, so either append the above docker composer snippet to your dms `compose.yml` or make sure both containers use the same docker network. The enviroment setting SOLR_JAVA_MEM is optional, but solr can be quite resource hungry so the default of 512MB can be exhausted rather quickly. Once started you need to configure a solr core for dovecot: -``` + +```bash docker exec -it solr_solr_1 /bin/sh solr create -c dovecot cp -R /opt/solr/contrib/analysis-extras/lib /var/solr/data/dovecot -``` +```bash Stop the container, you should now have a data/dovecot folder. All that is needed on the solr part is a schema that is tailored specifically for dovecot fts. [Luckilly, Dovecot provides these](https://github.com/dovecot/core/tree/main/doc). @@ -40,15 +41,16 @@ Both files should be owned by uid and gid 8983. Start the solr container once again, you should now have a working dovecot fts specific solr core. All that is left is to connect dms dovecot to this solr core: Create a `10-plugin.conf` file in your `config/dovecot` folder and link it in your `compose.yml` like so: -``` + +```yaml volumes: ... /config/dovecot/10-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro ... -``` +```yaml It's content should be: -``` +```config mail_plugins = $mail_plugins fts fts_solr plugin { @@ -56,7 +58,7 @@ plugin { fts_autoindex = yes fts_solr = url=http://solr_solr_1:8983/solr/dovecot/ } -``` +```config Once you restarted your dms instance, you have to tell dovecot it should reindex all mail: `docker compose exec mailserver doveadm fts rescan -A`