[Dovecot] Problem with quota update in dovecot 1.2
tower
towern at gmail.com
Tue Oct 16 16:39:13 EEST 2012
Hi
A have a problem with quota2 table, working under postfixadmin. When I
login into imap server with thunderbird client everything works fine,
quota is update when i receive a message, but when I move message to
trash or any other folder value for messages field in table quota2
increases +1 instead decreases or have still this same value. Only if I
close my imap client value descending -2. I wish to table quota2 will be
updated immediately after any operation on inbox. Is there any mistake
in my configuration?
Thanks for any advice.
==============================================================
dovecot -n print:
# 1.2.15: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-686 i686 Debian 6.0.3 ext3
log_path: /var/log/dovecot/error.log
info_log_path: /var/log/dovecot/info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
first_valid_uid: 100
mail_privileged_group: Debian-exim
mail_uid: 101
mail_gid: 103
mail_location: maildir:/var/mail/virtual/%d/%n/Maildir
mail_cache_min_mail_count: 100
mail_debug: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugins(default): autocreate quota imap_quota trash
mail_plugins(imap): autocreate quota imap_quota trash
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
imap_client_workarounds(default): tb-extra-mailbox-sep
imap_client_workarounds(imap): tb-extra-mailbox-sep
imap_client_workarounds(pop3):
imap_id_log(default): *
imap_id_log(imap): *
imap_id_log(pop3):
lda:
postmaster_address: postmaster at mydomain.com
mail_plugins: quota
log_path: /var/log/dovecot/lda-errors.log
info_log_path: /var/log/dovecot/deliver.log
auth default:
mechanisms: plain login
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
userdb:
driver: prefetch
userdb:
driver: sql
args: /etc/dovecot/dovecot-sql.conf
socket:
type: listen
master:
path: /var/run/dovecot/auth-master
mode: 384
user: Debian-exim
plugin:
autocreate: INBOX
autocreate2: Sent
autocreate3: Trash
autocreate4: Drafts
autocreate5: Junk
autocreate6: Spam
autosubscribe: INBOX
autosubscribe2: Sent
autosubscribe3: Trash
autosubscribe4: Drafts
autosubscribe5: Junk
autosubscribe6: Spam
quota: dict:user::proxy::quotadict
quota_rule: Trash:storage=+20%%
quota_rule2: Spam:ignore
quota_rule3: Drafts:storage=+5%%
quota_rule4: Sent:storage=+15%%
quota_rule5: Junk:storage=+10%%
quota_warning: storage=100%% quota-exceeded 100 %u
quota_warning2: storage=95%% quota-warning 95 %u
quota_warning3: storage=90%% quota-warning 90 %u
quota_warning4: storage=85%% quota-warning 85 %u
quota_warning5: storage=80%% quota-warning 80 %u
quota_warning6: storage=75%% quota-warning 75 %u
quota_warning7: storage=70%% quota-warning 70 %u
quota_warning8: storage=65%% quota-warning 65 %u
trash: /etc/dovecot/dovecot-trash.conf
mail_log_events: delete undelete expunge copy mailbox_delete
mailbox_rename flag_change append
mail_log_group_events: no
mail_log_fields: uid box msgid size subject from
dict:
quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf
=============================================
cat /etc/dovecot/dovecot-sql.conf
driver = mysql
connect = host=localhost dbname=eximdb user=eximdbadm password=*************
default_pass_scheme = PLAIN
password_query = \
SELECT username as user, domain, password \
FROM mailbox WHERE username= '%u' AND active = 1
user_query = \
SELECT CONCAT('/var/mail/virtual/', maildir) AS home, 101 AS
uid, 103 AS gid, concat('dict:storage=', CAST(ROUND(quota / 1024) AS
CHAR), '::proxy::quotadict') AS quota, CONCAT('*:storage=', CAST(quota
AS CHAR), 'B') AS quota_rule FROM mailbox WHERE username = '%u' AND
active = '1'
=============================================
cat /etc/dovecot/dovecot-dict-quota.conf
connect = host=localhost dbname=eximdb user=eximdbadm password=*********
map {
pattern = priv/quota/storage
table = quota2
username_field = username
value_field = bytes
}
map {
pattern = priv/quota/messages
table = quota2
username_field = username
value_field = messages
}
==============================================
cat /etc/dovecot/dovecot-trash.conf
1 Trash
2 Spam
3 Sent
4 Draft
More information about the dovecot
mailing list