| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <html> |
| <head> |
| <title>James Server - |
| James 2.3 - Configuring the SpoolManager</title> |
| <style type="text/css" media="all"> |
| @import url("./css/maven-base.css"); |
| @import url("./css/maven-theme.css"); |
| @import url("./css/site.css"); |
| </style> |
| <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
| </head> |
| <body class="composite"> |
| <div id="banner"> |
| <a href="http://james.apache.org/index.html" id="bannerLeft"> |
| |
| <img src="images/james-server-logo.gif" alt="" /> |
| |
| </a> |
| <a href="http://www.apache.org/index.html" id="bannerRight"> |
| |
| <img src="images/asf-logo-reduced.gif" alt="" /> |
| |
| </a> |
| <div class="clear"> |
| <hr/> |
| </div> |
| </div> |
| <div id="breadcrumbs"> |
| |
| |
| |
| |
| |
| |
| |
| <div class="xleft"> |
| Last Published: 09/02/2009 |
| </div> |
| <div class="xright"> <a href="../../index.html">JAMES Project</a> |
| | |
| <a href="../../server/index.html">Server</a> |
| | |
| <a href="../../mailet/index.html">Mailets</a> |
| | |
| <a href="../../jspf/index.html">jSPF</a> |
| | |
| <a href="../../mime4j/index.html">Mime4J</a> |
| | |
| <a href="../../jsieve/index.html">JSieve</a> |
| | |
| <a href="../../postage/index.html">Postage</a> |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| <div class="clear"> |
| <hr/> |
| </div> |
| </div> |
| <div id="leftColumn"> |
| <div id="navcolumn"> |
| |
| |
| |
| |
| |
| |
| |
| <h5>James Server</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="../index.html">Overview</a> |
| </li> |
| |
| <li class="none"> |
| <a href="../design_objectives.html">Objectives</a> |
| </li> |
| |
| |
| |
| |
| |
| <li class="expanded"> |
| <a href="../FAQ.html">James FAQ</a> |
| <ul> |
| |
| <li class="none"> |
| <a href="../james_and_sendmail.html">James and Sendmail</a> |
| </li> |
| </ul> |
| </li> |
| |
| <li class="none"> |
| <a href="http://wiki.apache.org/james">Wiki</a> |
| </li> |
| |
| <li class="none"> |
| <a href="../rfclist.html">Useful RFCs</a> |
| </li> |
| </ul> |
| <h5>Overview</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="index.html">Introduction</a> |
| </li> |
| |
| <li class="none"> |
| <a href="release-notes.html">Release Notes</a> |
| </li> |
| </ul> |
| <h5>Concepts</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="summary.html">Summary</a> |
| </li> |
| |
| <li class="none"> |
| <a href="spoolmanager.html">SpoolManager</a> |
| </li> |
| |
| <li class="none"> |
| <a href="repositories.html">Repositories</a> |
| </li> |
| |
| <li class="none"> |
| <a href="mailet_api.html">The Mailet API</a> |
| </li> |
| </ul> |
| <h5>How to...</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="build_instructions.html">Build James</a> |
| </li> |
| |
| <li class="none"> |
| <a href="installation_instructions.html">Install James</a> |
| </li> |
| </ul> |
| <h5>Configuration</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="dns_configuration.html">DNS Server</a> |
| </li> |
| |
| <li class="none"> |
| <a href="pop3_configuration.html">POP3 Server</a> |
| </li> |
| |
| <li class="none"> |
| <a href="smtp_configuration.html">SMTP Server</a> |
| </li> |
| |
| <li class="none"> |
| <a href="nntp_configuration.html">NNTP Server</a> |
| </li> |
| |
| <li class="none"> |
| <a href="fetchmail_configuration.html">FetchMail</a> |
| </li> |
| |
| <li class="none"> |
| <a href="remotemanager_configuration.html">RemoteManager</a> |
| </li> |
| |
| <li class="none"> |
| <strong>SpoolManager</strong> |
| </li> |
| |
| <li class="none"> |
| <a href="serverwide_configuration.html">Server-wide</a> |
| </li> |
| |
| <li class="none"> |
| <a href="adding_users.html">Adding Users</a> |
| </li> |
| |
| <li class="none"> |
| <a href="provided_matchers.html">Provided Matchers</a> |
| </li> |
| |
| <li class="none"> |
| <a href="provided_mailets.html">Provided Mailets</a> |
| </li> |
| </ul> |
| <h5>Common Configurations</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="smtp_auth.html">Using SMTP AUTH</a> |
| </li> |
| |
| <li class="none"> |
| <a href="using_database.html">Using a Database with James</a> |
| </li> |
| |
| <li class="none"> |
| <a href="usingTLS.html">Using TLS/SSL</a> |
| </li> |
| |
| <li class="none"> |
| <a href="mailing_lists.html">Creating Mailing Lists</a> |
| </li> |
| </ul> |
| <h5>Customization</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="custom_matcher.html">How to write a custom Matcher</a> |
| </li> |
| |
| <li class="none"> |
| <a href="custom_mailet.html">How to write a custom Mailet</a> |
| </li> |
| </ul> |
| <h5>Project</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="changelog.html">Changelog</a> |
| </li> |
| </ul> |
| <h5>Project Documentation</h5> |
| <ul> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="collapsed"> |
| <a href="project-info.html">Project Information</a> |
| </li> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <li class="collapsed"> |
| <a href="project-reports.html">Project Reports</a> |
| </li> |
| </ul> |
| <h5>Project</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="http://issues.apache.org/jira/browse/JAMES">Bug Database</a> |
| </li> |
| |
| <li class="none"> |
| <a href="http://svn.apache.org/viewvc/james/server/">Source Code</a> |
| </li> |
| |
| <li class="none"> |
| <a href="../todo.html">TODO</a> |
| </li> |
| </ul> |
| <h5>Downloads</h5> |
| <ul> |
| |
| <li class="none"> |
| <a href="../../download.cgi">Stable releases</a> |
| </li> |
| |
| <li class="none"> |
| <a href="../../downloadunstable.cgi">Unstable releases</a> |
| </li> |
| |
| <li class="none"> |
| <a href="http://people.apache.org/builds/james/nightly/">Nightly builds</a> |
| </li> |
| </ul> |
| <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy"> |
| <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img> |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| </div> |
| <div id="bodyColumn"> |
| <div id="contentBox"> |
| |
| |
| |
| |
| |
| <a name="SpoolManager Configuration"></a><div class="section"><h2>SpoolManager Configuration</h2> |
| <p>The SpoolManager is controlled by a single configuration block in the config.xml. |
| The spoolmanager tag defines the boundaries of the configuration block. The behavior of |
| the SpoolManager, most importantly the routing of mail messages through the processor tree, |
| is controlled by this block.</p> |
| |
| <p>The spoolmanager tag has only one children. It is:</p> |
| <ul> |
| <li><strong>threads</strong> - This is a required positive integer element. It specifies |
| the number of threads the SpoolManager will use to process messages in the spool. This |
| parameter tends to substantially impact performance, so it is advisable to tune it in production |
| configurations.</li> |
| </ul> |
| |
| Spoolmanager depends on mailet and matcher packages, configured by these tags: |
| <ul> |
| <li><strong>mailetpackages</strong> - This is a required container tag. It contains some number |
| of <strong>mailetpackage</strong> children. The body of each of these <strong>mailetpackage</strong> |
| elements is a Java package name. It is these packages that contain the classes to be instantiated |
| as mailets.</li> |
| <li><strong>matcherpackages</strong> - This is a required container tag. It contains some number |
| of <strong>matcherpackage</strong> children. The body of each of these <strong>matcherpackage</strong> |
| elements is a Java package name. It is these packages that contain the classes to be instantiated |
| as matchers.</li> |
| </ul> |
| |
| The remaining SpoolManager configuration elements are complex enough to require a more in-depth |
| discussion. |
| |
| <a name="Processor Configuration"></a><div class="section"><h3>Processor Configuration</h3> |
| In addition to the child elements discussed above, the SpoolManager tag can have several |
| <strong>processor</strong> children. It is these tags and their children that define the processor tree |
| for the SpoolManager. |
| <p>Each processor has a required attribute, <strong>name</strong>. 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.</p> |
| <p>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.</p> |
| <p>The root processor is a required processor. All new messages that the SpoolManager finds on the spool are |
| directed to this processor.</p> |
| <p>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.</p> |
| <p>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.</p> |
| <p>Each processor element has zero or more <strong>mailet</strong> child elements. Each of these elements describes a |
| matcher/mailet pair. The ordering of the <strong>mailet</strong> children is crucial to the configuration, as |
| it is the order in which pairs will be traversed in the processor.</p> |
| <p>It is this <strong>mailet</strong> element that is at the core of the SpoolManager configuration.</p> |
| </div> |
| <a name="The Mailet Tag"></a><div class="section"><h3>The Mailet Tag</h3> |
| <p>Consider the following simple <strong>mailet</strong> tag:</p> |
| <mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor"><br></br> |
| <processor>spam</processor><br></br> |
| </mailet><br></br> |
| <p>The mailet tag has two required attributes, <strong>match</strong> and <strong>class</strong>.</p> |
| <p>The <strong>match</strong> attribute is set to the value of the specific Matcher class to be instantiated with a an |
| optional argument. If present, the argument is separated from the Matcher class name by an '='. Semantic |
| interpretation of the argument is left to the particular mailet.</p> |
| <p>The <strong>class</strong> attribute is set to the value of the Mailet class that is to be instantiated.</p> |
| <p>Finally, the children of the <strong>mailet</strong> tag define the configuration that is passed to the Mailet. The |
| tags used in this section should have no attributes or children. The names and bodies of the elements will be passed to |
| the mailet as (name, value) pairs.</p> |
| <p>So in the example above, a Matcher instance of RemoteAddrNotInNetwork would be instantiated, and the value "127.0.0.1" |
| would be passed to the matcher. The Mailet of the pair will be an instance of ToProcessor, and it will be passed the (name, value) |
| pair of ("processor", "spam").</p> |
| <p>James includes a number of pre-packaged Mailets and Matchers. A list of provided Mailets may be found |
| <a href="provided_mailets.html">here</a>. A list of provided Matchers may be found <a href="provided_matchers.html">here</a>.</p> |
| </div> |
| </div> |
| |
| |
| </div> |
| </div> |
| <div class="clear"> |
| <hr/> |
| </div> |
| <div id="footer"> |
| <div class="xright">© |
| 2002-2009 |
| |
| The Apache Software Foundation |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| <div class="clear"> |
| <hr/> |
| </div> |
| </div> |
| <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> |
| </script> |
| <script type="text/javascript"> |
| _uacct = "UA-1384591-1"; |
| urchinTracker(); |
| </script> |
| </body> |
| </html> |