[Dovecot] about quota in dovecot

guojinpeng(郭晋鹏) guojinpeng at icst.pku.edu.cn
Sun Mar 29 08:03:57 EEST 2009



I’m currently try to use the dovecot quota plugin.


I use the maildir plugin ,and use mysql as to get the quota rule.


Question is:


Sometimes dovecot only count in the size of  INBOX ,without other (I use imap to create some mailbox),while,sometimes it count in all.


I don’t know if there’s anything wrong with my configure.


Here is the configure of my dovecot.


Thank u!


>>>>>>>>>>>>>>>>>>>>>--------dovecot setting-------------<<<<<<<<<<<<<<<<<<<<<<<




# 1.1.13: /etc/dovecot.conf

# OS: Linux 2.6.9-67.0.7.EL i686 CentOS release 4.6 (Final) ext3

base_dir: /var/run/dovecot/

log_path: /var/log/dovecot.log

protocols: imap pop3

login_dir: /var/run/dovecot/login

login_executable(default): /usr/libexec/dovecot/imap-login

login_executable(imap): /usr/libexec/dovecot/imap-login

login_executable(pop3): /usr/libexec/dovecot/pop3-login

login_greeting: Dovecot Ready

mail_location: maildir:/home/mail/%u/

mail_executable(default): /usr/libexec/dovecot/imap

mail_executable(imap): /usr/libexec/dovecot/imap

mail_executable(pop3): /usr/libexec/dovecot/pop3

mail_plugins(default): quota imap_quota

mail_plugins(imap): quota imap_quota

mail_plugins(pop3): quota

mail_plugin_dir(default): /usr/lib/dovecot/imap

mail_plugin_dir(imap): /usr/lib/dovecot/imap

mail_plugin_dir(pop3): /usr/lib/dovecot/pop3

auth default:


    driver: sql

    args: /etc/dovecot-mysql.conf


    driver: sql

    args: /etc/dovecot-mysql.conf


    type: listen


      path: /var/run/dovecot/auth-client

      mode: 432


      path: /var/run/dovecot/auth-master

      mode: 438

      user: dovecot

      group: dovecot


  quota: maildir:User quota

  quota_warning: storage=80%% /home/guojinpeng/quota-warning.sh 80


  quota: mysql:/etc/dovecot-dict-quota.conf




# cat /etc/dovecot-mysql.conf 

driver = mysql


connect = host=/var/lib/mysql/mysql.sock dbname=postfix user=postfix password=postfix


default_pass_scheme = CRYPT


#password_query = SELECT password FROM mailbox WHERE username = '%u'


#user_query = SELECT maildir, 506 AS uid, 508 AS gid FROM mailbox WHERE username = '%u'


user_query = select maildir,506 as uid, 508 as gid, \

  concat('*:storage=', quota ,'B') as quota_rule \

  from mailbox where username = '%u'

password_query = select username as user, password, \

  506 as userdb_uid, 508 as userdb_gid, \

  concat('*:storage=', quota ,'B') as userdb_quota_rule \

  from mailbox where username = '%u'



More information about the dovecot mailing list