Re: [Dovecot] [Re: Dovecot - with LDAP auth backend]
Hi Timo,
What I did actually was change option (D) to the following below, or do I have to remove this one altogether?
plugin { quota = maildir }
Then added the attribute mailquota=10240 as I had defined in my dovecot schema
And when I did a tried to run getquota "" or getquotaroot inbox (via telnet localhost 143), it would return me a "no quota" message.
What I am able deduce is that the mailquota attribute did not take effect at all.
Do you think I may have missed something out. And thanks for your prompt reply, really appreciate it.
Regards
Date: Mon, 19 Mar 2007 14:41:16 +0200 From: Timo Sirainen tss@iki.fi Subject: Re: [Dovecot] Dovecot - with LDAP auth backend To: Dovecot Mailing List dovecot@dovecot.org Message-ID: 33A1EA34-1CDD-4924-906C-6D47F1354382@iki.fi Content-Type: text/plain; charset="us-ascii"
On 19.3.2007, at 10.57, Shahmat Dahlan wrote:
(D) also in my /etc/dovecot.conf plugin { quota = maildir:storage=10240 }
This is used only as long as it's not overridden by userdb.
(E) in my /etc/dovecot-ldap.conf user_attrs =
homeDirectory=home,uidNumber=uid,gidNumber=gid,mailquota=quota
Here you override it.
See the LDAP example at the bottom of http://wiki.dovecot.org/Quota
Date: Mon, 19 Mar 2007 16:57:48 +0800 From: Shahmat Dahlan shahmatd@sains.com.my Subject: [Dovecot] Dovecot - with LDAP auth backend To: dovecot@dovecot.org Message-ID: 45FE508C.8070305@sains.com.my Content-Type: text/plain; charset="iso-8859-1"
I have the following installed (1) CentOS 2.6.9-42.ELsmp (2) dovecot-1.0-3_50.rc27.el4.at, (3) openldap-2.2.13-6.4E
(A) I have added the following schema into /etc/openldap/schema
attributetype ( 1.3.6.1.4.1.14237.1.1.1.1 NAME 'mailquota' DESC 'The size of space the user can have until further messages get bounced.' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
objectclass ( 1.3.6.1.4.1.14237.1.1.2.1 NAME 'DovecotUser' DESC 'Dovecot-LDAP User' SUP top AUXILIARY MUST ( cn $ uid $ mail $ mailquota $ userPassword ) MAY ( sn ) )
(B) and added this into my /etc/openldap/slapd.conf
include /etc/openldap/schema/dovecot.schema
(C) And in my /etc/dovecot.conf, this is what I have
protocol imap { mail_plugins = quota imap_quota mail_plugin_dir = /usr/lib/dovecot/imap }
(D) also in my /etc/dovecot.conf plugin { quota = maildir:storage=10240 }
(E) in my /etc/dovecot-ldap.conf user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,mailquota=quota user_filter = (&(objectClass=DovecotUser)(uid=%u)) pass_attrs = uid=user,userPassword=password
Scenario 1 I have (D) set to quota = maildir:storage=10240, did a telnet localhost 143, and logged in, this is what I get Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'.
- OK Mail ready a1 login ldapuser password a1 OK Logged in. a2 getquota ""
- QUOTA "" (STORAGE 0 10240) a2 OK Getquota completed.
if I were to change (D) to quota = maildir
And added in an attribute called "mailquota" in the entry uid=ldapuser,dc=mydomain,dc=com, give it a value 10240000 (is this correct? should it by in bytes or in kilobytes?), then reinitialize the mailbox by deleting the ~/Maildir directory (or in this case /home/ldapuser/Maildir) Did the telnet localhost 143, this is what I get instead Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'.
- OK Mail ready a1 login ldapuser password a1 OK Logged in. a2 getquota ""
- QUOTA "" () a2 OK Getquota completed.
Even after I've added the attribute mailquota in the ldap for the entry uid=ldapuser it still does not look like its taking any effect at all.
Regards and thanks in advance.
On Tue, 2007-03-20 at 12:46 +0800, Shahmat Dahlan wrote:
Hi Timo,
What I did actually was change option (D) to the following below, or do I have to remove this one altogether?
plugin { quota = maildir }
If the quota is returned always by LDAP userdb, then it doesn't matter at all if this is set or not, because it's always overridden.
Then added the attribute mailquota=10240 as I had defined in my dovecot schema ..
(E) in my /etc/dovecot-ldap.conf user_attrs =
homeDirectory=home,uidNumber=uid,gidNumber=gid,mailquota=quota
If your mailquota has only 10240, it gives Dovecot "quota=10240" setting which doesn't work.
See the LDAP example at the bottom of http://wiki.dovecot.org/Quota
See the examples here. You must have it return "quota=maildir:storage=10240" it Dovecot, one way or another.
mail_debug=yes could be helpful in looking at how Dovecot sees the "quota" value.
participants (2)
-
Shahmat Dahlan
-
Timo Sirainen