grosjo / fts-xapian

Dovecot FTS plugin based on Xapian
GNU Lesser General Public License v2.1
91 stars 19 forks source link

Global setting mail_plugins won't change #129

Closed aacunha closed 9 months ago

aacunha commented 2 years ago

I installed the fts-xapian via debian 11 repo, and configured was made as described in the git page, creating the 90-fts.conf with this content:

root@mail:/etc/dovecot/conf.d# more 90-fts.conf

mail_plugins = $mail_plugins fts fts_xapian

plugin {
    fts = xapian
    fts_xapian = partial=3 full=20 verbose=0
    fts_autoindex = yes
    fts_enforced = yes
    fts_autoindex_exclude = \Trash
    #fts_decoder = decode2text
}

service indexer-worker {
    # Increase vsz_limit to 2GB or above.
    # Or 0 if you have rather large memory usable on your server, which is preferred for performance)
    vsz_limit = 8G
}

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

Without create a include in dovecot.conf, the settings wont load: root@mail:/etc/dovecot/conf.d# more ../dovecot.conf | grep include !include_try /etc/dovecot/conf.d/90-fts.conf

But with the include, i have this warning:

root@mail:/etc/dovecot/conf.d# doveconf -a | grep mail_plugin

doveconf: Warning: /etc/dovecot/conf.d/90-fts.conf line 1: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 317 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 317)
doveconf: Warning: /etc/dovecot/conf.d/90-fts.conf line 1: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 317 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 317)
mail_plugin_dir = /usr/lib/dovecot/modules
mail_plugins = quota mailbox_alias acl mail_log notify fts fts_xapian
  mail_plugins = quota mailbox_alias acl mail_log notify sieve
  mail_plugins = quota mailbox_alias acl mail_log notify sieve
  mail_plugins = quota mailbox_alias acl mail_log notify imap_quota imap_acl last_login
  mail_plugins = quota mailbox_alias acl mail_log notify last_login

the command doveadm fts rescan -u user@domain.com works, but i'm trying to solve this warning. Any thoughts?

grosjo commented 2 years ago

Try removing the first line of your file 90-fts.conf . I guess you have other plugins and the command makes it duplicate

grosjo commented 1 year ago

Solved ?

Dmitry422 commented 1 year ago

It's beacose you have setup global variable "mail_plugins =..." in config files and use this variable at 317 string. And after this in 90-fts you again try setup global variable "mail_plugins".

You must check your dovecot config files with global "mail_plugins = " and move to him "fts fts_xapian"