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 }} 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 20df3767..4b211925 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -87,6 +87,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 b3cef48d..560f7722 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 ################################### 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.