[Dovecot] utility to update indexes ?

Jan-Frode Myklebust janfrode at tanso.net
Fri Jan 21 10:47:40 EET 2011


On Fri, Jan 21, 2011 at 01:08:09AM +0200, Timo Sirainen wrote:
> On Thu, 2011-01-20 at 23:50 +0100, Jan-Frode Myklebust wrote:
> 
> > But this woun´t work if the maildir has been modified outside of
> > dovecot (i.e. webmail usage). Are there any simple interface I can use
> > in this short snippet for noticing that the index is out of sync, and
> > update it ?
> 
> With v2.0 you could use doveadm easily (you can also just use doveadm
> binary from v2.0 and keep using v1.2 elsewhere):
> 
> doveadm mailbox status unseen inbox
> 

This sounds great, but I'm struggeling to get it working... It complains
about:

$ doveadm -v mailbox status -u user at example.com unseen inbox
doveadm(user at example.com): Error: userdb lookup: connect(/usr/local/dovecot-2.0.9/var/run/dovecot/auth-userdb) failed: No such file or directory
doveadm(user at example.com): Fatal: User lookup failed: Internal error occurred. Refer to server log for more information.

Will I need to have the dovecot-2 daemon running for this to work ?


My config was quickly converted from v1.2 by "dovecot -n > new.conf"
and very little modifications..

################ dovecot -n #############################
# 2.0.9: /usr/local/dovecot-2.0.9/etc/dovecot/dovecot.conf
# OS: Linux 2.6.9-89.0.9.ELsmp x86_64 Red Hat Enterprise Linux ES
# release 4 (Nahant Update 8) 
auth_verbose = yes
disable_plaintext_auth = no
mail_gid = 3000
mail_uid = 3000
mmap_disable = yes
namespace {
  inbox = yes
  location = 
  prefix = INBOX.
  type = private
}
passdb {
  args = /usr/local/dovecot2/etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  quota = maildir
}
protocols = imap pop3
service auth {
  unix_listener /var/run/dovecot/auth-master {
    group = atmail
    mode = 0660
    user = root
  }
  user = dovecot-auth
}
service imap-login {
  inet_listener imap {
    address = *
    port = 143
  }
  user = dovecot
}
service imap {
  executable = /usr/local/dovecot2/sbin/imap-wrapper.sh
  process_limit = 300
}
service pop3-login {
  inet_listener pop3 {
    address = *
    port = 110
  }
  user = dovecot
}
service pop3 {
  executable = /usr/local/dovecot2/sbin/pop-wrapper.sh
  process_limit = 300
}
ssl = no
userdb {
  args = /usr/local/dovecot2/etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_plugins = quota imap_quota
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = UID%u-%v
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugins = quota
  postmaster_address = MAILER-DAEMON at example.com
  sendmail_path = /usr/sbin/sendmail
}
################ /dovecot -n ############################

$ grep -v ^# /usr/local/dovecot2/etc/dovecot/dovecot-ldap.conf|grep -v ^$
hosts = ldapm1.example.com:389 ldapm2.example.com:389
auth_bind = yes
auth_bind_userdn = uid=%n,ou=people,o=%d,o=ISP,o=example,c=com
base = ou=people,o=%d,o=ISP,o=example,c=com
deref = never
scope = onelevel
user_filter = (&(objectClass=mailPerson)(uid=%n))
user_attrs =
mailMessageStore=mail=maildir:%$:INDEX=/indexes/%1u/%1.1u/%u,mailQuota=quota_rule=*:storage=%$


Also tried a minimal dovecot.conf:

$ ../../sbin/dovecot -n
# 2.0.9: /usr/local/dovecot-2.0.9/etc/dovecot/dovecot.conf
# OS: Linux 2.6.9-89.0.9.ELsmp x86_64 Red Hat Enterprise Linux ES
# release 4 (Nahant Update 8) 
mail_gid = 3000
mail_uid = 3000
mmap_disable = yes
ssl = no
userdb {
  args = /usr/local/dovecot2/etc/dovecot/dovecot-ldap.conf
  driver = ldap
}

But get the exact same errors..


  -jf


More information about the dovecot mailing list