In addition to the child elements discussed above, the SpoolManager tag can have several
processor children. It is these tags and their children that define the processor tree
for the SpoolManager.
Each processor has a required attribute, name. The value of this attribute must be
unique for each processor tag. The name of a processor is significant. Certain processors are required
(specifically root and error). The name "ghost" is forbidden as a processor name, as it is used to denote
a message that should not undergo any further processing.
The James SpoolManager creates a correspondance between processor names and the "state" of a mail as defined
in the Mailet API. Specifically, after each mailet processes a mail, the state of the message is examined. If
the state has been changed, the message does not continue in the current processor. If the new state is "ghost"
then processing of that message terminates completely. If the new state is anything else, the message is
re-routed to the processor with the name matching the new state.
The root processor is a required processor. All new messages that the SpoolManager finds on the spool are
directed to this processor.
The error processor is another required processor. Under certain circumstances James itself will redirect messages
to the error processor. It is also the standard processor to which mailets redirect messages when an error
condition is encountered.
The transport and spam processors are two useful, but optional, processors that are included in the out of
the box configuration. These processors include logic for actual mail delivery and spam handling respectively. More
information on these processors can be found in the default config.xml.
Each processor element has zero or more mailet child elements. Each of these elements describes a
matcher/mailet pair. The ordering of the mailet children is crucial to the configuration, as
it is the order in which pairs will be traversed in the processor.
It is this mailet element that is at the core of the SpoolManager configuration.