Hi

I upgraded dovecot from 2.0 to 2.1 , and now i face the quota recalc problem.
All settings are keep in mysql
Before , after a change in mailbox.quota field, i run doveadm quota recalc and all was ok ,
but now that command doesn't do anything.
After i change a quota for a user , i have to restart dovecot to get the new quota ,
or do a "doveadm reload" instead of recalc.
And the doveadm quota recalc -A" give me back a lot of "doveadm(username): Info: User no longer exists, skipping"

Any thoughts ?


# 2.1.10: /usr/dovecot21/etc/dovecot/dovecot.conf
# OS: Linux 2.6.35.4 i686
auth_cache_negative_ttl = 1 secs
auth_cache_size = 2 M
auth_failure_delay = 4 secs
auth_mechanisms = plain login digest-md5 cram-md5
auth_worker_max_count = 100
base_dir = /var/run/dovecot/
default_client_limit = 4096
default_internal_user = vmail
default_login_user = nobody
default_process_limit = 256
deliver_log_format = mail delivery from=%f subject=%s msgid=%m: %$
dict {
  acl = mysql:/usr/dovecot21/etc/dovecot/dovecot-dict-sql.conf.ext
}
disable_plaintext_auth = no
first_valid_uid = 1
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
mail_location = maildir:~/Maildir
mail_plugins = " quota acl trash notify mail_log"
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
namespace {
  hidden = no
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  list = 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 =
  separator = /
  subscriptions = yes
  type = private
}
passdb {
  args = /usr/dovecot21/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  autocreate = Trash
  autocreate2 = Drafts
  autocreate3 = Sent
  autosubscribe = Trash
  autosubscribe2 = Drafts
  autosubscribe3 = INBOX
  autosubscribe4 = Sent
  mail_log_events = delete mailbox_delete mailbox_rename
  mail_log_fields = box subject from msgid size
  quota = maildir:User quota
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=95%% quota-warning 90 %u
  quota_warning3 = storage=85%% quota-warning 85 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  trash = /usr/dovecot21/etc/dovecot/dovecot-trash.conf.ext
}
postmaster_address = postmas...@dacris.net
protocols = imap
quota_full_tempfail = yes
rejection_subject = Rejected: %s: %r
service auth {
  unix_listener auth-client {
    mode = 0666
    user = vmail
  }
  unix_listener auth-userdb {
    mode = 0666
    user = vmail
  }
}
service dict {
  unix_listener dict {
    user = vmail
  }
}
service imap-login {
  process_min_avail = 4
}
service imap-postlogin {
  executable = script-login /bin/imap.sh
  unix_listener imap-postlogin {
    mode = 01232
  }
}
service imap {
  executable = imap imap-postlogin
  process_limit = 1024
  vsz_limit = 1 G
}
service quota-warning {
  executable = script /bin/quota_warning.sh
  unix_listener quota-warning {
    user = vmail
  }
  user = vmail
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  args = /usr/dovecot21/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
protocol lda {
  mail_plugins = " quota acl trash notify mail_log sieve autocreate"
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_max_userip_connections = 20
  mail_plugins = " quota acl trash notify mail_log imap_quota imap_acl"
}



dovecot-sql.conf.ext:

password_query = SELECT password FROM mailbox WHERE \
    username = '%Ln' AND domain = '%Ld' AND \
    active = '1'

user_query = SELECT CONCAT('/srv/vmail/',mailbox.domain,'/%Ln') AS 'home' ,'98' AS 'uid', '98' AS 'gid' , \ CONCAT('*:storage=', mailbox.quota,'M') AS quota_rule ,"Trash:storage=+50M" AS quota_rule2 FROM mailbox WHERE \
    mailbox.username = '%Ln' AND mailbox.domain = '%Ld' AND \
    mailbox.active = '1'

iterate_query = SELECT username AS user , domain FROM mailbox WHERE active = '1'

<<attachment: adrian_stoica.vcf>>

Reply via email to