Hello, I'd be interested in seeing a CDB based backend for the userdb/passdb lookups. Is anyone working on this? Is there any documentation (other than the wiki Design section and the code itself) on implementing database backends? thanks Luca
On Thu, 2010-04-29 at 15:17 +0200, Luca Corti wrote:> Hello, > > I'd be interested in seeing a CDB based backend for the userdb/passdb > lookups. > > Is anyone working on this?Not that I'm aware of.> Is there any documentation (other than the > wiki Design section and the code itself) on implementing database > backends?I guess you saw http://wiki.dovecot.org/Design/AuthProcess? It's probably out of date though.. What kind of a database is CDB? How are the fields saved there? I'm just wondering if maybe this should be a lib-dict backend and the auth process could support dict as passdb/userdb. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20100429/428cd4b1/attachment-0002.bin>
On Thu, 2010-04-29 at 20:36 +0300, Timo Sirainen wrote: Hi Timo,> I guess you saw http://wiki.dovecot.org/Design/AuthProcess? It's > probably out of date though..Yes, I'd target 2.0, since that's what I will be using anyway. Is the documentation still relevant?> What kind of a database is CDB? How are the fields saved there? I'm just > wondering if maybe this should be a lib-dict backend and the auth > process could support dict as passdb/userdb.CDB is a simple binary read-optimized key value store. http://cr.yp.to/cdb/cdb.txt It supports atomic database replacement, which is nice when you have to update the database on the fly. Postfix supports it for lookup tables. The basic idea would be to use username as the key and everything else as attribute which can be parsed after a successful lookup. I guess the format of the value may even be the same as passwd-file but the key. ciao Luca
I'd be interested in this, too. It might be a nicer way for smaller sites to share between Dovecot and Postfix. CDB is a read-only (C meaning constant) dictionary file designed by DJB. To update it, build a new one and swap. Alternatively, use 2 or more DBs with the CDB having the bulk of information and a smaller dynamic DB first having the day's changes. Then the bulk data can be rebuilt daily overnight. Another even simpler "DB" would be a directory index. The directory is the DB. The key selects a file name. The data is the file contents. I'll leave it to your imagination how to update it. It could be a simple "small first in line" DB out of 2 or more. On Thu, Apr 29, 2010 at 9:17 AM, Luca Corti <luca at fantacast.it> wrote:> Hello, > > I'd be interested in seeing a CDB based backend for the userdb/passdb > lookups. > > Is anyone working on this? Is there any documentation (other than the > wiki Design section and the code itself) on implementing database > backends? > > thanks > > Luca > >