Paul J Stevens wrote:
Aaron, Ilja,
Been looking into the ldap code to see how much work it is to finish
this code.
First off, I see a couple of functions that access userdata currently
implemented in db.c:
accessing dbmail_users:
db_get_quotum_used
should be easily moved
db_set_quotum_used
same here
db_add_quotum_used
same here
db_check_quotum_used
same here
db_calculate_quotum_all
hmmm, is more difficult. For LDAP, we would need some mix of SQL queries
and LDAP queries. Best solution would probably be to write a function in
db.c does the query with that calculation. This function would then be
called by the code in authldap.c/authsql.c
db_get_users_from_clientid
should be easy
db_icheck_mailboxes
we can probably take this function out as we move toward using only
database systems which support foreign keys.
db_acl_get_identifiers
This would have to be split up between an "auth"-part and an SQL part.
accessing dbmail_aliases:
db_get_deliver_from_aliases
db_addalias
db_addalias_ext
db_removealias
db_removealias_ext
db_get_user_aliases
Should all be quite easy.
I'm guessing these should probably be renamed, moved to auth/authsql.c
and also be implementated in authldap.c, right? Of course, some of
them (db_calculate_quotum_all) are not quite so straight forward.
Am I missing anything really obvious here?
I don't think so.
I'm therefor proposing that all functions accessing userdata should
become part of the auth-module.
Agree?
It sounds right.. but:
I'd like to see this worked out in detail. We've been thinking about
this before, and I remember something about it not being as simple and
straightforward as one would've liked..
For instance:
where do you store domain aliases? (or do we already have a solution for
that that I'm not aware of?)
There is another way of doing it, but that involves some duplication of
information.
We can keep a simpler dbmail_users table around, without things like
password information. This would help us, because we can still use
foreign keys etc to get rid of all mailboxes and messages a user has
when removing the user.
OTOH, we would have to come up with a way of updating data between LDAP
and DB.
Ilja
--
Ilja Booij
IC&S B.V.
Stadhouderslaan 57
3583 JD Utrecht
www.ic-s.nl
T algemeen: 030 6355730
T direct: 030 6355739
F: 030 6355731
E: [EMAIL PROTECTED]