Just added a draft UsersLDAPRepository in the proposal subtree of CVS. Helpful comments welcome! Summary: Split existing UsersRepository into an interface (UsersRepository) and an implementation (UsersFSRepository). Amended UserManager to instantiate right implementation, nbased on JAMES.conf.xml. Added UsersLDAPRepository. Designed to be fairly flexible, as I expect it will have to work around existing directories and schemas. Basic structure is: 1) nominate a node in the directory as the root of the tree served by this instance of James <LDAPRoot> (example dc=apache, dc=org) 2) assign a node, named relative to the root, as this mailserver, eg cn=mailserver, dc=apache, dc-org (there may be more than one instance of james serving this subtree) James creates subnodes of this for LocalUsers and mailing-lists, e.g. cn=LocalUsers, cn=mailserver.apache.org, dc=apache, dc=org. (objectclass=rfc822MailGroup) 3) Specify the domain handled by this mailserver, e.g. apache.org 3) Users can be added (as attributes) to these nodes by remote manager. 4) If required (ie <ManageGroupAttribute>TRUE), James records mailhost/ list membership in user's object. 5) Passwords are checked against user's object. Password setting by remote manager is not implemented, use a dummy for adduser. There is one new method in interface UsersRepository, getDomains(), called by ReceipientIsLocal. This allows mailserver.apache.org to handle mail locally for, e.g. [EMAIL PROTECTED], while still returning the correct host name in SMTP and POP3 welcome messages. FS implementation returns null. I think this all works. Tests by others and with more realistic directories would be welcome. We may need to make this more flexible re schemas. I'm not convinced this is the most elegant solution. E.g. several store-related methods from UsersRepository don't do anything useful. Suggestions welcome. May also depend on what happens with Avalon. tested against OpenLDAP 1.2.11 Charles ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/> Problems?: [EMAIL PROTECTED]
