Extend James

Custom Mailet

See the mailet page for more information.

Custom Matcher

See the matcher page for more information.

SMTP Hook

See the SMTP Hook page for more information.

Mailbox Store

See the mailbox project for more information.

Mailbox Listeners

See the mailbox project for more information.

See the mailbox listeners for configuring additional mailbox listeners.

Queue

Queue Listeners

Extension and Guice wiring

This section does not concern the Spring / server/app wiring.

Guice applications let you load several type of user defined components. These components include:

Given a custom maven module implementing one or more of the following APIs, first create a jar-with-dependencies of your module. Then copy the jar-with-dependencies into the ./extensions-jars folder of your guice James server installation.

Note: Transitive dependency resolution is only done if you are packaging your extension into a jar-with-dependencies. Your extension class-loader will be the modified one (James and extensions-jars content) but James class-loader stays unmodified everywhere else.

Once done, you need to explicitly require James to load your extensions. This needs to be done in the following configuration files:

Also, it is possible to register additional Guice bindings, that are applied as a Guice child injector for creating extensions.

Note: Extensions are loaded in their own classpath to avoid breaking James server but they can retrieve James services to implement their business logic.

To do so, write an Module with the additional guice bindings you need. Then package it as a jar-with-dependencies, and copy the jar-with-dependencies within the extensions-jars folder of your James installation, as you will do for any other extension.

Then register your additional Guice modules for extensions within the extensions.properties configuration file.

Note: No Guice extensions will be applied upon Guice extension module invocation.

This enables injections defined in your Module into all extensions.