Adding extra fields from an external source

Christian Rößner c at roessner-network-solutions.com
Tue Dec 2 10:15:07 UTC 2014


> Am 02.12.2014 um 01:02 schrieb Ian Allison <ifallison at gmail.com>:
> 
> Hi,
> 
> I have an existing (Open)LDAP which I'm using with dovecot and I would
> like to implement quotas. I have global quotas working, but I would like
> per user quotas similar to what is described in the wiki
> (http://wiki2.dovecot.org/Quota/Configuration#LDAP) My problem is that
> there is no obvious attribute in the schemas shipped in the RHEL/Centos
> 6 to hold the quota string.
> 
> Is it possible to get User database extra fields from an external
> source? e.g. flat file or MySQL table. I would like to pull everything
> else from LDAP but just fill out quota_rule from a different source.
> 
> I realize I could expand my LDAP but I'm wary of just importing some
> random schema. I've had mixed results doing that in the past (the qmail
> schema (http://www.zytrax.com/books/ldap/ape/qmail.html) was
> incompatible with my existing structure, and at the moment I'm using a
> hacked version of the linux quota project's LDAP schema
> (http://sourceforge.net/projects/linuxquota/) - I'd rather have
> something a bit more official). If there is a recommended schema that
> you guys use which is stable and works well I would like to give that a
> try.

You could write your own schema. I have done so for my OpenLDAP. You can make it AUXILIARY and make attributes MAY.

Example from my file:

# RNS - 1.3.6.1.4.1.31612
# LDAP - 1.3.6.1.4.1.31612.1
# Mail 1.3.6.1.4.1.31612.1.2
# Attributes - 1.3.6.1.4.1.31612.1.2.1
# ObjectClasses - 1.3.6.1.4.1.31612.1.2.2

…
attributetype ( 1.3.6.1.4.1.31612.1.1.1.6
  NAME 'rnsMSQuota'
  DESC 'An integer that represents the quota on a mailbox'
  EQUALITY integerMatch
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
…

objectclass ( 1.3.6.1.4.1.31612.1.1.2.2
  NAME 'rnsMSDovecotAccount'
  DESC 'Dovecot account for virtual domain mailboxes'
  SUP top AUXILIARY
  MAY ( ... $ rnsMSQuota $ ... $
  ) )
…

Christian
--
Bachelor of Science Informatik
Erlenwiese 14, 36304 Alsfeld
T: +49 6631 78823400, F: +49 6631 78823409, M: +49 171 9905345
USt-IdNr.: DE225643613, http://www.roessner-network-solutions.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://dovecot.org/pipermail/dovecot/attachments/20141202/b7cdcf71/attachment.sig>


More information about the dovecot mailing list