Now, I can see in the logs that several times, the dovecot calls the fts_backend_xapian_update_set_mailbox with box == NULL. WHy so ?
fts-api.h says:
/* Switch to updating the specified mailbox. box may also be set to NULL to
make sure the previous mailbox won't tried to be accessed anymore. */
void fts_backend_update_set_mailbox(struct fts_backend_update_context *ctx,
struct mailbox *box);
So it's just telling you that you can close/free any stuff related to that mailbox.
additionally, my logic is that the backend stores one databalse per mailox in /xapian-indexes (in the "root" dir of the user), the name od the database is the GUID of the mailbox
For INBOX, that works perfectly, and database is properly createdm and backed starts indexing all emails
For other folder, somehow, the process can not access that (root) folder.
Am I missing something ?
This is a bit ambiguous, because some people mean mailbox=folder and others mean mailbox=user account, and GUID can also be the internal Dovecot folder GUID, or a GUID of the user.
I'd recommend using a single database per user anyway.