SuperMail ResourceEditor Plugin Example

This example shows you how to create a plugin for the ResourceEditor. The example is a plugin to edit user entries, but the steps can be followed to create plugins to edit group and organizational unit entries.

Step 1. Define a new object class called SuperMailUser and update the directory server

> This has been done in the `SuperMailSchema.conf` file. In order to update the directory server with this schema, the file must be first copied to the `<server-root>/slapd-<servername>/config` directory. Suppose you have installed the Netscape Directory Server in `/usr/netscape/server4` and named the server as `corporate`. The directory to copy the `SuperMailSchema.conf` file is then `/usr/netscape/server4/slapd-corporate/config`. In addition, you must edit `/usr/netscape/server4/slapd-corporate/config/ns-schema.conf` file to include the `SuperMailSchema.conf` file. Once this is done, restart the directory server to pick up the new schema information.

Step 2. Modify the default object classes for users to include the SuperMailUser object class

> The `AddSuperMailUser.ldif` file contains the necessary changes to modify the entry at dn: cn=user, cn=defaultObjectClassesContainer, ou=4.0, ou=Admin, ou=Global Preferences, ou=mcom.com, o=NetscapeRoot. This entry is used by the ResourceEditor to determine which object classes need to be edited for a user. Note that the ou=mcom.com should be changed to whatever domain name was used during installation of Console/Directory. To modify the default object classes for users, first modify the `AddSuperMailUser.ldif` file as necessary, then do an `ldapmodify -f AddSuperMailUser.ldif`.

Step 3. Add the resource editor extension class for the SuperMailUser object class

> The `SuperMailUser.ldif` file contains the necessary changes to add the entry at dn: cn=superMailUser, cn=ResourceEditorExtension, ou=4.0, ou=Admin, ou=Global Preferences, ou=mcom.com, o=NetscapeRoot. This entry is used by the ResourceEditor to instantiate the plugins for editing an user entry. Note that the ou=mcom.com should be changed to whatever domain name was used during the installation of Console/Directory. To add the resource editor extension, first modify the `SuperMailUser.ldif` file as necessary, then do an `ldapmodify -a -f SuperMailUser.ldif`.

Step 4. Copy the jar files to `<server-root>/java/jars` directory

> To get this example working, copy the `SuperMailUGPlugin.jar` and `SuperMailUGPlugin_en.jar` files to the `<server-root>/java/jars` directory. Using the above example of an installation at `/usr/netscape/server4`, the target directory is `/usr/netscape/server4/java/jars`.

Step 5. Start the console

> In keeping with the current example, run `/usr/netscape/server4/startconsole`.