SQUATTER(8) | Cyrus IMAP | SQUATTER(8) |
squatter - Cyrus IMAP documentation
Create SQUAT indexes for mailboxes
general: squatter [ -C config-file ] [mode] [options] [source] i.e.: squatter [ -C config-file ] [-v] squatter [ -C config-file ] [ -a ] [ -i ] [-N name] [-S *seconds*] [ **-r ] mailbox... squatter [ -C config-file ] [ -a ] [ -i ] [-N name] [-S *seconds*] [ **-r ] -u user... squatter [ -C config-file ] -R [ -n channel ] [ -d ] squatter [ -C config-file ] -f synclogfile squatter [ -C config-file ] -I file squatter [ -C config-file ] -t srctier... -z desttier [ -F ] [ -T dir ] [ -X ] [ -o ]
NOTE:
squatter creates a new text index for one or more IMAP mailboxes. The index is a unified index of all of the header and body text of each message in a given mailbox. This index is used to significantly reduce IMAP SEARCH times on a mailbox.
By default, squatter creates an index of ALL messages in the mailbox, not just those since the last time that it was run. The -i option is used to select incremental updates. Any messages appended to the mailbox after squatter is run, will NOT be included in the index. To include new messages in the index, squatter must be run again.
In the first synopsis, squatter indexes all mailboxes.
In the second synopsis, squatter indexes the specified mailbox(es).
In the third synopsis, squatter indexes the specified user(s) mailbox(es).
For any of those three source modes (default=all, mailbox, user) one may optionally specify -r to recurse from the specified start, or -a to limit action only to mailboxes which have the shared /vendor/cmu/cyrus-imapd/squat annotation set to "true".
In the fourth synopsis, squatter runs in rolling mode. In this mode squatter backgrounds itself and runs as a daemon (unless -d is set), listening to a sync log channel chosen using the -n option, and set up using the sync_log_channels setting in imapd.conf(5). Very soon after messages are delivered or uploaded to mailboxes squatter will incrementally index the affected mailbox (see notes, below).
In the fifth synopsis, squatter reads a single sync log file and performs incremental indexing on the mailbox(es) listed therein. This is sometimes useful for cleaning up after problems with rolling mode.
In the sixth synopsis, squatter reads file containing mailbox uid tuples and performs indexing on the specified messages.
In the seventh synopsis, squatter will compact indices from srctier(s) to desttier, optionally reindexing (-X) or filtering expunged records (-F) in the process. The optional -T flag may be used to specify a directory to use for temporary files. The -o flag may be used to direct that a single index be copied, rather than compressed, from srctier to desttier.
For all modes, the -S option may be specified, causing squatter to pause seconds seconds after each mailbox, to smooth loads.
NOTE:
NOTE:
squatter reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C.
The value of the /vendor/cmu/cyrus-imapd/squat annotation is inherited by all children of the given mailbox, so an entire mailbox tree can be indexed (or not indexed) by setting a single annotation on the root of that tree with a value of "true" (or "false"). If a mailbox does not have a /vendor/cmu/cyrus-imapd/squat annotation set on it (or does not inherit one), then the mailbox is not indexed. In other words, the implicit value of /vendor/cmu/cyrus-imapd/squat is "false".
squatter is typically deployed via entries in cyrus.conf(5), in either the DAEMON or EVENTS sections.
For the older SQUAT search engine, which offers poor performance in rolling mode (-R) we recommend triggering periodic runs via entries in the EVENTS section, as follows:
Sample entries from the EVENTS section of cyrus.conf(5) for periodic squatter runs:
EVENTS {
# reindex changed mailboxes (fulltext) approximately every three hours
squatter1 cmd="/usr/bin/ionice -c idle /usr/lib/cyrus/bin/squatter -i" period=180
# reindex all mailboxes (fulltext) daily
squattera cmd="/usr/lib/cyrus/bin/squatter" at=0117 }
For the newer Xapian search engine, and with sufficiently fast storage, the rolling mode (-R) offers advantages. Use of rolling mode requires that squatter be invoked in the DAEMON section.
Sample entries for the DAEMON section of cyrus.conf(5) for rolling squatter operation:
DAEMON {
# run a rolling squatter using the default sync_log channel "squatter"
squatter cmd="squatter -R"
# run a rolling squatter using a specific sync_log channel
squatter cmd="squatter -R -n indexer" }
NOTE:
NOTE:
NOTE:
[NB: More examples needed]
Support for additional search enginges was added in version 3.0.
The following command-line switches were added in version 3.0:
-R -u -d -O -F -A
The following command-line settings were added in version 3.0:
-S <seconds>, -T <directory>, -f <synclogfile>, -n <channel>, -t srctier..., -z desttier
/etc/imapd.conf, /etc/cyrus.conf
The Cyrus Team, Nic Bernstein (Onlight)
1993-2017, The Cyrus Team
August 10, 2018 | 3.0.8 |