[Dovecot] userdb static & Quota from LDAP?
Christian Schmidt
Christian.Schmidt at chemie.uni-hamburg.de
Mon Sep 12 19:03:35 EEST 2011
Hello Timo,
Timo Sirainen, 12.09.2011 (d.m.y):
> On Fri, 2011-09-09 at 23:58 +0200, Christian Schmidt wrote:
> > userdb {
> > driver = static
> > args = uid=vmail gid=vmail home=/var/maildir/%u
> > }
>
> These can be replaced with global settings:
>
> mail_uid = vmail
> mail_gid = vmail
> mail_home = /var/maildir/%u
>
> > Now I'd like to add per-user quotas that will also be stored in the
> > LDAP directory, and I'm not sure how to put things together.
> > IMHO quota is the only "userdb information" requested from LDAP, and
> > I'd like to leave all the other "userdb pieces" as the are. I changed
> > the userdb definition to:
> > userdb {
> > driver = ldap
> > args = /etc/dovecot/conf.d/ldap-userdb.ext
> > }
> >
> > My /etc/dovecot/conf.d/ldap-userdb.ext contains (along other lines):
> >
> > user_attrs = uid=vmail,gid=vmail,home=/var/maildir/%u,mailQuota=quota=quota_rule=*:storage=%$
>
> Just set those global settings and drop uid/gid/home from here. Or you
> could get them working here too, but the syntax is slightly wrong:
>
> user_attrs = =uid=vmail, =gid=vmail, ..
>
> (With the above settings you're telling Dovecot that LDAP "uid" field
> will be assigned to Dovecot's "vmail" field, and the "gid" field
> immediately overrides it, and LDAP "home" field's value is set to
> Dovecot's "/var/maildir/%u" field.)
This is working now:
user_attrs = mailQuota=quota_rule=*:bytes=%$
Thank you, Timo!
Gruss/Regards,
Christian Schmidt
--
You're at the end of the road again.
More information about the dovecot
mailing list