Bug in fts (solr?, Maildir?) incorrect last_indexed_uid

Karl O. Pinc kop at meme.com
Thu Oct 30 03:30:42 UTC 2014


Hi,

I thought I should document this.
(Dovecot 2.2.9, see config at bottom.)

I installed dovecot and then converted a
number of mbox mailboxes to Maildir,
and had a number of pre-existing Maildir mailboxes.

I then installed the debian (wheezy) fts-solar
and jetty packages, and tested my inbox
using the "telnet localhost imap
  ...
  3 SEARCH text "test"
method as described on the dovecot wiki.

Everything seemed to work.

But when I used balsa to search a mailbox other
than my inbox, I got no results.

"doveadm dump" on the searched mailbox
showed that "last_indexed_uid" to be
the last uid of my inbox.

Stopping dovecot,
deleting out the dovecot-index* files,
starting dovecot,
and re-running "doveadm dump" showed
a non-existant last_indexed_uid --
that is, last_indexed_uid did not show
up in the dump output.

Using the telnet method above to attempt
to search again yielded no results,
but this time (I think, I also tried
various times with balsa) the last_indexed_uid
value was that of the last uid in my trash
mailbox.  I don't believe I'd yet
tried fts on my trash.

Using balsa as an imap client the results
were very consistent; every Maildir
where "doveadm dump" returned no
last_indexed_uid value had the
last_indexed_uid set to that of the
inbox's largest uid.

Running "doveadm fts rescan -u foo" fixed
the problem.  (FWIW, now all the Maildirs
seem to have a last_indexed_uid=0.)

Regards,

Karl <kop at meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-486 i686 Debian 7.7 
default_vsz_limit = 1 G
disable_plaintext_auth = no
mail_location = maildir:~/Maildir:INBOX=~/Maildir/.inbox
mail_plugins = fts fts_solr
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix = 
  separator = /
}
namespace unconverted {
  hidden = no
  list = yes
  location = mbox:~/mail
  prefix = unconverted/
  separator = /
  subscriptions = yes
  type = private
}
passdb {
  driver = pam
}
plugin {
  fts = solr
  fts_autoindex = yes
  fts_solr = url=http://localhost:8983/solr/
}
protocols = " imap"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}
ssl = required
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
ssl_protocols = !SSLv2 !SSLv3
userdb {
  driver = passwd
}


More information about the dovecot mailing list