[Dovecot] squat fts not working on 2.1rc1

Metro Domain Admin metro_domain_admin at fastmail.fm
Mon Nov 28 21:41:17 EET 2011


Hello,

I tried to upgrade from 2.0.15 to 2.1.rc1 over the weekend but ran into
some problems with squat. My two largest mailboxes were corrupted,
producing this error:

Nov 27 17:38:12 kerio1 dovecot[42860]: imap(bigmailbox): Error:
Corrupted squat uidlist file
/var/mail/metro-email.com/bigmailbox/mdbox/mailboxes/INBOX/dbox-Mails/dovecot.index.search.uids:
wrong indexid

There is a good chance that I had shot my own foot, by forgetting to
update postfix's dovecot-lda reference to the new instance. I had also
enabled an inet based LMTP listener, although it is not being used yet.


Even using non-corrupted indexes, it seemed that FTS was not being used.
A basic search such as this one took many minutes to complete:

doveadm search -u jsample mailbox INBOX body eps

I found messages like this in mail.log after performing the search:

Nov 27 18:21:39 kerio1 dovecot[42860]: indexer-worker(jsample): Indexed
0 messages in Drafts
Nov 27 18:21:39 kerio1 dovecot[42860]: indexer-worker(jsample): Indexed
0 messages in INBOX


When I rolled back to 2.0.15, the same search returned almost
immediately. The larger mailboxes went quickly again, but only after
they had a chance to rebuild.


A few other notes about our configuration: We are on PPC, with the stats
service disabled (because of kqueue issue discussed earlier). I made
some minor changes in my config since the previous installed version
(diff below). mail_location override is in place for all users via
password file, e.g.:
userdb_mail=mdbox:/var/mail/metro-email.com/jsample/mdbox

Thanks,
Tony

kerio1:~ metroadmin$ /opt/dovecot-2.1.rc1/bin/doveconf -n -c
/opt/dovecot-2.1.rc1/etc/dovecot/dovecot.conf 
# 2.1.rc1: /opt/dovecot-2.1.rc1/etc/dovecot/dovecot.conf
# OS: Darwin 9.8.0 Power Macintosh  
auth_cache_negative_ttl = 0
auth_cache_size = 1 M
auth_mechanisms = plain login
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lmtp_proxy = yes
mail_location = maildir:%h
mail_plugins = fts fts_squat mail_log notify
mail_privileged_group = mail
maildir_very_dirty_syncs = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date ihave editheader
mdbox_rotate_size = 10 M
namespace {
  inbox = yes
  location = 
  prefix = 
  separator = /
}
passdb {
  args = scheme=CRYPT username_format=%u
  /opt/dovecot-2.1.rc1/etc/dovecot/users
  driver = passwd-file
}
plugin {
  fts = squat
  mail_log_events = delete undelete expunge copy mailbox_delete
  mailbox_rename
  mail_log_fields = uid box msgid size from subject
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
postmaster_address = postmaster at metro-email.com
protocols = imap lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = _postfix
    mode = 0660
    user = _postfix
  }
  unix_listener auth-userdb {
    group = mail
    mode = 0660
    user = metroadmin
  }
}
service imap {
  executable = imap postlogin
}
service lmtp {
  inet_listener lmtp {
    address = 192.168.20.10 127.0.0.1
    port = 24
  }
}
service postlogin {
  executable = script-login rawlog -t
}
service stats {
  fifo_listener stats-mail {
    mode = 00
  }
}
ssl_cert = </opt/local/apache2/conf/ssl_startcom/server.crt
ssl_key = </opt/local/apache2/conf/ssl_startcom/server.key
userdb {
  args = username_format=%u /opt/dovecot-2.1.rc1/etc/dovecot/users
  driver = passwd-file
}
verbose_proctitle = yes
protocol imap {
  mail_max_userip_connections = 16
}


Here is a diff between the current/working and attempted configs:

kerio1:~ metroadmin$ diff k1.curr k1.new2
1c1
< # 2.0.15: /opt/dovecot-2.0.15/etc/dovecot/dovecot.conf
---
> # 2.1.rc1: /opt/dovecot-2.1.rc1/etc/dovecot/dovecot.conf
9a10
> lmtp_proxy = yes
15c16
< managesieve_sieve_capability = fileinto reject envelope
encoded-character vacation subaddress comparator-i;ascii-numeric
relational regex imap4flags copy include variables body enotify
environment mailbox date ihave
---
> managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave editheader
24c25
<   args = scheme=CRYPT username_format=%u
/opt/dovecot-2.0.15/etc/dovecot/users
---
>   args = scheme=CRYPT username_format=%u /opt/dovecot-2.1.rc1/etc/dovecot/users
50a52,57
> service lmtp {
>   inet_listener lmtp {
>     address = 192.168.20.10 127.0.0.1
>     port = 24
>   }
> }
53a61,65
> service stats {
>   fifo_listener stats-mail {
>     mode = 00
>   }
> }
57c69
<   args = username_format=%u /opt/dovecot-2.0.15/etc/dovecot/users
---
>   args = username_format=%u /opt/dovecot-2.1.rc1/etc/dovecot/users
kerio1:~ metroadmin$ 


More information about the dovecot mailing list