(I forgot the attach)

El 19/09/12 11:15, Angel L. Mateo escribió:
El 18/09/12 18:31, Timo Sirainen escribió:
On 18.9.2012, at 9.59, Angel L. Mateo wrote:

    So I'm running this command. Whenever I run it, I get the
message that 3 (sometimes, is 4) entries are removed, but user
information isn't really reloaded and I doubt it is really removed
from cache (I have the user in a passwd-file and information used
by imap processes is still the old one, no the new one, changed
before the flush)

Works in my tests.

    Is this cache the same than the user information cache?

Yes.

    The parameter of the user I want to change is his quota, so I
have modified quota value in my ldap diretory, then I run:

doveadm auth cache flush <myuser>

What is your doveconf -n output and the dovecot-ldap.conf contents? Is
<myuser> with or without @domain? Also try this:

doveadm auth cache flush foo # make sure it isn't there
doveadm user foo
doveadm auth cache flush foo

Does the second flush return 1 or 0 entries? If 0, then there's a
problem. If 1, then it really should have worked.

You could try also if disabling userdb prefetch makes any difference.
And if you still have multiple userdb try with only one.


     I have made the test in my test server (it has no real activity).
In this server, user entry is refreshed correctly. But the same test in
my production servers fails.

     I have checked (in the production one) that the second flush delete
entries (in fact, 2, not 1):

amateo_adm@myotis31:/etc/dovecot/conf.d$ sudo doveadm auth cache flush
angel.luis
2 cache entries flushed
amateo_adm@myotis31:/etc/dovecot/conf.d$ sudo doveadm user angel.luis
userdb: angel.luis
   home      : /home/alumnos/46/113246
   uid       : 113246
   gid       : 1001
   quota_rule: *:storage=400M
amateo_adm@myotis31:/etc/dovecot/conf.d$ sudo doveadm auth cache flush
angel.luis
2 cache entries flushed
amateo_adm@myotis31:/etc/dovecot/conf.d$ sudo doveadm user angel.luis
userdb: angel.luis
   home      : /home/alumnos/46/113246
   uid       : 113246
   gid       : 1001
   quota_rule: *:storage=400M

     but quota information is not reloaded from ldap server.

     I have also checked my ldap server, and dovecot is not performing
any search operation for the user after flushing him from the cache.

     I have attached my doveconf -n. In my ldap configuration I have:
user_attrs =
irisMailbox=mail,homeDirectory=home,uidNumber=uid,gidNumber=gid,quota=quota_rule

pass_attrs =
irisMailbox=userdb_mail,userPassword=password,homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,quota=userdb_quota_rule


     and I have check that my test and production server has the same
configuration (but client_limit and number of processes).

     Any idea?


# 2.1.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.19um1 x86_64 Ubuntu 12.04.1 LTS 
auth_cache_size = 20 M
auth_cache_ttl = 1 days
auth_debug = yes
auth_master_user_separator = *
auth_verbose = yes
default_process_limit = 1024
disable_plaintext_auth = no
log_timestamp = %Y-%m-%d %H:%M:%S
login_trusted_networks = 155.54.211.176/28
mail_debug = yes
mail_location = maildir:~/Maildir:INDEX=/var/indexes/%n
mail_plugins = quota
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 imapflags
mdbox_rotate_size = 20 M
namespace {
  inbox = yes
  location = 
  prefix = 
  separator = .
}
namespace {
  hidden = yes
  list = no
  location = maildir:~/Maildir/expunged
  prefix = BORRADOS.
  separator = .
}
passdb {
  args = /etc/dovecot/master-users
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
passdb {
  args = session=yes dovecot
  driver = pam
}
plugin {
  lazy_expunge = BORRADOS.
  quota = dict:User quota::file:%h/Maildir/dovecot.quota
  quota_rule = *:storage=10G
  quota_rule2 = Trash:storage=+1G
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +imapflags
  sieve_max_redirects = 15
  zlib_save = gz
  zlib_save_level = 6
}
postmaster_address = postmas...@um.es
protocols = imap pop3 lmtp sieve
service anvil {
  client_limit = 3075
}
service auth {
  client_limit = 4096
  unix_listener auth-userdb {
    mode = 0666
  }
}
service doveadm {
  inet_listener {
    port = 24245
  }
}
service imap {
  process_limit = 5120
  process_min_avail = 6
  vsz_limit = 512 M
}
service ipc {
  unix_listener ipc {
    user = dovecot
  }
}
service lmtp {
  inet_listener lmtp {
    port = 24
  }
  process_min_avail = 10
  vsz_limit = 512 M
}
service pop3 {
  process_min_avail = 6
}
ssl = no
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lda {
  mail_plugins = quota sieve
}
protocol imap {
  mail_plugins = quota imap_quota
}
protocol lmtp {
  mail_plugins = quota sieve
}
protocol pop3 {
  pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, in=%i, out=%o
}
local 155.54.211.160/27/27 {
  doveadm_password = <password>
}

Reply via email to