Dovecot does not update maildirsize after expunge

Király Balázs kiuka at kiuka.hu
Sat Oct 4 16:27:31 UTC 2014


Hello,

 

At the first, sorry for my englishJ

 

I have a problem with dovecot quota since i migrated from courier. Dovecot
does not update the Maildirsize after expunge, and the user running out of
his quota very quickly.

I checked, the file is deleted from the filesystem. If i delete the
Maildirsize file, dovecot regenerate it with the correct datas when a new
mail arrive.

 

Also tried to set mail_debug=yes, but it doesnt show anything in the log,
when delete mails. 

 

Im using NFS as homedirs, i tried to turn off the releated options in
configuration, but didnt help.

 

Has anyone any idea how to fix this issue? Thank you!

 

Here is the output of dovecot -n:

 

# 2.1.7: /etc/dovecot/dovecot.conf

# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.6 nfs

auth_mechanisms = plain login

default_client_limit = 10000

default_process_limit = 1000

dict {

  quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext

}

disable_plaintext_auth = no

mail_fsync = always

mail_location = maildir:/home/vmail/%d/%n

mail_nfs_index = yes

mail_nfs_storage = yes

mmap_disable = yes

namespace inbox {

  inbox = yes

  location =

  mailbox Drafts {

    auto = subscribe

    special_use = \Drafts

  }

  mailbox Sent {

    auto = subscribe

    special_use = \Sent

  }

  mailbox "Sent Messages" {

    special_use = \Sent

  }

  mailbox Spam {

    auto = subscribe

    special_use = \Junk

  }

  mailbox Trash {

    auto = subscribe

    special_use = \Trash

  }

  prefix = INBOX.

  separator = .

  type = private

}

passdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}plugin {

  quota = maildir:User quota

  sieve = /home/vmail/default.sieve

  sieve_default = /home/vmail/default.sieve

  sieve_dir = ~/sieve

  sieve_extensions = +editheader

  sieve_global_dir = /var/lib/dovecot/sieve

}

protocols = " imap pop3"

service auth-worker {

  user = vmail

}

service auth {

  unix_listener /var/spool/postfix/private/auth {

    group = postfix

    mode = 0660

    user = postfix

  }

  unix_listener auth-userdb {

    mode = 0600

    user = vmail

  }

  user = $default_internal_user

}

service dict {

  unix_listener dict {

    group = vmail

    mode = 0600

    user = vmail

  }

}

ssl_cert = </etc/postfix/domain.tld.crt

ssl_key = </etc/postfix/domain.tld.key

userdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocol lda {

  mail_plugins = " quota sieve"

}

protocol imap {

  mail_max_userip_connections = 20

}

protocol pop3 {

  mail_max_userip_connections = 20

}

 

cat dovecot-sql.conf.ext

driver = mysql

connect = host=xx user=mailadmin password=xx dbname=xx

default_pass_scheme = SHA512-CRYPT

password_query = \

  SELECT email as user, password \

  FROM email_accounts WHERE email = '%u' AND smtp > IF('%s'='smtp', 0, -1)

 

user_query = \

  SELECT CONCAT('/home/vmail/', '%d', '/', '%n') as home, 5000 as uid, 5000
as gid, CONCAT('*:bytes=', quota) as quota_rule \

  FROM email_accounts WHERE email = '%u'

 

# If you wish to avoid two SQL lookups (passdb + userdb), you can use

# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll

# also have to return userdb fields in password_query prefixed with
"userdb_"

# string. For example:

#password_query = \

#  SELECT userid AS user, password, \

#    home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \

#  FROM users WHERE userid = '%u'

 

# Query to get a list of all usernames.

#iterate_query = SELECT username AS user FROM users



More information about the dovecot mailing list