[Dovecot] dovecot-auth restaring and caching
Hello,
I'm trying to configure dovecot (2.0.13) to cache user and pass dbs.
This a mail server whose purpose is only to deliver messages through dovecot lda. My users are in a ldap server.
So I have configure auth_cache_size (with 20MB) and auth_cache_ttl
(with 1 day). I have checked that caching is being done, and it is. If a send a message to a user, dovecot looks for it in my ldap server. If then I send another, then it uses cache information.
The problem I'm having is that if I have no activity in the server,
dovecot stops its auth process and when another message is received, it restarted it, but with an empty cache.
This is the auth log for the first message:
Mar 22 10:29:41 lynx10 dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Mar 22 10:29:41 lynx10 dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libauthdb_ldap.so Mar 22 10:29:41 lynx10 dovecot: auth: Debug: master in: USER#0111#011amateo#011service=lda Mar 22 10:29:41 lynx10 dovecot: auth: Debug: prefetch(amateo): passdb didn't return userdb entries, trying the next userdb Mar 22 10:29:41 lynx10 dovecot: auth: Debug: userdb-cache(amateo): miss Mar 22 10:29:41 lynx10 dovecot: auth: Debug: ldap(amateo): user search: <search base and filter> fields=irisMailbox,homeDirectory,uidNumber,gidNumber Mar 22 10:29:41 lynx10 dovecot: auth: Debug: ldap(amateo): result: uidNumber(uid)=XXXXX gidNumber(gid)=XXX homeDirectory(home)=XXXXXXXXXX Mar 22 10:29:41 lynx10 dovecot: auth: Debug: master out: USER#0111#011amateo#011uid=XXXXXX#011gid=XXX#011home=XXXXXXXXXXXX
And this is the second one, just after a few minutes:
Mar 22 10:41:03 lynx10 dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Mar 22 10:41:03 lynx10 dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libauthdb_ldap.so Mar 22 10:41:03 lynx10 dovecot: auth: Debug: master in: USER#0111#011amateo#011service=lda Mar 22 10:41:03 lynx10 dovecot: auth: Debug: prefetch(amateo): passdb didn't return userdb entries, trying the next userdb Mar 22 10:41:03 lynx10 dovecot: auth: Debug: userdb-cache(amateo): miss Mar 22 10:41:03 lynx10 dovecot: auth: Debug: ldap(amateo): user search: <search base and filter> fields=irisMailbox,homeDirectory,uidNumber,gidNumber Mar 22 10:41:03 lynx10 dovecot: auth: Debug: ldap(amateo): result: uidNumber(uid)=XXXXX gidNumber(gid)=XXX homeDirectory(home)=XXXXXXXXXXX Mar 22 10:41:03 lynx10 dovecot: auth: Debug: master out: USER#0111#011amateo#011uid=XXXXX#011gid=XXX#011home=XXXXXXXXXX
This is my configuration:
root@lynx10:/etc/dovecot/conf.d# doveconf -n # 2.0.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-4-amd64 x86_64 Ubuntu 10.04.4 LTS auth_cache_size = 20 M auth_cache_ttl = 1 days auth_debug = yes auth_verbose = yes hostname = lynx10 passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_extensions = +imapflags sieve_max_redirects = 15 } postmaster_address = postmaster@um.es protocols = " imap lmtp pop3" service auth { unix_listener auth-userdb { mode = 0666 } } ssl_cert =
Any idea?
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337
El 22/03/12 19:57, Timo Sirainen escribió:
On 22.3.2012, at 11.55, Angel L. Mateo wrote:
The problem I'm having is that if I have no activity in the server, dovecot stops its auth process and when another message is received, it restarted it, but with an empty cache.
service auth { idle_kill = 0 }
In a test server I have, this have solved the problem. In my
productions servers it is still being restarted. Could it be another parameter involve in this?
service_count is set to 0.
I have also seen that, whenever dovecot/auth is restarted,
dovecot/config has also been restarted. Could be related?
My config related with this service auth is:
service auth { chroot = client_limit = 4096 drop_priv_before_exec = no executable = auth extra_groups = group = idle_kill = 0 privileged_group = process_limit = 1 process_min_avail = 0 protocol = service_count = 0 type = unix_listener auth-client { group = mode = 0600 user = } unix_listener auth-login { group = mode = 0600 user = $default_internal_user } unix_listener auth-master { group = mode = 0600 user = } unix_listener auth-userdb { group = mode = 0666 user = } unix_listener login/login { group = mode = 0666 user = } user = $default_internal_user vsz_limit = 18446744073709551615 B }
-- Angel L. Mateo Martínez Sección de Telemática Área de Tecnologías de la Información _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337
On 23.3.2012, at 14.15, Angel L. Mateo wrote:
El 22/03/12 19:57, Timo Sirainen escribió:
On 22.3.2012, at 11.55, Angel L. Mateo wrote:
The problem I'm having is that if I have no activity in the server, dovecot stops its auth process and when another message is received, it restarted it, but with an empty cache.
service auth { idle_kill = 0 }
In a test server I have, this have solved the problem. In my productions servers it is still being restarted. Could it be another parameter involve in this?
Oops, I remembered wrong. idle_kill=0 uses default_idle_kill limit. You could set for example:
idle_kill = 4294967295s
participants (2)
-
Angel L. Mateo
-
Timo Sirainen