[Dovecot] Quotas and LDAP

Stephan Müller smueller at chronox.de
Sun Jun 11 20:18:52 EEST 2006


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.   |


More information about the dovecot mailing list