Extending Saké Mail

Saké Mail can be extended using the mechanism described in the general Saké manual here. This document describes the specific extension beans that Saké Mail uses. Note that since extension beans can be mixed and matched, you can create configurations that use the most appropriate storage mechanism for each individual task. For example, you could create an installation that simply uses the default XML file modules for implementing all tasks, or you could set up a configuration that uses the default XML file storage mechanism for message storage, uses an SQL database for storing user options, and integrates with your existing address book framework via a custom Addresses bean.

The specific beans that your installation uses, and the parameters passed to them, are configured in your "mail.ini" file, described in more detail in the configuration section.

 

Addresses
The addresses bean is used for implementing the address book that Saké Mail provides. This bean comes in two flavors, "AddressesXMLFileBean" and "AddressesSQLBean". The default configuration incorporates "AddressesXMLFileBean". See the section on configuring Saké Mail with databases for information on how to configure "AddressesSQLBean".

 

PublicAddressesIndividual
PublicAddressesGroup
These beans are used for providing public address books if the "sake.mail.addressdirectories" configuration value is set to "public" or "both". Currently there is only one implementation of each of these beans, both for accessing an LDAP server. For more information on LDAP server configuration, see the LDAP connectivity documentation.

 

UserOptions
This bean implements the storage system for Saké Mail's options system. This bean comes in two flavors, "UserOptionsXMLFileBean" and "UserOptionsSQLBean". The default configuration incorporates "UserOptionsFileBean". See the section on configuring Saké Mail with databases for information on how to configure "UserOptionsSQLBean".

 

Accounts
This bean is used for storing the external accounts that a user has configured. Since this bean's companion, "ExternalAccount", requires file system storage for maintaining UIDL lists, this bean is only implemented as a file system bean, "AccountsXMLFileBean".

 

ExternalAccounts
This bean does the actual work of downloading messages from external POP3 accounts and returning them to Saké Mail, so that Saké Mail can deposit them into the "MessageStore" bean. This bean maintains a UIDL list for each external account that each user configures, which is implemented via simple XML files on the local file system. For this reason, this bean is only available in one flavor, "ExternalAccountsXMLFileBean".

 

MessageStore
Probably the most important extension bean that Saké Mail uses is the "MessageStore" bean. This bean handles the storage of all messages in Saké Mail. This bean is responsible for actually interacting with POP3 and IMAP servers for message storage. This bean is also responsible for storing messages in local folders if the context requires it, in POP3 local mode for instance. This bean comes in two flavors, the standard "MessageStoreXMLFileBean", and "MessageStoreSQLBean" for using an SQL database as a message storage back end. We strongly recommend that production environments use IMAP servers for efficient message retrieval rather than attempting to build enormous message database tables using the "MessageStoreSQLBean".

 

AlternateLogin
"AlternateLogin" beans can be used to intercept login parameters and observe or manipulate them before they are actually used to perform a login. For example, your users' mail accounts may be of the form "p-user", where "user" is the user's username. You can develop your own "AlternateLogin" bean that will intercept the authentication parameters and prepend "p-" to the beginning of the name that the user has entered into the "Username" box in the login form. Your bean has full control over the username, password, server, etc. "AlternateLogin" beans are also a popular way of routing users to the appropriate store server in large installations where multiple unique mail servers are in use. "AlternateLogin" beans are always custom-implemented by a given licensee, since Endymion Corporation provides only one example bean as an illustration of how to implement a custom login sequence.

Copyright © 1999 - 2002 Endymion Corporation
All rights reserved.
Carpe Noctem