Le 09/04/2014 13:04, Benjamin Podszun a écrit :
On Wednesday, April 9, 2014 12:57:13 PM CEST, kadafax@gmail.com wrote:
Hi list,
We are in the process of migrating our old (dovecot 1.2.4 based) mail system to the new one:
- Centos 6 x86_64
- Dovecot 2.2.12
- Users in an openldap directory
- clucene FTS
I'm trying to trigger a full indexing for all the user and all their mailboxes (avoiding them to individually trigger it using a search within their MUA). I'm trying to use the "doveadm index" command.
First question, is there some sort of 'wildcard' option for the name of the mailbox to index, as I dont know all the mailboxes's names the users have created (beside the regular Sent Inbox Trash and Drafts ?
I'm using a totally different set of things, but at least dovecot and clucene are agreeable.. ;-)
You should have a fts plugin to doveadm that should solve this issue:
doveadm fts rescan doveadm fts optimize
That's what I use to trigger rebuilds. Yes it works but not (at least for me) on the initial lucene index creation (when the user don't even have a 'lucene-indexes' folder). For now I use in some bash script: doveadm -v index -u $user Trash doveadm -v index -u $user Drafts doveadm -v index -u $user Sent doveadm -v index -u $user Inbox
but that will not index other mailboxes the user has created. Is there a way to make doveadm to iterate through all user's mailboxes ?
Second question I've tried: # doveadm -D index -A Sent which gave me: doveadm(root): Error: User listing returned failure doveadm: Error: Failed to iterate through some users
Can the '-A' option work with ldap backend ?
http://wiki2.dovecot.org/AuthDatabase/LDAP/Userdb
# For using doveadm -A: iterate_attrs = uid=user iterate_filter = (objectClass=posixAccount)
Are you defining iterate_* for your userdb?
Yes I am and it's not working (see debug output below [1]) :( Maybe it's because I'm using a static userdb ?
###### dovecot-ldap.conf.ext AND dovecot-ldap-userdb.conf.ext (symlinked) ###### uris = ldaps://ldap.mydomain.com ldaps://ldap2.mydomain.com tls = no tls_ca_cert_file = /etc/pki/tls/certs/ca.crt tls_require_cert = never debug_level = 0 auth_bind = yes auth_bind_userdn = uid=%u,ou=people,dc=mydomain,dc=com ldap_version = 3 base = ou=people,dc=mydomain,dc=com pass_filter = (&(accountStatus=active)(uid=%n)) iterate_attrs = uid=user iterate_filter = (accountStatus=active)
###### auth-ldap.conf.ext ###### passdb { driver = ldap args = /usr/local/etc/dovecot/dovecot-ldap.conf.ext } userdb { driver = static args = uid=11111 gid=11111 home=/var/vmail/%Ln/home allow_all_users=yes }
Subsidiary question: dovecot offers to index attachments using decode2text.sh which in turn make use of xmlunzip. No rpm for Centos/RHEL propose this tool. Is this is the one I should use: https://raw.githubusercontent.com/GNOME/gnumeric/master/tools/xmlunzip
[1]: # doveadm -D index -A INBOX doveadm(root): Debug: Loading modules from directory: /usr/local/lib/dovecot doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/lib10_quota_plugin.so doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/lib20_fts_plugin.so doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/lib21_fts_lucene_plugin.so doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/lib90_stats_plugin.so doveadm(root): Debug: Loading modules from directory: /usr/local/lib/dovecot/doveadm doveadm(root): Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message) doveadm(root): Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/local/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_lookup (this is usually intentional, so just ignore this message) doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/doveadm/lib10_doveadm_sieve_plugin.so doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_lucene_plugin.so doveadm(root): Debug: Module loaded: /usr/local/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so doveadm(root): Error: User listing returned failure
doveadm: Error: Failed to iterate through some users