[Dovecot] strange quota behaviour with dovecot 1.1.7

listacc at gmx.de listacc at gmx.de
Tue Jun 23 17:42:02 EEST 2009


Hello!

I´m running dovecot 1.1.7 (which is the most recent binary of openSuSE 11.1 repository) with Postfix, MySQL and Postfixadmin.

Now I´m trying for some days to get quota working, but I get some strange behaviour and I was not yet able to figure out where the error in my configuration is.

Quota information is inserted by postfixadmin into a MySQL database. It seems that dovecot is reading this information correctly - when  a mailbox is filled up and gets over-quota, further emails are rejected.

But then, if I want to increase the quota for this filled-up mailbox in postfixadmin, postfixadmin correctly changes the quota information in MySQL table. 

After growing quota, mails to the account are accepted again. But my Thunderbird with Quota plugin continues showing the old quota setting. When more mails are sent to this account, it shows a quota > 100%.

If I look into the "mailboxsize" file of this account, it still shows the old quota value before I raised it. If I delete the entry in mailboxsize, dovecot writes the old value in again.

Seems that dovecot isn´t looking in the MySQL table (but it did after creating the account). But why are mails accepted again if dovecot is not recognizing the raised quota??

If I try now, as a user, to delete mails from the "overfilled" Inbox, it is denied with a "quota exceeded" message. But I´m able to send further mails to this account. The only way to get the account working properly again is to delete the messages directly on the server´s filesystem. 

I´m very grateful for every hint!

regards,

  Andreas



-------------

dovecot -n:

# 1.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.27.23-0.1-default x86_64 openSUSE 11.1 (x86_64) ext3
base_dir: /drbd/mail/var/run/dovecot/
log_path: /var/log/dovecot.err
info_log_path: /var/log/dovecot.info
protocols: imaps managesieve
listen(default): *
listen(imap): *
listen(managesieve): 192.168.1.8:2000
ssl_listen(default): *:993
ssl_listen(imap): *:993
ssl_listen(managesieve): 
ssl_cert_file: /etc/ssl/certs/imap.domain.crt
ssl_key_file: /etc/ssl/private/imap.domain.key
verbose_ssl: yes
login_dir: /drbd/mail/var/run/dovecot//login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
max_mail_processes: 2000
mail_max_userip_connections(default): 30
mail_max_userip_connections(imap): 30
mail_max_userip_connections(managesieve): 10
first_valid_uid: 5001
last_valid_uid: 5001
mail_location: maildir:/drbd/mail/vmail/%d/%n
mail_debug: yes
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(managesieve): 
mail_plugin_dir(default): /usr/lib64/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/modules/imap
mail_plugin_dir(managesieve): /usr/lib64/dovecot/modules/managesieve
managesieve_implementation_string(default): dovecot
managesieve_implementation_string(imap): dovecot
managesieve_implementation_string(managesieve): Cyrus timsieved v2.2.13
sieve_storage(default): 
sieve_storage(imap): 
sieve_storage(managesieve): /drbd/mail/vmail/%d/%n/sieve
sieve(default): 
sieve(imap): 
sieve(managesieve): /drbd/mail/vmail/%d/%n/dovecot.sieve
auth default:
  mechanisms: plain login cram-md5
  user: nobody
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
    driver: pam
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  userdb:
    driver: passwd
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
    master:
      path: /var/run/dovecot/auth-master
      mode: 432
      user: vmail
      group: vmail
plugin:
  sieve: /drbd/mail/vmail/%d/%n/dovecot.sieve
  quota: maildir


---
dovecot-sql.conf:

(...)
password_query = SELECT username AS user, password, '/drbd/mail/vmail/%d/%n' AS userdb_home, 'maildir:/drbd/mail/vmail/%d/%n' AS userdb_mail, 5001 AS userdb_uid, 5001 AS userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
(...)
user_query = SELECT '/drbd/mail/vmail/%d/%n' AS home, 'maildir:/drbd/mail/vmail/%d/%n' AS mail, 5001 AS uid, 5001 AS gid, concat('*:storage=', quota, 'B') AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'


---

mysql> select quota from mailbox;
+-----------+
| quota     |
+-----------+
| 512000000 | 
| 512000000 | 
| 512000000 | 
| 512000000 | 
| 512000000 | 
| 512000000 | 
| 512000000 | 
| 512000000 | 
| 512000000 | 
|  30720000 | 
|  30720000 | 
+-----------+
11 rows in set (0.00 sec)

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


More information about the dovecot mailing list