I want to read quota size from LDAP, but I have a static value for home. How can I mix these? Right now, I have this LDAP configuration: user_attrs = uid=home=/var/mail/vhosts/%d/%n,gosaMailQuota=quota_rule=*:bytes=%$M which works fine, but looks up the uid attribute needlessly, and is not scalable: I have to pick a different, always-existing LDAP attribute for each static extra field that I want to set. Is there some LDAP configuration syntax like the SQL "SELECT '/var/...' AS home" ? Thanks, Anders.
On Sat, 2008-04-12 at 22:37 +0200, Anders wrote:> I want to read quota size from LDAP, but I have a static value for home. > How can I mix these? > > Right now, I have this LDAP configuration: > > user_attrs = > uid=home=/var/mail/vhosts/%d/%n,gosaMailQuota=quota_rule=*:bytes=%$M > > which works fine, but looks up the uid attribute needlessly, and is not > scalable: I have to pick a different, always-existing LDAP attribute for > each static extra field that I want to set. > > Is there some LDAP configuration syntax like the SQL "SELECT '/var/...' > AS home" ?Just drop the "uid", like: =home=/var/mail/.. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080417/4f5a758b/attachment-0002.bin>
That didn't work for me: user_attrs = =home=/var/dovecot-test/home/%n,uid=user (at /etc/dovecot/dovecot-ldap.conf) ( /etc/dovecot/dovecot.conf: mail_location = mbox:/var/dovecot-test/data/%n~%d:INBOX=/var/dovecot-test/%n~%d:INDEX=/var/dovecot-test-no-quotas/index/%n~%d ) neither: user_attrs = uid=user,=home=/var/dovecot-test/home/%n neither: user_attrs = =home=/var/dovecot-test/home/%n on the log it says: dovecot: auth(default): ldap(user0027 at mydomain.tld,1xx.xxx.xxx.x): user search: base=dc=mydomain,dc=tld scope=subtree filter=(&(objectclass=inetlocalmailrecipient)(mail=user0027 at mydomain.tld)) fields and at dovecot start up: Starting dovecot ILoading modules from directory: /usr/lib64/dovecot/modules/imap IModule loaded: /usr/lib64/dovecot/modules/imap/lib10_quota_plugin.so IModule loaded: /usr/lib64/dovecot/modules/imap/lib11_imap_quota_plugin.so IEffective uid=65534, gid=65534, home using dovecot-1.0.5-6 on OpenSuSE 10.3. thanks Arthritis Specialists in Magnetism Quality hand crafted jewelry with magnets. Necklaces, bracelets, shoe insoles and more. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=dfcb5a2d4f25ae3051a9c94d015f506b -- Powered by Outblaze
Timo Sirainen wrote:> On Sat, 2008-04-12 at 22:37 +0200, Anders wrote:>> user_attrs = >> uid=home=/var/mail/vhosts/%d/%n,gosaMailQuota=quota_rule=*:bytes=%$M >> > > Just drop the "uid", like: =home=/var/mail/..Hi. This is not documented, I think? Anyway, it does not really work, I guess it might be a bug. When I drop the attribute, the variables in the template are not interpolated, so I end up with home literally being "/var/mail/vhosts/%d/%n" for all lookups. cheers, Anders.