[Dovecot] 2.2.4 - Some questions about and needing help with quota-status

Axel Luttgens AxelLuttgens at swing.be
Thu Jul 18 12:25:55 EEST 2013


Hello,

I ended my previous message with :

> [...]
> Q3. What am I doing wrong?
> [...]

Given the details discussed in another thread (http://www.dovecot.org/list/dovecot/2013-July/091309.html), I tried by changing the user_query's SELECT from:

	user_query = \
	SELECT DISTINCT \
		nickname AS user, \
		mail_home AS home, \
		mail_location AS mail, \
		quota_rule AS quota_rule \
	FROM \
	[...]

to:

	user_query = \
	SELECT DISTINCT \
		nickname AS user, \
		coalesce(mail_home, '/_Mailstores/' || nickname) AS home, \
		mail_location AS mail, \
		'dict:Quota utilisateur:' || nickname || ':proxy::sql_quota' AS quota, \
		quota_rule AS quota_rule \
	FROM \
	[...]

while keeping dovecot.conf unchanged (see my previous message).

The idea is to not rely anymore on the expansion of %u (or %n or %d) in dovecot.conf, while still keeping the ability to have per-user settings.

Currently, a doveadm quota get -u john.doe yields:

	Quota name        Type    Value Limit               %
	Quota utilisateur STORAGE    31    34              91
	Quota utilisateur MESSAGE    23     -               0

So, let's ask quota-status what it believes about a message with a size of 100000.

The reply is still "action=OK", the dict server still isn't launched, and the log shows:

	auth: Debug: userdb out: USER	1	john.doe at example.com	home=/_Mailstores/john.doe	quota=dict:Quota utilisateur:john.doe:proxy::sql_quota	quota_rule=*:storage=35000b
	quota-status: Debug: auth input: john.doe at example.com home=/_Mailstores/john.doe quota=dict:Quota utilisateur:john.doe:proxy::sql_quota quota_rule=*:storage=35000b
	quota-status: Debug: Added userdb setting: plugin/quota=dict:Quota utilisateur:john.doe:proxy::sql_quota
	quota-status: Debug: Added userdb setting: plugin/quota_rule=*:storage=35000b
	quota-status(john.doe at example.com): Debug: Effective uid=999, gid=999, home=/_Mailstores/john.doe
	quota-status(john.doe at example.com): Debug: Quota root: name=Quota utilisateur backend=dict args=john.doe:proxy::sql_quota
	quota-status(john.doe at example.com): Debug: Quota rule: root=Quota utilisateur mailbox=* bytes=35000 messages=0
	quota-status(john.doe at example.com): Debug: Quota grace: root=Quota utilisateur bytes=3500 (10%)
	quota-status(john.doe at example.com): Debug: dict quota: user=john.doe, uri=proxy::sql_quota, noenforcing=0
	quota-status(john.doe at example.com): Debug: fs: root=/_Mailstores/john.doe/mboxes, index=, indexpvt=, control=, inbox=/_Mailstores/john.doe/mboxes/inbox, alt=

To rule out any other side-effects potentially introduced by the user_query, I even tried with the "nickname AS user" removed from the SELECT.

Even with that, the reply is "action=OK", the dict server still isn't launched, and the lines written to the log are undistinguishable from above ones...

It is to be noted that no lines in the log are related to possible problems encountered for launching it. It is a bit as if quota_check() in src/plugins/quota/quota-status.c always immediately returned with 1 at the first test.

Anyway, I'm still stuck.
And still very interested in replies to Q1, Q2 and Q3. ;-)

TIA,
Axel




More information about the dovecot mailing list