I downloaded dovecot 1.09 sources I patched it with quota-rewrite patch for v1.0. And now I have a problem with quota , I have quota dans mysql.
I send mail to a mailbox & i exeded the quota limit, then when I want to errase de mail via imap dovecot tells me there is no space for this operation.
my logs:
/var/log/dovecot-deliver.log
deliver(info@webmark.fr): Mar 03 12:46:15 Info: Loading modules from directory: /usr/lib/dovecot/modules/lda deliver(info@webmark.fr): Mar 03 12:46:15 Info: Module loaded: /usr/lib/dovecot/modules/lda/lib10_quota_plugin.so deliver(info@webmark.fr): Mar 03 12:46:15 Info: auth input: info@webmark.fr deliver(info@webmark.fr): Mar 03 12:46:15 Info: auth input: home=/export/vmail/webmark.fr/info/Maildir deliver(info@webmark.fr): Mar 03 12:46:15 Info: auth input: mail=maildir:/export/vmail/webmark.fr/info/Maildir deliver(info@webmark.fr): Mar 03 12:46:15 Info: auth input: uid=5000 deliver(info@webmark.fr): Mar 03 12:46:15 Info: auth input: gid=8 deliver(info@webmark.fr): Mar 03 12:46:15 Info: auth input: quota_rule=*:bytes=10240000 deliver(info@webmark.fr): Mar 03 12:46:15 Info: maildir: data=/export/vmail/webmark.fr/info/Maildir deliver(info@webmark.fr): Mar 03 12:46:15 Info: maildir: root=/export/vmail/webmark.fr/info/Maildir, index=/export/vmail/webmark.fr/info/Maildir, control=, inb$ deliver(info@webmark.fr): Mar 03 12:46:17 Info: msgid=5393f790988e70e84018e2510363bdfe@localhost: saved mail to INBOX
/var/log/mail.log:
dovecot: imap-login: Login: user=info@webmark.fr, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured dovecot: IMAP(info@webmark.fr): Loading modules from directory: /usr/dovecot/lib/dovecot/imap dovecot: IMAP(info@webmark.fr): Module loaded: /usr/dovecot/lib/dovecot/imap/lib10_quota_plugin.so dovecot: IMAP(info@webmark.fr): Module loaded: /usr/dovecot/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: IMAP(info@webmark.fr): Effective uid=5000, gid=8, home=/export/vmail/webmark.fr/info/Maildir dovecot: IMAP(info@webmark.fr): Quota root: name= backend=maildir args= dovecot: IMAP(info@webmark.fr): Quota rule: root= mailbox= bytes=10240000 messages=0 dovecot: IMAP(info@webmark.fr): Quota rule: root= mailbox=Trash bytes=3072000 messages=0 dovecot: IMAP(info@webmark.fr): maildir: data=/export/vmail/webmark.fr/info/Maildir dovecot: IMAP(info@webmark.fr): maildir: root=/export/vmail/webmark.fr/info/Maildir, index=/export/vmail/webmark.fr/info/Maildir, control=, inbox=
My file dovecot.conf is the following.
ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key mail_location = maildir:/export/vmail/%d/%u/Maildir mail_extra_groups = mail first_valid_uid = 5000 last_valid_uid = 5000 maildir_copy_with_hardlinks = yes disable_plaintext_auth = no mail_debug = yes protocols = imap pop3 protocol imap { mail_plugins = quota imap_quota imap_client_workarounds = outlook-idle delay-newmail } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_uidl_format = %08Xu%08Xv } protocol lda { postmaster_address = support@oc3.fr mail_plugins = quota log_path = /var/log/dovecot-deliver.log info_log_path = /var/log/dovecot-deliver.log } auth default { mechanisms = plain login passdb sql { args = /etc/dovecot/sql.conf } # userdb prefetch { # } userdb sql { args = /etc/dovecot/sql.conf } user = nobody socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = vmail group = mail } client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = mail } } } dict { } plugin { quota = maildir quota_rule2 = Trash:storage=30%% }
my file sql.conf driver = mysql default_pass_scheme = MD5 connect = host=localhost dbname=postfix user=postfix password=password user_query = SELECT concat('/export/vmail/', maildir, 'Maildir') as home, concat('maildir:/export/vmail/', maildir, 'Maildir') as mail, 5000 AS uid, 8 AS gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, concat('/export/vmail/', maildir, 'Maildir') as userdb_home, concat('maildir:/export/vmail/', maildir, 'Maidir') as userdb_mail, 5000 as userdb_uid, 8 as userdb_gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'
Any Idea Thanks