Developing and installing custom components

Almost anything can be changed in Mireka without modifying Mireka source code, just by adding new Java classes for example in a jar and initializing these new objects in the configuration files. Particularly useful are the filters, which can alter the processing of a mail immediately within the SMTP transaction.

The API for developing custom filters and recipient specifications is the mireka.filter package.

Filters

For an overview about the filter mechanism, see the Filters section.

A filter consists of two classes. FilterType is referenced in the configuration files. It is a factory, which create a new Filter instance for every mail transaction.

For simple filters, which doesn't have to preserve state between SMTP commands, extend the StatelessFilterType class. This implements both the FilterType and Filter interfaces. For more complex cases, implement FilterType, and in another (maybe inner-) class extend AbstractFilter. The built-in filters can be used as example.

Installation

Place your jars and compiled classes into MIREKA_HOME/lib and MIREKA_HOME/classes respectively.

If you created a filter or other component which may be useful for others, consider submitting it as a patch.