[Dovecot] quota imap_quota

Bazy bazy at darkdawn.net
Wed Aug 29 00:05:13 EEST 2007


Hello,
I've been frying my brain with quota and mysql... Here is what I do:

protocol imap {
  mail_plugins = quota imap_quota
  imap_client_workarounds = outlook-idle delay-newmail
}

plugin {
    # 10 MB + 1000 messages quota limit
    # quota = maildir:storage=10240:messages=1000

    driver = mysql
    connect = host=/var/lib/mysql/mysql.sock user=mail_admin
password=XXXXXXXX dbname=mail
    user_query = SELECT CONCAT(('/home/vmail/'),
SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'),
CONCAT('5000'), CONCAT('5000'), CONCAT('maildir:storage=', quota) FROM
users AS quota WHERE email = '%u';
}

The querry output looks like this:

+----------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------+
| CONCAT(('/home/vmail/'),
SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') |
CONCAT('5000') | CONCAT('5000') | CONCAT('maildir:storage=', quota) |
+----------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------+
| /home/vmail/goofy.celuloza.ro/bazy/
                       | 5000           | 5000           |
maildir:storage=102400000         |
+----------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------+


I made the query with
http://wiki.dovecot.org/Quota?highlight=%28imap_quota%29 as an example.

The result is:

. OK Logged in.
. capability
* CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND
UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS QUOTA
. OK Capability completed.
. getquotaroot Inbox
. OK No quota.
. getquotaroot inbox
. OK No quota.
. getquotaroot Trash
. OK No quota.




How can I get quota to work?... I'm out of ideas... and I'm an dovecot
NUB... postfix sasl with dovecot with mysql with ENCRYPTED password
works great, pop3 imap and imaps work great also. I just can't get quota
to work... :(

Any advice is welcome.

Thank you!


More information about the dovecot mailing list