On 17.11.2012 07:35, wrote Daniel L. Miller:
On 11/16/2012 12:58 PM, Dave Abrahams wrote:
on Thu Nov 15 2012, "Daniel L. Miller" <dmiller-AT-amfes.com> wrote:
On 11/14/2012 6:52 AM, Dave Abrahams wrote:
Does anyone have an answer to this question? Should I simply issue an IMAP search command, or is there a better way?
Put this in a cron script:
doveadm search -A text zyxabcxyz > /dev/null
That will perform a search through every mailbox on the system, indexing as it goes. The search query is unlikely to return much in the way of results, so log files won't fill up much. That actually doesn't work for me. "doveadm index ..." does, though.
Use whatever works for you. The problem (for me) with "doveadm index" is it only works with the specified mailboxes. It can be done for all users - but only designated mailboxes. So a "doveadm index -A INBOX" will scan all inboxes - but none of the other folders.
The following works for me:
doveadm index -A "*"
The search command I showed performs a recursive search that hits everything.