[Dovecot] Update indexes with dovecot 1.1

Joseph Tam jtam.home at gmail.com
Fri Aug 19 23:41:48 EEST 2011

Angel L. Mateo writes:

> I have a farm of dovecot 1.1 servers (debian lenny).  Mailboxes are in
> Maildir format. 
> Is there any way to manually update indexes?
> Does it worth? I mean...  Our problem is that mail is delivered via
> dovecot lda, but, because we have a farm of servers, we don't guarantee
> that mail is delivered through the same server that the user is using
> for his imap connection, so the imap server could have this index
> unupdated.  So I want to force an update (or at least nearly updated)
> in order to have the index updated in all servers at the time the user
> get to work.

Upgrading to Dovecot2 would allow you to solve this in
various ways:

 	- use "doveadm force-resync"
 	- user director to bind to a particular server

You could put the indices on a shared filesystem.

If neither an update nor shared indices are feasible, maybe you can
enable the master user feature, and run a script that logs in as each user
and do an IMAP operation that will force a resync of the INBOX indices.
For example,

 	# On IMAP server with a localhost interface
 	for u in $users; do
 		echo "1 login $u*master masterpw\n2 SELECT INBOX\n3 logout" | \
 		nc 143

Joseph Tam <jtam.home at gmail.com>

More information about the dovecot mailing list