From fc47b736ea4f87b0cfcfa725c2fa7cba8e9b3bb5 Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Sun, 14 Jun 2020 19:06:17 +0200 Subject: [PATCH 1/3] introduce environment variable to control dovecot full-text-search --- core/dovecot/conf/dovecot.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/dovecot/conf/dovecot.conf b/core/dovecot/conf/dovecot.conf index aa33a7bb..81811cdb 100644 --- a/core/dovecot/conf/dovecot.conf +++ b/core/dovecot/conf/dovecot.conf @@ -21,7 +21,10 @@ mail_access_groups = mail maildir_stat_dirs = yes mailbox_list_index = yes mail_vsize_bg_after_count = 100 -mail_plugins = $mail_plugins quota quota_clone zlib fts fts_xapian +mail_plugins = $mail_plugins quota quota_clone zlib{{ ' ' }} + {%- if (FULL_TEXT_SEARCH or '').lower() not in ['off', 'false', '0'] -%} + fts fts_xapian + {%- endif %} default_vsz_limit = 2GB namespace inbox { @@ -39,11 +42,13 @@ plugin { quota_vsizes = yes quota_clone_dict = proxy:/tmp/podop.socket:quota + {% if (FULL_TEXT_SEARCH or '').lower() not in ['off', 'false', '0'] %} fts = xapian fts_xapian = partial=2 full=30 fts_autoindex = yes fts_enforced = yes fts_autoindex_exclude = \Trash + {% endif %} {% if COMPRESSION in [ 'gz', 'bz2' ] %} zlib_save = {{ COMPRESSION }} From 065447fd3598396d89774475eb03570593c5c3bf Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Sun, 14 Jun 2020 19:30:41 +0200 Subject: [PATCH 2/3] add feature description --- towncrier/newsfragments/1538.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 towncrier/newsfragments/1538.feature diff --git a/towncrier/newsfragments/1538.feature b/towncrier/newsfragments/1538.feature new file mode 100644 index 00000000..cdefe766 --- /dev/null +++ b/towncrier/newsfragments/1538.feature @@ -0,0 +1 @@ +Introduce option to disable dovecot full-text-search by an enviroment variable. From ebf1f4f1b6567adbd265b6d8a49782a43ede5722 Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Sun, 12 Jul 2020 21:26:22 +0200 Subject: [PATCH 3/3] add bits of documentation for new environment variable --- docs/compose/.env | 3 +++ docs/configuration.rst | 3 +++ setup/flavors/compose/mailu.env | 3 +++ 3 files changed, 9 insertions(+) diff --git a/docs/compose/.env b/docs/compose/.env index 69c91d82..7f91c270 100644 --- a/docs/compose/.env +++ b/docs/compose/.env @@ -102,6 +102,9 @@ COMPRESSION= # change compression-level, default: 6 (value: 1-9) COMPRESSION_LEVEL= +# IMAP full-text search is enabled by default. Set the following variable to off in order to disable the feature. +# FULL_TEXT_SEARCH=off + ################################### # Web settings ################################### diff --git a/docs/configuration.rst b/docs/configuration.rst index 292d4303..8382e063 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -83,6 +83,9 @@ later classify incoming mail based on the custom part. The ``DMARC_RUA`` and ``DMARC_RUF`` are DMARC protocol specific values. They hold the localpart for DMARC rua and ruf email addresses. +Full-text search is enabled for IMAP is enabled by default. This feature can be disabled +(e.g. for performance reasons) by setting the optional variable ``FULL_TEXT_SEARCH`` to ``off``. + Web settings ------------ diff --git a/setup/flavors/compose/mailu.env b/setup/flavors/compose/mailu.env index 78ecce72..8d94820a 100644 --- a/setup/flavors/compose/mailu.env +++ b/setup/flavors/compose/mailu.env @@ -91,6 +91,9 @@ COMPRESSION={{ compression }} # change compression-level, default: 6 (value: 1-9) COMPRESSION_LEVEL={{ compression_level }} +# IMAP full-text search is enabled by default. Set the following variable to off in order to disable the feature. +# FULL_TEXT_SEARCH=off + ################################### # Web settings ###################################