From fc47b736ea4f87b0cfcfa725c2fa7cba8e9b3bb5 Mon Sep 17 00:00:00 2001 From: Thomas Rehn Date: Sun, 14 Jun 2020 19:06:17 +0200 Subject: [PATCH] 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 }}