[Dovecot] userdb { prefetch } problem after upgrade (was Re: v2.2.9 released)

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Thu Dec 12 16:25:28 EET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 25 Nov 2013, Timo Sirainen wrote:

I test an upgrade from v2.2.5 to v2.2.9.

I have built v2.2.9 from hg source, make clean, make install; now it looks 
like that userdb prefetch won't work, but returns successful without any 
data all the time. There is no LDAP query, even if I start Dovecot newly 
and issue the commands (see below) right away.

The config works on v2.2.5 with prefetch, on v2.2.9 IMAP works, but
doveadm only without prefetch.

====

These are my queries for LDAP

user_attrs = 
=home=/home/%{ldap:uid},uid=user,mailLocationDovecot=mail,=quota_rule=*:bytes=%{ldap:mailQuotaBytes:300MB}, 
=quota_rule2=Trash:bytes=+%{ldap:mailQuotaBytesTrash:30MB},mail
DovecotGeneral=userdb_import,displayName=gecos

pass_attrs = 
uid=user,userPassword=password,=userdb_home=/home/%{ldap:uid},mailLocationDovecot=userdb_mail,uid=userdb_user,=userdb_quota_rule=*:bytes=%{ldap:mailQuotaBytes:300MB}, 
=userdb_quota_rule2=Trash:bytes=+%{ldap:mailQuotaBytesTrash:30MB},mailDovecotGeneral=userdb_userdb_import,displayName=userdb_gecos

passdb {
   driver = ldap

   # Path for LDAP configuration file, see 
example-config/dovecot-ldap.conf.ext
   args = /usr/local/dovecot-2.2.9/etc/dovecot/dovecot-ldap.conf.ext
}

userdb {
   driver = prefetch
}

userdb {
   driver = ldap
   args = /usr/local/dovecot-2.2.9/etc/dovecot/dovecot-ldap.conf.ext

   # Default fields can be used to specify defaults that LDAP may override
   default_fields = home=/home/%u uid=vmail gid=vmail
}


They work in v2.2.5 whether userdb { prefetch } is enabled or not.

In v2.2.9 without prefetch, everything works, with prefetch:

+ Login into IMAP and POP3 works,

- - doveadm user dvtest1   just returns:
field   value
uid     vmail
gid     vmail
home
mail

without prefetch:

field   value
uid     30002
gid     30002
home    /home/dvtest1
mail
quota_rule      *:bytes=300MB
quota_rule2     Trash:bytes=+30MB
gecos   dvtest1

====

Logentries:
2013-12-12 13:30:16 auth: Debug: master in: USER        1       dvtest1  service=doveadm
2013-12-12 13:30:16 auth: Debug: prefetch(dvtest1): success
2013-12-12 13:30:16 auth: Debug: userdb out: USER       1       dvtest1

- - LMTP fails

With log entries:
2013-12-12 13:31:52 auth: Debug: master in: USER        5       dvtest1 service=lmtp
2013-12-12 13:31:52 auth: Debug: prefetch(dvtest1): success
2013-12-12 13:31:52 auth: Debug: userdb out: USER       5       dvtest1
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: Quota root: name=User quota backend=dict args=:proxy::quota
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: Quota rule: root=User quota mailbox=* bytes=314572800 messages=0
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: Quota rule: root=User quota mailbox=Trash bytes=+31457280 messages=0
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: Quota grace: root=User quota bytes=31457280 (10%)
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: dict quota: user=dvtest1, uri=proxy::quota, noenforcing=0
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: mdbox: couldn't find root dir
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: sdbox: couldn't find root dir
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: maildir: Home directory not set
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: maildir: couldn't find root dir
2013-12-12 13:31:52 lmtp(4573, dvtest1): Debug: maildir: Home directory not set

=====

# 2.2.9 (c0236d1c4a04): /usr/local/dovecot-2.2.9/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.7 
auth_cache_size = 10 M
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
auth_verbose_passwords = plain
base_dir = /var/run/dovecot2.2/
default_client_limit = 2500
default_process_limit = 2500
deliver_log_format = msgid=%m: %$ %p/%w "%f" "%s"
dict {
   acl = pgsql:/usr/local/dovecot-2.2.9/etc/dovecot/dovecot-dict-sql.conf.ext
   quota = pgsql:/usr/local/dovecot-2.2.9/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
doveadm_password = *pwd*
instance_name = dovecot2.2
lda_mailbox_autocreate = yes
lmtp_save_to_detail_mailbox = yes
log_path = /var/log/dovecot/dovecot2.2.log
log_timestamp = "%F %H:%M:%S "
mail_debug = yes
mail_gid = vmail
mail_log_prefix = "%Us(%u) [%p]: "
mail_plugins = " quota notify mail_log zlib acl"
mail_shared_explicit_inbox = yes
mail_uid = vmail
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 imapflags
namespace {
   list = children
   location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
   prefix = users.%%u.
   separator = .
   type = shared
}
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 = 
}
passdb {
   args = /usr/local/dovecot-2.2.9/etc/dovecot/dovecot-ldap.conf.ext
   driver = ldap
}
plugin {
   acl = vfile
   acl_shared_dict = proxy::acl
   antispam_allow_append_to_spam = yes
   antispam_backend = spool2dir
   antispam_spam = SPAM+ReportAsSPAM
   antispam_spool2dir_notspam = /tmp/spamspool/%%020lu-%%05lu-%u-H
   antispam_spool2dir_spam = /tmp/spamspool/%%020lu-%%05lu-%u-S
   antispam_trash = trash;TRASH;Trash;spam;SPAM;Spam;junk;JUNK;Junk;Deleted Items;Deleted Messages;Gel&APY-schte Elemente;Gel&APY-schte Objekte;Junk E-mail;Junk-E-Mail;INBOX.Trash;INBOX.TRASH;INBOX.trash
   mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
   mail_log_fields = uid box msgid size vsize from subject
   quota = dict:User quota::proxy::quota
   quota_rule = *:storage=300MB
   quota_rule2 = Trash:storage=+30M
   recipient_delimiter = +
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
   sieve_extensions = +imapflags
   sieve_max_actions = 0
   sieve_quota_max_storage = 3M
}
postmaster_address = postmaster at inf.h-brs.de
protocols = imap pop3 lmtp sieve
quota_full_tempfail = yes
service anvil {
   client_limit = 10003
}
service auth {
   client_limit = 12500
   unix_listener auth-client {
     mode = 0766
   }
   unix_listener auth-userdb {
     mode = 0766
     user = vmail
   }
}
service dict {
   unix_listener dict {
     group = vmail
     mode = 0660
     user = vmail
   }
}
service doveadm {
   unix_listener doveadm-server {
     mode = 0666
   }
}
service imap {
   vsz_limit = 512 M
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
   inet_listener sieve_deprecated {
     port = 2000
   }
}
ssl_ca = </etc/ssl/certs/ca.crt
ssl_cert = </etc/ssl/certs/imap.pem
ssl_key = </etc/ssl/private/imap.key
userdb {
   args = /usr/local/dovecot-2.2.9/etc/dovecot/dovecot-ldap.conf.ext
   default_fields = home=/home/%u uid=vmail gid=vmail
   driver = ldap
}
verbose_proctitle = yes
protocol lmtp {
   mail_plugins = " quota notify mail_log zlib acl quota sieve"
}
protocol lda {
   mail_plugins = " quota notify mail_log zlib acl quota sieve"
}
protocol imap {
   mail_plugins = " quota notify mail_log zlib acl imap_quota imap_zlib imap_acl antispam"
}

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBUqnHWF3r2wJMiz2NAQK2egf9EC7BOdEqcDBdRLoEqxU1Ak9sbtnrDI8T
zv3eNOiLjkmieBxGkvXWIEVpfSH8icZi+m/I10LmIL8hMdSUMTTCMD0xvGFZ779H
7viHDxmmBQl55GU0gj5h1o22vwVK2km0bt/JbP11YeBZo6v57WGCRfSMbPJOSmoZ
RT6Od9SYkCvLdu0zo+hQ6tRLN/P25p85jg/Aob54wtHBNN8p3UFDHjWu0i+aYUoK
2SuCvENpCPmvWT48jwicNkdP4ekc91hpF9LK6XeRe+KmAEsJR+xMDpxcn1IX3pd4
F5BjJtw5dCrwF+/LL5CkSgakAw7gUP3qO8dwhypnRjxivgiE1XdWdw==
=41OA
-----END PGP SIGNATURE-----


More information about the dovecot mailing list