Posted by Helder Guerreiro
You can dramatically accelerate the mail search in Cyrus creating the so called squatter files, that finaly are indexes os the mails in each folder.
To create these indexes one uses the command squatter that is distributed with Cyrus.
For instance, to create the indexes of the user "helder" you run on a terminal something like:
$ su - cyrus $ squatter -r -v user.helder
We may not want to index a given folder. To do it we can make a notation of that folder:
$ cyradm -u cyrus localhost IMAP Password: localhost> setinfo squat true localhost> mboxcfg user.helder.Trash squat false
On the first localhost line we set the squat files for all the server, while on the second localhost we deactivate the indexation of the folder Trash of the user "helder".
Do remark that the command squatter must be called with the option -a to assure that these notations are considered.
Since the squatter files are not updated automatically we should do it periodically.
To achieve this just edit the Cyrus configuration file /etc/cyrus.conf and add to the section EVENTS the following line:
squatter cmd="squatter -a -s -r user" at=0145
The indexes will be updated everyday at 01h45.