[Dovecot] Invalid quota rule using "backend"
Using a quota rule like "quota_rule = *:backend=1073741824S" (I'm testing it statically but the value is on LDAP) I receive an an error:
Fatal: IMAP(...): Quota root QUOTA: Invalid rule: *:backend=1073741824S
Accordingly with the wiki page http://wiki.dovecot.org/Quota/New "Backend-specific configuration currently is used only with Maildir++ quota backend. It means you can have the quota in Maildir++ format (e.g. "10000000S")." so I think it should work.
What's wrong?
Cheers, Laurento
In your LDAP configuration "user_attrs" line, use:
YourLDAPQuotaAttributeName=quota_rule=*:storage=%$
I'm not sure the word "backend" is actually a valid option,
-Rich
Laurento Frittella wrote:
Using a quota rule like "quota_rule = *:backend=1073741824S" (I'm testing it statically but the value is on LDAP) I receive an an error:
Fatal: IMAP(...): Quota root QUOTA: Invalid rule: *:backend=1073741824S
Accordingly with the wiki page http://wiki.dovecot.org/Quota/New "Backend-specific configuration currently is used only with Maildir++ quota backend. It means you can have the quota in Maildir++ format (e.g. "10000000S")." so I think it should work.
What's wrong?
Cheers, Laurento
Il giorno mar, 18/03/2008 alle 08.32 -0700, richs@whidbey.net ha scritto:
In your LDAP configuration "user_attrs" line, use:
YourLDAPQuotaAttributeName=quota_rule=*:storage=%$
I'm not sure the word "backend" is actually a valid option,
Do you mean dovecot automagically strips che "S" at the end of the value and consider the value in bytes?
Laurento
The default is Kilobytes, so you'll still need to use the S if you're storing the value in bytes,
-Rich
Laurento Frittella wrote:
Il giorno mar, 18/03/2008 alle 08.32 -0700, richs@whidbey.net ha scritto:
In your LDAP configuration "user_attrs" line, use:
YourLDAPQuotaAttributeName=quota_rule=*:storage=%$
I'm not sure the word "backend" is actually a valid option,
Do you mean dovecot automagically strips che "S" at the end of the value and consider the value in bytes?
Laurento
Il giorno mar, 18/03/2008 alle 08.49 -0700, richs@whidbey.net ha scritto:
The default is Kilobytes, so you'll still need to use the S if you're storing the value in bytes,
I know, but the same value is used by other apps so it isn't so simple :)
Reading the code I found that the "backend=" seems unsupported but it's strange because the wiki page is about the "new" quota (rewritten) version.
quota.c @ function quota_rule_parse_limits()
[...] if (strncmp(*args, "storage=", 8) == 0) { multiply = 1024; limit = &rule->bytes_limit; *limit = strtoll(*args + 8, &p, 10); } else if (strncmp(*args, "bytes=", 6) == 0) { limit = &rule->bytes_limit; *limit = strtoll(*args + 6, &p, 10); } else if (strncmp(*args, "messages=", 9) == 0) { limit = &rule->count_limit; *limit = strtoll(*args + 9, &p, 10); } else { *error_r = p_strdup_printf(root->pool, "Unknown rule limit name: %s", *args); return -1; } [...]
Any dovecot dev can confirm this inconsistency and eventually write a patch/fix for it? I think this feature can be useful in a migration context... like mine :)
Cheers, Laurento
On Tue, 2008-03-18 at 16:22 +0100, Laurento Frittella wrote:
Using a quota rule like "quota_rule = *:backend=1073741824S" (I'm testing it statically but the value is on LDAP) I receive an an error:
Fatal: IMAP(...): Quota root QUOTA: Invalid rule: *:backend=1073741824S
Accordingly with the wiki page http://wiki.dovecot.org/Quota/New "Backend-specific configuration currently is used only with Maildir++ quota backend. It means you can have the quota in Maildir++ format (e.g. "10000000S")." so I think it should work.
Il giorno mer, 19/03/2008 alle 07.34 +0200, Timo Sirainen ha scritto:
On Tue, 2008-03-18 at 16:22 +0100, Laurento Frittella wrote:
Using a quota rule like "quota_rule = *:backend=1073741824S" (I'm testing it statically but the value is on LDAP) I receive an an error:
Fatal: IMAP(...): Quota root QUOTA: Invalid rule: *:backend=1073741824S
Accordingly with the wiki page http://wiki.dovecot.org/Quota/New "Backend-specific configuration currently is used only with Maildir++ quota backend. It means you can have the quota in Maildir++ format (e.g. "10000000S")." so I think it should work.
Cheers, Laurento
participants (3)
-
Laurento Frittella
-
richs@whidbey.net
-
Timo Sirainen