[Dovecot] Quotas and LDAP
Hi, first of all, it is very nice that dovecot has quotas now! Thank you very much. Now, I want to use quotas with LDAP requests, but I am having the following issues. First, contrary to what is written in the Wiki about quota and LDAP ("# quotaStorage must be in the format mentioned above, # For example: dirsize:storage=10240"), it is possible to have an LDAP field with just a number in it. The configuration in dovecot-ldap.conf looks like: user_attrs = homedir=home,uidnumber=uid,primaryGroupID=gid,quotanumber=quota=maildir:storage This works (as tested - I guess, it works as long as the quota entry is the last entry) and you also see it in the logs: Jun 11 19:10:36 inet dovecot: auth(default): master out: USER^I8^Ismueller^Iuid= 76340^Igid=513^Iquota=maildir:storage=90000000^Ihome=/home/dozenten/smueller/ Question now: is this intended (meaning, is this configuration possibility here to stay)? If yes, can you please update the wiki? Second issue: according to the description, the quota number is the size in KB. Is there a chance to change it to bytes? Reason: I am using Postfix with the VDA extension. There, the quota is to be given in bytes. Now, as lazy as I am, I only want to maintain one value for the quota. As I personally think that a quota given in bytes is more flexible, I would ask whether the following change can be made to dovecot: --- quota-maildir.c.orig 2006-06-11 19:15:55.000000000 +0200 +++ quota-maildir.c 2006-06-11 19:16:13.000000000 +0200 @@ -526,7 +526,7 @@ for (; *args != '\0'; args++) { if (strncmp(*args, "storage=", 8) == 0) { - size = strtoull(*args + 8, NULL, 10) * 1024; + size = strtoull(*args + 8, NULL, 10); if (size != 0) root->message_bytes_limit = size; root->master_message_limits = TRUE; Thanks Stephan -- | Those that bite the hand that feeds them are | | doomed to lick the boot that kicks them. |
On Sun, 2006-06-11 at 19:35 +0200, Stephan Müller wrote:
user_attrs = homedir=home,uidnumber=uid,primaryGroupID=gid,quotanumber=quota=maildir:storage .. Question now: is this intended (meaning, is this configuration possibility here to stay)? If yes, can you please update the wiki?
I didn't think such kludgyness was possible. :) But yes, I guess it'll stay unless I want to prevent it for some reason at some point. I don't really see why I would want to do that though.. I'll update the wiki.
Second issue: according to the description, the quota number is the size in KB. Is there a chance to change it to bytes?
I think it's usually shown and set in kilobytes pretty much everywhere. But if enough people think setting it as bytes is better, I'm fine with changing it. But I need more opinions before changing anything :)
On Sunday 11 June 2006 19:59, Timo Sirainen wrote:
On Sun, 2006-06-11 at 19:35 +0200, Stephan Müller wrote:
user_attrs = homedir=home,uidnumber=uid,primaryGroupID=gid,quotanumber=quota=maildi r:storage
..
Question now: is this intended (meaning, is this configuration possibility here to stay)? If yes, can you please update the wiki?
I didn't think such kludgyness was possible. :) But yes, I guess it'll stay unless I want to prevent it for some reason at some point. I don't really see why I would want to do that though.. I'll update the wiki.
Thanks :-)
Second issue: according to the description, the quota number is the size in KB. Is there a chance to change it to bytes?
I think it's usually shown and set in kilobytes pretty much everywhere. But if enough people think setting it as bytes is better, I'm fine with changing it. But I need more opinions before changing anything :)
Maybe it is possible to configure it?
For instance, a plain number is bytes, number plus k at the end is KB, and so on?
1000 -> 1000 bytes 1k -> 1 KB 1m -> 1 MB
Ciao Stephan
-- | Those that bite the hand that feeds them are | | doomed to lick the boot that kicks them. |
participants (2)
-
Stephan Müller
-
Timo Sirainen