[Dovecot] problem mysql and dovecot 1.2
mickael
debian at robertain.com
Fri Jul 23 00:20:16 EEST 2010
Timo Sirainen wrote:
> On Thu, 2010-07-22 at 17:19 +0200, debian at robertain.com wrote:
>
>> On Thu, 22 Jul 2010 16:51:03 +0200, Simone Caruso <info at simonecaruso.com>
>> wrote:
>>
>>>> yet but the quotas work through this option:
>>>>
>>> > quota_rule: *:storage=100M
>>> > The problem is that quotas are not personalized.
>>>
>>> try using 'quota_rule2' in dovecot.conf and 'quota_rule' in user_query.
>>>
>> the problem using the quotas_rules I no customization.(If I'm wrong, he
>> must tell me)
>>
>
> The problem is that you need to return "quota_rule" from your sql, not
> "quota". The "quota" worked with v1.0, but not with v1.1+. See
> http://wiki.dovecot.org/Quota/1.1 for examples.
>
Ok i look this page and i try various configuration.
//
TO be sure i made queries on mysql
mysql> SELECT concat('*:storage=', quota_kb, 'k') AS quota_rule FROM
virtual_users where email='bla at domain.com';
+---------------+
| quota_rule |
+---------------+
| *:storage=20k |
+---------------+
1 row in set (0.00 sec)
mysql> select * from virtual_users where email='bla at domain.com';
+----+-----------+----------------------------------+-----------------------+----------+----------------+
| id | domain_id | password |
email | quota_kb | quota_messages |
+----+-----------+----------------------------------+-----------------------+----------+----------------+
| 1 | 1 | xxxxxxxxxxxxxxxxxxxxxxxx | bla at domain.com | 20
| 0 |
+----+-----------+----------------------------------+-----------------------+----------+----------------+
1 row in set (0.01 sec)
I add this line in dovecot-sql.conf
user_query = SELECT concat('*:storage=', quota_kb, 'K') AS quota_rule
FROM virtual_users WHERE email = '%u'
I don't change dovecot.conf file.
I spent the quota value has 20K in mysql voluntarily on behalf
'bla at domain.com' . But unfortunately I always reload after a 100M quota.
Are you a idea ?
PS ( if i do SELECT home , uid, gid concat('*:storage=', quota_kb, 'K')
AS quota_rule FROM virtual_users WHERE email = '%u ) it doesn't work too .
Best Regards ,
Mickael
More information about the dovecot
mailing list