[Dovecot] [Re: Dovecot - with LDAP auth backend]

Shahmat Dahlan shahmatd at sains.com.my
Tue Mar 20 06:46:53 EET 2007


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 at iki.fi>
Subject: Re: [Dovecot] Dovecot - with LDAP auth backend
To: Dovecot Mailing List <dovecot at dovecot.org>
Message-ID: <33A1EA34-1CDD-4924-906C-6D47F1354382 at 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 at sains.com.my>
Subject: [Dovecot] Dovecot - with LDAP auth backend
To: dovecot at dovecot.org
Message-ID: <45FE508C.8070305 at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: shahmatd.vcf
Type: text/x-vcard
Size: 401 bytes
Desc: not available
Url : http://dovecot.org/pipermail/dovecot/attachments/20070320/20f8ffba/attachment.vcf 


More information about the dovecot mailing list