# -------------------------------------------------------------------------------------------------------------------- #
# FTS: XAPIAN
# -------------------------------------------------------------------------------------------------------------------- #

plugin {
  fts = xapian
  fts_xapian = partial=3 full=20 verbose=0

  fts_autoindex = yes
  fts_enforced = yes

  # Disable indexing of folders.
  fts_autoindex_exclude = \Junk
  fts_autoindex_exclude2 = \Spam
  fts_autoindex_exclude3 = \Trash

  # Index attachments.
  # fts_decoder = decode2text
}

service indexer-worker {
  # Limit size of indexer-worker RAM usage, ex: 512MB, 1GB, 2GB.
  vsz_limit = 2G
  process_limit = 0
}

# service decode2text {
#   executable = script /usr/lib/dovecot/decode2text.sh
#   user = dovecot
#   unix_listener decode2text {
#     mode = 0666
#   }
# }
