Skip to content

Latest commit

 

History

History
95 lines (57 loc) · 4.01 KB

README.md

File metadata and controls

95 lines (57 loc) · 4.01 KB

Examples

This submodule shows how one can work with James.

Each subprojects illustrate a specific concept.

How to customize mail processing

At the heart of James lies the Mailet container, which allows mail processing. This is splitted into smaller units, with specific responsibilities:

  • Mailets: Are operations performed with the mail: modifying it, performing a side-effect, etc...
  • Matchers: Are per-recipient conditions for mailet executions
  • Processors: Are matcher/mailet pair execution threads

Once we define the mailet container content through the mailetcontailer.xml file. Hence, we can arrange James standard components to achieve basic logic. But what if our goals are more complex? What if we need our own processing components?

This example shows how to write such components!

Configure Custom Mailbox Listeners

Mailbox Listener is a component in James Mailbox System. Each time an action is applied on a mailbox(adding, deleting), or on an email(adding, deleting, updating flags...), then an event representing that action is generated and delivered to all the Listeners that had been registered before. After receiving events, listeners retrieve information from the events then execute their business (Indexing emails in OpenSearch, updating quota of users, detecting spam emails...)

Mailbox Listeners allow customizing the behaviour of James used as a Mail Delivery Agent (MDA).

This example shows how to write such components!

Configure Custom SMTP hooks

SMTP hooks allow integrating third party systems with the SMTP stack, allows writing additional SMTP extensions, for instance.

This example shows how to write such components!

Configure Custom SMTP commands

This subproject demonstrates how to write custom commands for Apache James SMTP server.

This example shows how to write additional SMTP commands!

Configure Custom WebAdmin routes

The current project demonstrates how to write custom webadmin routes for Apache James. This enables writing new administrative features exposed over a REST API. This can allow you to write some additional features, make James interact with third party systems, do advance reporting...

This example shows how to write additional Webadmin routes!

Configure Custom Healthchecks

This example demonstrates how to write custom healthchecks for Apache James. This enables writing new custom healthcheck that fits your monitoring need.

Configure Custom IMAP extensions

James supports customizing IMAP handling, as demonstrated in this example.

Write Custom James server assembly

This example demonstrates how to write a custom assembly in order to write your own tailor-made server.

This enables:

  • Arbitrary composition of technologies (example JPA mailbox with Cassandra user management)
  • Write any additional components
  • Drop any unneeded component
  • You have control on the dependencies and can reduce the classpath size

OIDC JMAP, IMAP and SMTP example with James

This example demonstrates how to configure OIDC for JMAP, IMAP and SMTP.

This example uses:

  • KeyCloack as an identity provider
  • Krakend as an API gateway to check JWT tokens
  • A LDAP as James user source
  • Thunderbird as a Mail User Agent. (version 91.4.1)

Of course alternative technologies can be used.

Auto-configuration of Mail User Agents

This example demonstrates how to deploy auto-configuration for various mail user agents.

Custom metric exporters

This example demonstrates how to set up custom metric exporters and demonstrate how to do so with Graphite.

HAProxy set up example

This example demonstrate how to set up the proxy protocol to preserve client origin IP address despite the use of a proxy.