[Dovecot] Dovecot - with LDAP auth backend
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 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
participants (2)
-
Shahmat Dahlan
-
Timo Sirainen