You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ie...@apache.org on 2012/05/07 18:00:47 UTC

svn commit: r1335084 [4/6] - in /james/site-cms/trunk/content: hupa/ jdkim/ jdkim/mailets/ jsieve/ jsieve/core/ jsieve/mailet/ jsieve/util/ jspf/ mailbox/ mailet/ mailet/ai/ mailet/api/ mailet/base/ mailet/crypto/ mailet/maven-mailetdocs-plugin/ mailet...

Added: james/site-cms/trunk/content/server/dev-provided-matchers.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-provided-matchers.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-provided-matchers.markdown (added)
+++ james/site-cms/trunk/content/server/dev-provided-matchers.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,211 @@
+
+James provides a number of implemented Matchers for use by James administrators in their configurations. These are primarily matchers that members of the James developer or user communities have found useful in their own configurations. A description of how to configure Matchers and use them in the James SpoolManager can be found [here](config-mailetcontainer.html) .
+<subsection name="All">
+Description: This matcher is the trivial one - it matches all mails being processed. All recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="AttachmentFileNameIs">
+Description: It can be used to refuse emails with SCR, PIF, EXE etc. attachments. It matches mails that has a file attachment with a file name meeting one of the supplied filters. All recipients are returned.
+
+Configuration string: A comma or space delimited list of file names. File names may start with a wildcard '*'. Example: *.scr,*.bat,*.pif,*.pi,*.com,*.exe<pre>
+&lt;mailet match="AttachmentFileNameIs=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="CommandForListserv">
+Description: The CommandForListserv matcher is used as a simple filter to recognize emails that are list server commands. It will match any email addressed to the list server host, as well as any email that is addressed to a user named &lt;prefix&gt;-on or &lt;prefix&gt;-off on any host. Only those matching recipients will be returned.
+
+Configuration string: An email address of the form &lt;prefix&gt;@&lt;host&gt;, where host is the hostname used for the listserver and prefix is the command prefix.<pre>
+&lt;mailet match="CommandForListserv=james-on@list.working-dogs.com" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="CommandForListservManager">
+Description: CommandListservMatcher is the matcher that pairs with the CommandListservManager mailet. It checks to see if the request is intended for the ListservManager, but doesn't guarantee that it is a valid command. Only those matching recipients will be returned.
+
+Configuration string: An email address.<pre>
+&lt;mailet match="CommandForListservManager=announce@localhost" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="CompareNumericHeaderValue">
+Description: Matches mails containing a header with a numeric value whose comparison with the specified value is true. If the header is missing in the message, there will be *no match* . All recipients are returned.
+
+Configuration string: The headerName, a comparison operator and the numeric headerValue to compare with, *space or tab delimited* .<pre>
+&lt;mailet match="CompareNumericHeaderValue= X-MessageIsSpamProbability &gt; 0.9" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="FetchedFrom">
+Description: A matcher intended for use with the FetchMail server. It matches a custom header (X-fetched-from) that is set by the FetchMail server. FetchMail sets this header to the name of the FetchPOP task which originally fetched the message. All recipients are returned.
+
+Configuration string: The name of the FetchMail task which originally fetched the message.<pre>
+&lt;mailet match="FetchedFrom=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="FileRegexMatcher">
+Description: A matcher which can be used to match on a attachment when the given regex match. All recipients are returned.
+
+Configuration string: A regex for match attachmentname.<pre>
+&lt;mailet match="FileRegexMatcher=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="HasAttachment">
+Description: Matches those messages with a MIME type of "multipart/mixed". All recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="HasHabeasWarrantMark">
+Description: Matches mails that have the Habeas Warrant (see http://www.habeas.com for details). All recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="HasHeader">
+Description: Matches mails that have the specified header. All recipients are returned.
+
+Configuration string: The name of the header whose presence determines the match.<pre>
+&lt;mailet match="HasHeader=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="HasMailAttribute">
+Description: Matches mails that have the specified Mail Attribute. All recipients are returned.
+
+Configuration string: The name of the Mail Attribute to match. For example:<br></br><pre>
+&lt;mailet match="HasMailAttribute=name" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="HasMailAttributeWithValue">
+Description: Matches mails that have the specified Mail Attribute and the specified MailAttribute value. All recipients are returned.
+
+MailAttributes are types of Object whereas the value specified in the Matcher condition is of type String. The toString() method is used to obtain a String representation of the Mail Attribute value for matching. The String.equals(String) method tests for a match.
+
+Configuration string: The name of the Mail Attribute to be matched, a comma and then the String value to be matched. For example:<br></br><pre>
+&lt;mailet match="HasMailAttributeWithValue=name, value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="HasMailAttributeWithValueRegex">
+Description: Matches mails that have the specified Mail Attribute and a MailAttribute value that matches the specified regular expression. All recipients are returned.
+
+MailAttributes are types of Object whereas the value specified in the Matcher condition is of type String. The toString() method is used to obtain a String representation of the Mail Attribute value for matching. The regular expression must follow Perl5 syntax.
+
+Configuration string: The name of the Mail Attribute to be matched, a comma and then the regular expression used to match the value against. For example:<br></br><pre>
+&lt;mailet match="HasMailAttributeWithValueRegex=name, regex" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="HostIs">
+Description: Matches mails that are sent to email addresses on hosts that are in the configuration list. Only recipients that are on one of the hosts are returned.
+
+Configuration string: A list of host names, comma or space delimited.<pre>
+&lt;mailet match="HostIs=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="HostIsLocal">
+Description: Matches mails that are sent to email addresses on local hosts. Only recipients that are on one of the local hosts are returned.
+
+Configuration string: None.
+</subsection><subsection name="InSpammerBlacklist">
+Description: Checks the mail against one of a number of mail-abuse.org IP lists. All recipients are returned
+
+Configuration string: One of three strings - "blackholes.mail-abuse.org", "relays.mail-abuse.org", or "dialups.mail-abuse.org".
+</subsection><subsection name="IsInWhiteList">
+Description: Matches recipients having the mail sender in the recipient's private whitelist. The recipient name is always converted to its primary name (handling aliases).
+
+Configuration string: The database name containing the white list table.
+<pre>
+&lt;mailet match="IsInWhiteList=db://maildb" class="ToProcessor"&gt;
+  &lt;processor&gt; transport &lt;/processor&gt;
+&lt;/mailet&gt;
+</pre></subsection><subsection name="IsSingleRecipient">
+Description: Matches those messages sent to only a single recipient. The single recipient is returned.
+
+Configuration string: None.
+</subsection><subsection name="NESSpamCheck">
+Description: A matcher derived from a Netscape Mail Server spam filter. If the matcher detects headers that indicate spam, the message is matched. All recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="RecipientIs">
+Description: Matches mails that are sent to one of the recipients on a specified list. Only matching recipients are returned.
+
+Configuration string: A list of recipient addresses, comma, tab, or space delimited.<pre>
+&lt;mailet match="RecipientIs=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="RecipientIsLocal">
+Description: Matches mails that are sent to email addresses on local hosts with users that have local acccunts. Only matching recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="RecipientIsOverFixedQuota">
+Description: Matches mails that are send to email addresses which are over the given quota. Only matching recipients are returned.
+
+Configuration string: The quota<pre>
+&lt;mailet match="RecipientIsOverFixedQuota=10m" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="RecipientIsRegex">
+Description: Matches mails that are send to email addresses which are matched given regex. Only matching recipients are returned.
+
+Configuration string: The quota<pre>
+&lt;mailet match="RecipientIsRegex=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="RelayLimit">
+Description: Counts the number of Received headers in the mail (each of which represents a server in the relay chain). If the number equals or exceeds the specified limit, the mail is matched. All recipients are returned.
+
+Configuration string: a positive integer that is the limit on the number of relays.<pre>
+&lt;mailet match="RelayLimit=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="RemoteAddrInNetwork">
+Description: Checks the remote address from which the mail was received against the configured list. If the address matches one on the list, the matcher considers it a match. All recipients are returned.
+
+Configuration string: A list of domain names, IP addresses, or wildcarded IP subnets of any class. The list may be comma or space delimited.<pre>
+&lt;mailet match="RemoteAddrInNetwork=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="RemoteAddrNotInNetwork">
+Description: Checks the remote address from which the mail was received against the configured list. If the address doesn't match one on the list, the matcher considers it a match. All recipients are returned.
+
+Configuration string: A list of domain names, IP addresses, or wildcarded IP subnets of any class. The list may be comma or space delimited.<pre>
+&lt;mailet match="RemoteAddrNotInNetwork=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SenderHostIs">
+Description: Matches mails where the host name in the address of the sender cannot be resolved. All recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="SenderInFakeDomain">
+Description: Matches mails where the host name in the address of the sender cannot be resolved. All recipients are returned.
+
+Configuration string: None.
+</subsection><subsection name="SenderIs">
+Description: Matches mails that are sent by one of the senders on a specified list. All recipients are returned.
+
+Configuration string: A list of sender addresses, comma, tab, or space delimited.<pre>
+&lt;mailet match="SenderIs=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SenderIsNull">
+Description: Matches mails that are sent by a null sender.
+
+Configuration string: none.<pre>
+&lt;mailet match="SenderIsNull" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SenderIsRegex">
+Description: Matches mails that are sent by one of the senders matched the given regex. All recipients are returned.
+
+Configuration string: A regex.<pre>
+&lt;mailet match="SenderIsRegex=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SizeGreaterThan">
+Description: Matches emails with a total message size (headers and body) greater than the specified limit. All recipients are returned.
+
+Configuration string: a positive integer followed by an 'm' or a 'k'. This is the maximum message size permitted specified in megabytes or kilobytes respectively.<pre>
+&lt;mailet match="SizeGreaterThan=1m" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SMTPAuthSuccessful">
+Description: Matches mails that are send from an authorized sender. All recipients are returned.
+
+Configuration string: none.<pre>
+&lt;mailet match="SMTPAuthSuccessful" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SMTPAuthUserIs">
+Description: Matches mails that are send from one of the given authorized senders. All recipients are returned.
+
+Configuration string: none.<pre>
+&lt;mailet match="SMTPAuthUserIs=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SubjectIs">
+Description: Matches emails with the specified subject. All recipients are returned.
+
+Configuration string: The string against which mail subject headers are matched.<pre>
+&lt;mailet match="SubjectIs=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="SubjectStartsWith">
+Description: Matches emails whose subject header starts with the specified string. All recipients are returned.
+
+Configuration string: The string against which mail subject headers are matched.<pre>
+&lt;mailet match="SubjectStartsWith=value" class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection><subsection name="UserIs">
+Description: Matches mails that are sent to email addresses that have userids that are in the configuration list. Only matching recipients are returned.
+
+Configuration string: A list of user names, comma or space delimited.<pre>
+&lt;mailet match="UserIs=value, value, .." class="&lt;any-class&gt;"&gt;
+</pre>
+</subsection>

Added: james/site-cms/trunk/content/server/dev-provided-smtp-hooks.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-provided-smtp-hooks.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-provided-smtp-hooks.markdown (added)
+++ james/site-cms/trunk/content/server/dev-provided-smtp-hooks.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,27 @@
+
+The following hooks are supported:
+<subsection name="AuthHook">
+Allows to hook in your code for authenticate users for sending mail via SMTP AUTH. You could for example query your own database table to see if a user should be allowed to send mail with the given username and password.
+</subsection><subsection name="ConnectionHandler">
+Allows to hook in your code on a new connection. So you could just drop it or do something else.
+</subsection><subsection name="HeloHook">
+Allows to hook in your code in the HELO and EHLO commands.
+</subsection><subsection name="MailHook">
+Allows to hook in your code in the MAIL command. Like checking the sender which was given with MAIL FROM: &lt;whatever@example&gt;
+</subsection><subsection name="MailParametersHook">
+Allows to hook in given parameters in the EHLO command.
+</subsection><subsection name="JamesMessageHook">
+Allow to hook in your code after the email was received via the DATA command and was marked for queuing by the CLRF.CRLF sequence. This will get executed right before the message will actual get queued.
+
+IMPORTANT: If you want to do heavy processing here and not want to reject the method based on a criteria you are most times better of to use the Mailet API!
+</subsection><subsection name="QuitHook">
+Allow to hook in your code in the QUIT command.
+</subsection><subsection name="RcptHook">
+Allows to hook in your code in the RCPT command. Like implementing a custom logic to check if the mail for a given recipient should get accepted or rejected.
+</subsection><subsection name="UnknownCmdHook">
+Allows to hook in your code on every unknown command.
+</subsection><subsection name="MailPriorityHandler">
+Allows to set priority on mails for the spool queues, depending on the destination domain.
+</subsection><subsection name="HookResultJMXMonitor">
+Allows to register a HookStatsMBean under JMX for every processed Hook. You will get statistics about the configured hooks via JMX
+</subsection>

Added: james/site-cms/trunk/content/server/dev-provided.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-provided.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-provided.markdown (added)
+++ james/site-cms/trunk/content/server/dev-provided.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,7 @@
+<subsection name="Provided Mailet">
+See the [provided mailets](dev-provided-mailets.html) page for more information.
+</subsection><subsection name="Provided  Matcher">
+See the [provided matchers](dev-provided-mailets.html) page for more information.
+</subsection><subsection name="Provided SMTP Hook">
+See the [provided SMTP Hooks](dev-provided-smtp-hooks.html) page for more information.
+</subsection>

Added: james/site-cms/trunk/content/server/dev.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev.markdown (added)
+++ james/site-cms/trunk/content/server/dev.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,94 @@
+ [](images/uml/org.apache.james-package_large.png) 
+ [Click to enlarge image](images/uml/org.apache.james-package_large.png) 
+
+James is a multi-protocol message processing and storage engine. James currently consists of:
+
+- Four mail protocol services: SMTP, POP3, IMAP4 and LMTP.
+
+- Support for SMTP Auth.
+
+- A remote administration server.
+
+- Support for TLS/SSL.
+
+- A mail processing engine that supports the Mailet API.
+
+- File-system message storage and a message storage interface to RDBMS's.
+
+- File-system user record storage and an experimental interface to LDAP directories.
+
+
+The mail protocol services use the mailbox librairies to fetch/store mails.
+
+When a mail arrives via SMTP, it gets processed by the SMTP services and is placed in a Apache ActiveMQ queue (ActiveMQ is the Java Messaging Service JMS implementation at Apache)
+
+This allow to decouple mail spooling from the rest of the incoming traffic.
+
+After being the put in the queue, the mailetcontainer is responsible to get the next mail to process from the ActiveMQ queue.
+
+The mailets defined in mailetcontainer.xml are applied to define if the mail is to be treated as a Local or Remote delivery.
+
+The Local and Remote deliveries are treated by their corresponding mailet.
+
+The LocalDelivery mailet uses the SieveMailet which uses the mailbox/message manager to store the mail.
+
+The result of the mail can be either:
+
+
+- Gets stored in the mailbox.
+
+- Gets relayed to another server.
+
+- Gets relayed to another server.
+
+- Gets bounced back if it can not be handle by the james instance (this may happen during a previous step)
+
+- Gets stored in the "mailstore" which is a special format for spam, virus,... (in future release, we may also store those mails in the mailbox).
+ [](images/uml/org.apache.james-package-detail_large.png) 
+ [Click to enlarge image](images/uml/org.apache.james-package-detail_large.png) 
+
+James uses many other components: Spring, ActiveMQ, OpenJPA, Netty, Jackrabbit, Derby...
+
+The modules can be classified into 3 categories:
+
+
+- API: They do not include implementation details, they do not have dependencies (or at most they have very common dependencies like mailet-api, javamail, commons-logging).
+
+- Library: They only depend on API modules or external jars. They don't depend on other internal libraries. These libraries should be shared by functions (no need to have a Library when it is used only by a function).
+
+- Functions: Everything else. It is harder to see a case of "direct" reuse of a function jar. Most times we'll only have code reuse. It is preferable to limit Function to Functions dependencies.
+
+LogEnabled interface as the preferred way, except for non-server code and classes that have no bean definition. LogEnabled should be used wherever logging is needed and no "session-scoped" Log is provided.
+<subsection name="Features">
+These are some of the currently implemented features:
+
+ * **Complete portability** * Apache James is be a 100% pure Java application based on the Java 2 platform and the JavaMail 1.4 API.
+
+ * **Protocol abstraction** * Unlike other mail engines, protocols are seen only like "communication languages" ruling comunications between clients and the server. Apache James is not be tied to any particular protocol but follow an abstracted server design (like JavaMail did on the client side)
+
+ * **Complete solution** * The mail system is able to handle both mail transport and storage in a single server application. Apache James works alone without the need for any other server or solution.
+
+ * **Mailet support** * Apache James supports the Apache Mailet API. A Mailet is a discrete piece of mail-processing logic which is incorporated into a Mailet-compliant mail-server's processing. This easy-to-write, easy-to-use pattern allows developers to build powerful customized mail systems. Examples of the services a Mailet might provide include: a mail-to-fax or mail-to-phone transformer, a filter, a language translator, a mailing list manager, etc. Several Mailets are included in the James distribution (see [documentation](dev-provided-mailets.html) ).
+
+ * **Resource abstraction** * Like protocols, resources are abstracted and, accessed through defined interfaces (JavaMail for transport, JDBC for spool storage or user accounts in RDBMS's, Apache Mailet API). The server is highly modular and reuse solutions from other projects.
+
+ * **Secure and multi-threaded design** * Based on well known frameworks such as Spring, ActiveMQ, OpenJPA, Netty,..., Apache James has a careful, security-oriented, full multi-threaded design, to allow performance, scalability and mission-critical use.
+
+Anything else you may want if you help us write it :-)
+</subsection><subsection name="Standards Compliance">
+It is the existence of published "open" standards which allows independant teams to develop interoperable software.
+
+James attempts to support a number of these standards most of which are IETF RFC's and in the areas covered by these standards the published standard is our requirements document.
+
+This sometimes leads to confusion where behaviour is not the subject of a relevant standard, or conflict where common (de-facto) behaviour is actually at odds with a supported standard.
+
+We believe that it is our responsibility to adhere to the published standard. If we allow our implementation to deviate it means that we are tacitly encouraging the situation whereby interoperability is no longer guarenteed by standards compliance alone, but also requires access to undocumented and possibly even commercially licenced technology. There is no easy route for a newcomer to aquire these secrets, and interoperabilty becomes something only available to the elite.
+
+The James policy for issues of non-compliance tries to tread the fine line between a pragmatic acceptance of other people's misinterpretation of the RFC's and an evangelical defence of open standards as the key to freedom of interoperation.
+
+In practice this policy is that certain well argued of cases of non-compliance which can be *safely* worked around, will be tolerated by James.
+
+In cases (like jira issue JAMES-344) where variance from a published standard is required it is desirable that this functionality is disabled in James by default, it must be prominently and clearly documented that this causes James to violate the relevant standard, and should be enabled by explicit configuration, making its use a conscious decision of the user rather than an decision taken by the James team.
+
+In cases where the required behaviour is not within the scope of any standard which James claims to support (such as behaviour which is a de-facto standard or an *internet draft* RFC but not yet subject of a *standards track* RFC) it is acceptable to implement the behaviour so long as it is adequately documented (for instance by refrence to an *internet draft* or other public document) and users can be clear about what to expect from James.
+</subsection>

Added: james/site-cms/trunk/content/server/feature-mailetcontainer.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-mailetcontainer.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-mailetcontainer.markdown (added)
+++ james/site-cms/trunk/content/server/feature-mailetcontainer.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,51 @@
+<subsection name="Introduction">
+James separates the services that deliver mail to James (i.e. SMTP, FetchMail) from the engine that processes mail after it is received by James. The SpoolManager component is James' mail processing engine. James' SpoolManager component is also called the Mailet container. It is these mailets and matchers that actually carry out mail processing.
+
+More on the configuration of the SpoolManager and the Mailet API can be found [here](config-mailetcontainer.html) .
+</subsection><subsection name="Matchers and Mailets">
+Core to the SpoolManager operation are Matchers and Mailets. A Matcher is a simple object that checks whether a mail message matches a particular condition. A mailet is another type object that processes an email message in some way. Some typical tasks appropriate for a mailet would be adding a header, delivering the message to a local repository, or handling remote delivery. Both the Matcher and Mailet APIs are public, allowing James users to write their own custom matchers and mailets. James comes with a large set of pre-built matchers and mailets.
+
+Matchers and mailets are used in pairs. At each stage in processing a message is checked against a matcher. The matcher will attempt to match the mail message. The match is not simply a yes or no issue. Instead, the match method returns a collection of matched recipients. If the this collection of matched recipients is empty, the mailet is not invoked. If the collection of matched recipients is the entire set of original recipients, the mail is then processed by the associated mailet. Finally, if the matcher only matches a proper subset of the original recipients, the original mail is duplicated. The recipients for one message are set to the matched recipients, and that message is processed by the mailet. The recipients for the other mail are set to the non-matching recipients, and that message is not processed by the mailet.
+</subsection><subsection name="Processors">
+One level up from the matchers and mailets are the processors. Each processor is a list of matcher/mailet pairs. During mail processing, mail messages will be processed by each pair, in order. In most cases, the message will be processed by all the pairs in the processor. However, it is possible for a mailet to change the state of the mail message so it is immediately directed to another processor, and no additional processing occurs in the current processor. Typically this occurs when the mailet wants to prevent future processing of this message (i.e. the mail message has been delivered locally, and hence requires no further processing) or when the mail message has been identified as a candidate for special processing (i.e. the message is spam and thus should be routed to the spam processor). Because of this redirection, the processors in the SpoolManager form a tree. The root processor, which must be present, is the root of this tree.
+</subsection><subsection name="SpoolManager">
+The SpoolManager continually checks for mail in the spool repository. When mail is first found in the repository, it is delivered to the root processor. Mail can be placed on this spool from a number of sources (SMTP, FetchPOP, a custom component). This spool repository is also used for storage of mail that is being redirected from one processor to another. Mail messages are driven through the processor tree until they reach the end of a processor or are marked completed by a mailet.
+
+More on configuration of the SpoolManager can be found [here](config-mailetcontainer.html) .
+
+Much of the power of James lies in the SpoolManager component. Custom matchers and mailets can be easily developed to address an administrator's particular needs. The processor tree can easily be configured to sort, filter, and deliver mail based on any number of criteria. Mail administrators new to James should spend some time learning how to configure the SpoolManager to meet their needs.
+</subsection><subsection name="Mailet API">
+The Mailet API is a simple API used to build mail processing applications. James is a Mailet container, allowing administrators to deploy Mailets (both custom and pre-made) to carry out a variety of complex mail processing tasks. In the default configuration James uses Mailets to carry out a number of tasks that are carried out deep in the source code of other mail servers (i.e. list processing, remote and local delivery).
+
+As it stands today, the Mailet API defines interfaces for both Matchers and Mailets.
+
+
+- Matchers, as their name would suggest, match mail messages against certain conditions. They return some subset (possibly the entire set) of the original recipients of the message if there is a match. An inherent part of the Matcher contract is that a Matcher should not induce any changes in a message under evaluation.
+
+- Mailets are responsible for actually processing the message. They may alter the message in any fashion, or pass the message to an external API or component. This can include delivering a message to its destination repository or SMTP server.
+
+The Mailet API is currently in its second revision. Although, the Mailet API is expected to undergo substantial changes in the near future, it is our aim that existing Mailets that abided purely by the prior Mailet API interfaces will continue to run with the revised specification.
+
+The Javadoc for the Mailet API can be found [here](http://james.apache.org/mailet/api/apidocs/) .
+
+James bundles a number of Matchers and Mailets in its distribution. Descriptions of provided matchers can be found [here](dev-provided-matchers.html) , while descriptions of provided mailets can be found [here](dev-provided-mailets.html) .
+
+You can read more on mailets on following web sites:
+
+
+-  [Mailet Site](http://james.apache.org/mailet/index.html) 
+
+-  [Mailet API](http://james.apache.org/mailet/api/index.html) 
+
+-  [Mailet Toolkit](http://james.apache.org/mailet/base/index.html) 
+
+-  [Mailet Crypto](http://james.apache.org/mailet/crypto/index.html) 
+
+-  [Mailet Sieve](http://james.apache.org/mailet/standard/index.html) 
+
+-  [Mailet Standard](http://james.apache.org/mailet/standard/index.html) 
+
+-  [Mailet Docs](http://james.apache.org/mailet/maven-mailetdocs-plugin/index.html) 
+
+-  [Server Mailets](/james-server-mailets-function/mailet-report.html) 
+</subsection>

Added: james/site-cms/trunk/content/server/feature-performance.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-performance.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-performance.markdown (added)
+++ james/site-cms/trunk/content/server/feature-performance.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,16 @@
+
+James can spool more than 100 mails per second (configured with Maildir mail storage).
+
+We ran following command (from postfix distribution) with only 10 dequeue threads.
+<pre>time smtp-source -A -C1500 -l 100 -m 100000 -s 500 -d -c -f user@domain.net -t te localhost:25 100000</pre>
+The result was:
+
+
+1. The queuing of the 100.000 emails took 8 minutes.
+
+1. The dequeueing of the 100.000 emails took 16 minutes.
+
+We thus have a throughput of more than **100 mails/second** .
+
+These numbers are obtained with the out-of-the-box configuration (not optimized). I you run for example (depends on JVM) with `-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods` , you may have 10.000 mails enqueued in 38 seconds, which represents **263 mails per second** .
+

Added: james/site-cms/trunk/content/server/feature-persistence.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-persistence.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-persistence.markdown (added)
+++ james/site-cms/trunk/content/server/feature-persistence.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,23 @@
+<subsection name="Introduction">
+The **Mailbox** persists users' Inbox, Sent Items, Trash... folders with their mails.
+
+The **Mail Repository Store** persists spam, error,... mails, so nothing to do with users visible mails.
+
+In case of database access, both Mailbox and Mail Repository Store use database connection defined via database.properties.
+</subsection><subsection name="Mailbox Persistence">
+Apache James Server uses the [Apache James Mailbox](http://james.apache.org/mailbox) storage system to store the users mailboxes.
+
+The mailbox library supports different persistence mecanisms: MailDir, Database (via JPA) and JCR.
+
+Mailbox persistence is configured in spring-beans.xml (by default JPA, you set the database connection properties in database.properties - can also be MailDir, JCR).
+</subsection><subsection name="Mail Repository Store Persistence">
+Available Mail Repository Store are defined in mailrepositorystore.xml. Each has an URL prefix (file, db, dbfile,...) that can be used in mailetcontainer.xml to define where to store spam,... mails (example: file://var/mail/error/).
+
+More information about the mailstores configuration can be found [here](config-mailrepositorystore.html) .
+
+Mail Repository Stores are distinguished by how they store data. There are five types of storage: File, Database, DBFile, MBox and JCR.
+</subsection>
+Read more on how to configure [domain persistence](config-domainlist.html) .
+
+Read more on how to configure [users persistence](config-users.html) .
+

Added: james/site-cms/trunk/content/server/feature-protocols.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-protocols.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-protocols.markdown (added)
+++ james/site-cms/trunk/content/server/feature-protocols.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,29 @@
+<subsection name="Introduction">
+Apache James is an open source project intended to produce a robust, flexible, and powerful enterprise class server that provides email and email-related services. It is also designed to be highly customizable, allowing administrators to configure Apache James to process email in a nearly endless variety of fashions.
+
+The standard Apache James distribution deploys inside the Spring dependency injection container. In addition to providing a robust server architecture for James, the use of Spring allows Apache James administrators to deploy their own applications inside the container. These applications can then be accessed during mail processing.
+
+The Apache James Server is implemented as a complete collection of servers and related components that, taken together, provide an email solution. These components are described below.
+</subsection><subsection name="SMTP Protocol">
+SMTP (Simple Mail Transport Protocol) is the standard method of sending and delivering email on the internet. Apache James provides a full-function implementation of the SMTP specification, with support for some optional features such as message size limits, SMTP auth, and encrypted client/server communication.
+
+More information on configuring the SMTP service can be found [here](config-smtp-lmtp.html) .
+</subsection><subsection name="IMAP4 Protocol">
+The IMAP4 protocol allows users to retrieve email messages. It is the method most commonly used by email clients to download and manage email messages.
+
+The Apache James version of the IMAP4 service is a simple and straightforward implementation that provides full compliance with the specification and maximum compatibility with common IMAP4 clients. In addition, Apache James can be configured to require SSL/TLS connections for IMAP4 client connecting to the server.
+
+More information on configuring the IMAP4 service can be found [here](config-imap4.html) .
+</subsection><subsection name="POP3 Protocol">
+The POP3 protocol allows users to retrieve email messages. It is the method most commonly used by email clients to download and manage email messages.
+
+The Apache James version of the POP3 service is a simple and straightforward implementation that provides full compliance with the specification and maximum compatibility with common POP3 clients. In addition, Apache James can be configured to require SSL/TLS connections for POP3 client connecting to the server.
+
+More information on configuring the POP3 service can be found [here](config-pop3.html) .
+</subsection><subsection name="FetchMail">
+FetchMail, unlike the other Apache James components, is not an implementation of an RFC. Instead, it's a component that allows the administrator to configure Apache James to retrieve email from a number of POP3 servers and deliver them to the local spool. This is useful for consolidating mail delivered to a number of accounts on different machines to a single account.
+
+More information on configuring FetchMail can be found [here](config-fetchmail.html) .
+</subsection><subsection name="JMX">
+JMX (Java Management Extension) is used for the management.
+</subsection>

Added: james/site-cms/trunk/content/server/feature-queue-priority.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-queue-priority.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-queue-priority.markdown (added)
+++ james/site-cms/trunk/content/server/feature-queue-priority.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,23 @@
+
+Priority is supported when James (de)queues the mails during the spooling process.
+
+For this just add a Mail attribute with name "MAIL-PRIORITY" to the mail you send.
+
+This mail header should use one of the following value:
+
+
+1. 0 for LOW-PRIORITY
+
+1. 5 for NORMAL-PRIORITY (default)
+
+1. 9 for HIGH-PRIORITY
+
+Default priority if no MAIL-PRIORITY attribute set is NORMAL-PRIORITY.
+
+There are two scenarios to set priority in the queue.
+
+
+- Write a [SMTP hook](dev-extend-smtp-hook.html) which sets the header and add the hook to smtphandler chain.
+
+- You could also add the header in a mailet to let remotedelivery pick it up again on redelivery.
+

Added: james/site-cms/trunk/content/server/feature-security.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-security.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-security.markdown (added)
+++ james/site-cms/trunk/content/server/feature-security.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,9 @@
+
+Apache James Server is configured by default to avoid being an SMTP open-relay.
+
+SMTP Auth and "Verify Identity" options are enabled when you install James ( [read more](config-smtp-lmtp.html) ).
+
+Apache James Server supports SSL/TLS ( [read more](config-ssl-tls.html) ).
+
+Apache James Server supports different user storage ( [read more](config-users.html) ) - LDAP support is partail (work in progress).
+

Added: james/site-cms/trunk/content/server/feature-smtp-hooks.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/feature-smtp-hooks.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/feature-smtp-hooks.markdown (added)
+++ james/site-cms/trunk/content/server/feature-smtp-hooks.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,11 @@
+
+The James SMTP Server Component allows to easy write your own code which will get executed in the SMTP-Transaction. Thats a bit different then using a Mailet a.k.a Mailet-API.
+
+To customize your SMTP Server, you have a few interfaces which helps you to "hook-in" a specific SMTP Command. That means your class which implements the given interface(s) will get called after the SMTP-Command was parsed and depending on your implementation it will handle it.
+
+As your code will get executed before the mail was even accepted. This can help you in many ways, most times its used for rejecting SPAM/Junk within the SMTP-Dialog. But it can be used for other things too.
+
+Its up to you and your use case.
+
+But be aware as your code needs to get executed during the SMTP-Transaction it should not take to long to execute. As it will need to fit in before the timeout was hit which can be different on every mail server. But as a general rule as long as your code can get executed within 30 seconds it should be fine.
+Read more on the [provided SMTP Hooks](dev-provided-smtp-hooks.html) .Read more on how to create your [own SMTP Hook](dev-extend-smtp-hook.html) .

Added: james/site-cms/trunk/content/server/index.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/index.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/index.markdown (added)
+++ james/site-cms/trunk/content/server/index.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,67 @@
+
+| <div id="tabs" style="min-width:550px;">
+
+-  [Apache James Server 3](#tabs-1) 
+
+-  [Advantages](#tabs-2) 
+<div id="tabs-1"><div class="ui-widget"><div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
+<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span><span style="font-weight:bold; color:white;">Hey! Apache James Server 3.0-beta4 is out - [Click here to Quick Start Apache James Server!.](quick-start.html) Some issues are identified in some use cases with clients such as Outlook Express,... You are kindly invited to report any issue on [https://issues.apache.org/jira/browse/JAMES](https://issues.apache.org/jira/browse/JAMES) or on our mailing list ( [http://james.apache.org/mail.html](http://james.apache.org/mail.html) )</span>
+</div></div>
+The Apache Java Mail Server Version 3.0 is a 100% pure Java SMTP, IMAP4 and POP3 Mail server designed to be a complete and portable enterprise mail engine solution. Apache James Server is based on currently available open protocols.
+
+This documentation is intended to be an introduction to the concepts behind the Apache James Server usage, as well as a guide to [install](install.html) , [configure](config.html) , [manage](manage.html) , [monitor](monitor.html) and [develop](dev.html) Apache James Server.
+
+Download Apache James Mail Server 3.0-beta4 and [quick-start](quick-start.html) it!
+
+<span class="minibutton btn-download"> [](http://james.apache.org/download.cgi#Apache_James_Server) </span>
+
+We also have snapshot builds for the braves (no guarantee!).
+
+<span class="minibutton btn-download"> [](http://people.apache.org/builds/james/nightly/) </span>
+
+Apache James Server 3.0 represents the leading edge of development. This codestream has many more features than the 2.3 code, but is not as well tested in production. Reasonable configuration compatibility has been retained with 2.3.2.
+
+Apache James Server 3.0 requires Java 1.5 but Java 1.6 is recommended. A migration guide for users willing to upgrade from 2.3 to 3.0 is [available](upgrade-2.3.html) .
+
+The NNTP News server and the Mailing List Manager present in Apache James Server 2.3 have been temporary removed from the 3.0 release line.
+</div><div id="tabs-2">
+ | <subsection name="Standard">
+100% pure Java Mail server designed to be a complete and portable enterprise mail engine solution.
+
+Supports currently available IETF protocols, including SMTP, LMTP, POP3 and IMAP4.
+
+Apache James Server is able to store user and message data either in a file-system (Maildir), any JPA-compatible database and even JCR, allowing fast, reliable, even real-time replicated storage.
+
+Provides a powerful, flexible mail application engine through support for the Apache Mailet API. With its Mailet pipeline architecture, Apache James Server can be used not only to provide standard e-mail services, but also to implement custom e-mail applications.
+</subsection> | <subsection name="Configureable">
+Configure the stores,... via the well-known Spring framework - [read more](config.html) .
+
+ ![](images/conf/config-example.png "") 
+</subsection>|
+ | <subsection name="Manageable">
+Manage domains, users,... via well-known JMX tools - [read more](manage.html) .
+
+ ![](images/jmx-management/jmx-user-part.png "") 
+</subsection> | <subsection name="Extensible">
+Apache James Server serves as a mail application platform.
+
+The Apache James Project hosts the Apache Mailet API, and provides the Mailet container. These features makes it easy to design, write, and deploy custom applications for mail processing.
+
+This modularity and ease of customization is one of Apache James' strengths, and can allow administrators to produce powerful applications surprisingly easily. - [read more](dev-extend.html) 
+</subsection>|
+ | <subsection name="Developer-Friendly">
+Apache James Server 3.0 is now built on top of Spring 3.0 in replacement of trunk version of the [Avalon](http://avalon.apache.org/) Application Framework. With Spring, We keep the good development practices introduced by Avalon such as Component Oriented Programming and Inversion of Control. The stable and robust Spring container provides a strong foundation for the Apache James Server.
+
+The internal and exposed APIs for this 3.0-beta4 release are under current validation and are expected to be subject to change - [read more](dev.html) .
+
+ ![](images/uml/org.apache.james-package-small.png "") 
+</subsection> | <subsection name="Performant">
+A special focuss has been brought to the performance: Apache James Server can process more than 100 mails per second. Deployed in production environments and has proven itself to be a robust and high performance mail solution. Tests indicate that version 3.0 is able to maintain a constant mail throughput rate of thousands of messages/minute for continuous periods - [read more](feature-performance.html) 
+
+ ![](images/jmx-monitoring/jmx-process-root.png "") 
+</subsection>|
+ | <subsection name="Secured">
+Apache James Server is a secured mail server by default - [read more](feature-security.html) .
+</subsection> | |
+</div></div> |
+

Added: james/site-cms/trunk/content/server/install.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/install.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/install.markdown (added)
+++ james/site-cms/trunk/content/server/install.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,88 @@
+<subsection name="Java Virtual Machine">
+James requires a Java Runtime Environment. Java version 1.5 or higher is required to run the James application. The exact JREs available depend on the platform. In addition, the environment variable JAVA_HOME should be set to the JRE home directory before running James.
+
+James 3.0 has been successfully tested on OpenJDK, Sun JDK and IBM JDK
+</subsection><subsection name="User Privileges">
+On Linux/Unix platforms, root access will be required to run James (access to ports below 1024 is generally restricted to the root user). As SMTP, POP3, and IMAP4 need to open server sockets on such ports in standard configurations, James requires root access.
+
+On Windows platforms, you also need to run James as Administrator privilege.
+</subsection><subsection name="Libc6">
+On Linux, to run the startup/shutdown script via the 'james' command, you also need `libc6` (on Ubuntu for example: `sudo apt-get install libc6-i386 libc6-dev-i386` ).
+</subsection><subsection name="System Resources">
+Obviously James also requires sufficient disk space, processor power, and network bandwidth. But, other than what's been discussed here, it has no additional special requirements.
+
+James is configured to run with 512 MB RAM (-Xmx512M in the bat/sh) available, but may need more or less depending on the load. With the default configuraiton, JVM can use until 512M (It does not mean it will do). It really depends on your traffic, and also which mailbox you will use (you can save much memory if you don't use the default embedded derby database but an external database of your choice). Work is still done to minimize the needed memory.
+</subsection><subsection name="Step 1: Download James">
+Obtain the full James binary (or source) distribution from the [James release mirrors](http://james.apache.org/download.cgi) .
+
+If you have downloaded a binary distribution, you do not need to build James. Proceed directly to Step 2.
+
+If you have downloaded a source package, process first to the [build](dev-build.html) and come back to Step 2.
+</subsection><subsection name="Step 2: Deploy James">
+Unpack the archive into your James installation directory.
+</subsection><subsection name="Step 3: Configure James">
+After unpacking the binary, the next step is to adjust the initial configuration. All configuration files are embedded in jars. We ship in the conf foler template configuration files.
+
+You can override the default configuration : copy the conf folder any ...-template... you need and update according to your needs.
+
+Additional system files reside under the./conf/META-INF folder.
+
+The out of the box configuration makes certain assumptions and has some default values that are unlikely to be appropriate for real-world servers. There are a few issues that should be addressed immediately upon installation:
+
+
+- Postmaster Address - Change according to your need - [read more](config-system.html) .
+
+- Most UNIX systems require superuser privileges to open sockets below 1024, which includes the IANA-standard SMTP (on port 25), POP3 (on port 110) and IMAP4 (on port 143). These default ports can be changed in the conf file (read for [pop3](config-pop3.html) , [smtp](config-smtp.html) and [imap4](config-imap4.html) . Obviously, you would then need to reconfigure your clients. This may not be an option if you want to receive mail from external mail servers.
+
+In addition to adjusting these parameters, you may wish to consult the documentation for a discussion of all other configurations. A list of such configurations, as well as the steps necessary to configure them, can be found [here](config.html) .
+</subsection><subsection name="Step 4: Start James">
+Go to the bin subdirectory of the installation directory and run `$ ./james start` .
+
+Running `$ ./james help` help will provide the list of commands you can invoke.
+
+Once started, you'll see in the log file (./logs/james-server.log) that James is running. This means that Spring has loaded James and is now waiting for a request.
+</subsection><subsection name="Step 5: Create Domains and Users">
+Finally, after launch, it will be necessary to create domain and user accounts before the James server will be fully operational. Read instructions on creating [domains](manage-domains.html) and [user accounts](manage-users.html) .
+
+Since at the beginning James is empty, it will not have any domain (except the default one)nor local users registered.
+
+To register a local domain and user, cd bin and type james-cli.sh. Follow the given instructions
+
+Invoke "james-cli.sh adddomain &lt;mydomain.tls&gt; &lt;mydomain.tls&gt; is the domain name of the domain you wish to create.
+
+Invoke "james-cli.sh adduser &lt;user&gt; &lt;password&gt;" where &lt;user&gt; is the user name and &lt;password&gt; is the password of the account you wish to create.
+
+Please note that the user name MUST be a complete email address of the form &lt;user&gt;@&lt;domain&gt; (where &lt;domain&gt; is any of the values specified in the &lt;servernames&gt; block of XMLDomainList or a domain defined via the [domain management](manage-domains.html) ).
+</subsection><subsection name="Step 6: Test James">
+Once you have some local users registered, try sending mail to one of them with SMTP (port 25).
+<pre>
+$ telnet 127.0.0.1 25
+Trying 127.0.0.1...
+Connected to localhost.
+Escape character is '^]'.
+220 172.16.1.131 SMTP Server (JAMES SMTP Server 3.0-beta4) ready Sat, 6 Nov 2010 17:31:33 +0100 (CET)
+ehlo test
+250-172.16.1.131 Hello test (aoscommunity.com [127.0.0.1])
+250-PIPELINING
+250-ENHANCEDSTATUSCODES
+250 8BITMIME
+mail from:&lt;YOUR_NAME@YOUR_DOMAIN&gt;
+250 2.1.0 Sender &lt;YOUR_NAME@YOUR_DOMAIN&gt; OK
+rcpt to:&lt;YOUR_NAME@YOUR_DOMAIN&gt;
+250 2.1.5 Recipient &lt;YOUR_NAME@YOUR_DOMAIN&gt; OK
+data
+354 Ok Send data ending with &lt;CRLF&gt;.&lt;CRLF&gt;
+subject: test
+
+this is a test
+.
+250 2.6.0 Message received
+quit
+Connection closed by foreign host.
+</pre>
+Try now to retrieve that mail using POP3 (port 110) or IMAP (port 143).
+
+Trace out James actions in ./logs/james-server.log.
+
+Actions that will be taken by James on incoming mail are configured in the mailet pipe line (./conf/mailetcontainer.xml). Look at it if you want to understand what's happening.
+</subsection>

Added: james/site-cms/trunk/content/server/manage-domains.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/manage-domains.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/manage-domains.markdown (added)
+++ james/site-cms/trunk/content/server/manage-domains.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,21 @@
+
+Domain accounts are shared across services. A common Domain repository is shared across James services. That is, once you've created a POP3 mail and set a password, that same is available for authenticated SMTP and NNTP.
+
+If you have JPADomainList (default setup), you can add, delete and list the domains.
+
+If you have XMLDomainList for example, you can only list the available domains. To add a domain, you must add it in the domainlist.conf file.
+
+Invoke "james-cli.sh adddomain &lt;mydomain.tls&gt; &lt;mydomain.tls&gt; is the domain name of the domain you wish to create.
+
+That's it. Your domains are now created and can be used by all James services.
+
+Use and JMX client to access the DomainList management function.
+
+The managed objects are exposed from localhost only (for security reasons) on the following URL:
+
+ `service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi` 
+
+If you want a remote access, you can install a web application management tool such as jmanage. You will get screens such as the following one.
+
+ ![](images/jmx-management/jmx-domainlist.png "") 
+

Added: james/site-cms/trunk/content/server/manage-recipientrewrite.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/manage-recipientrewrite.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/manage-recipientrewrite.markdown (added)
+++ james/site-cms/trunk/content/server/manage-recipientrewrite.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,160 @@
+
+To rewrite recipients, you need to create some "mappings".
+
+You will rewrite any recipient to an existing or a non-existing server account.
+
+So read "mapping allows to rewrite a 'fromAny(Existing/NotExisting) user and/or domain' to a 'toAny(Existing/NotExisting)Account'".
+
+'An existing account' means an account defined in the Apache James Server.
+
+You can also use regular expressions and wildcards (*) for the 'fromAny'.
+
+The available methods exposed in the management interface are the following:
+<pre>
+    /**
+     * Add regex mapping
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param regex
+     *            the regex.
+     */
+    void addRegexMapping(String user, String domain, String regex) throws Exception;
+
+    /**
+     * Remove regex mapping
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param regex
+     *            the regex.
+     */
+    void removeRegexMapping(String user, String domain, String regex) throws Exception;
+
+    /***
+     * Add address mapping
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param address
+     *            the address.
+     */
+    void addAddressMapping(String user, String domain, String address) throws Exception;
+
+    /**
+     * Remove address mapping
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param address
+     */
+    void removeAddressMapping(String user, String domain, String address) throws Exception;
+
+    /**
+     * Add error mapping
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param error
+     */
+    void addErrorMapping(String user, String domain, String error) throws Exception;
+
+    /**
+     * Remove error mapping
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param error
+     * @return true if successfully
+     */
+    void removeErrorMapping(String user, String domain, String error) throws Exception;
+
+    /**
+     * Add domain mapping
+     * 
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param targetDomain
+     *            the target domain for the mapping
+     * @return true if successfully
+     */
+    void addDomainMapping(String domain, String targetDomain) throws Exception;
+
+    /**
+     * Remove domain mapping
+     * 
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param targetDomain
+     *            the target domain for the mapping
+     * 
+     * @return true if successfully
+     */
+    void removeDomainMapping(String domain, String targetDomain) throws Exception;
+
+    /**
+     * Return the explicit mapping stored for the given user and domain. Return
+     * null if no mapping was found
+     * 
+     * @param user
+     *            the username
+     * @param domain
+     *            the domain
+     * @return the collection which holds the mappings.
+     */
+    Collection&lt;String&gt; getUserDomainMappings(String user, String domain) throws Exception;
+
+    /**
+     * Try to identify the right method based on the prefix of the mapping and
+     * add it.
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param mapping
+     *            the mapping.
+     */
+    void addMapping(String user, String domain, String mapping) throws Exception;
+
+    /**
+     * Try to identify the right method based on the prefix of the mapping and
+     * remove it.
+     * 
+     * @param user
+     *            the username. Null if no username should be used
+     * @param domain
+     *            the domain. Null if no domain should be used
+     * @param mapping
+     *            the mapping.
+     */
+    void removeMapping(String user, String domain, String mapping) throws Exception;
+
+    /**
+     * Return a Map which holds all mappings. The key is the user@domain and the
+     * value is a Collection which holds all mappings
+     * 
+     * @return Map which holds all mappings
+     */
+    Map&lt;String, Collection&lt;String&gt;&gt; getAllMappings() throws Exception;
+    </pre>
+Not available in this release.
+
+Use and JMX client to access the Virtual User management function.
+
+The managed objects are exposed from localhost only (for security reasons) on the following URL:
+
+ `service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi` 
+

Added: james/site-cms/trunk/content/server/manage-users.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/manage-users.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/manage-users.markdown (added)
+++ james/site-cms/trunk/content/server/manage-users.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,19 @@
+
+User accounts are shared across services. A common user repository is shared across James services. That is, once you've created a POP3 mail account and set a password, that same account is available for authenticated SMTP and NNTP.
+
+Invoke "james-cli.sh adduser &lt;user&gt; &lt;password&gt;" where &lt;user&gt; is the user name and &lt;password&gt; is the password of the account you wish to create.
+
+Please note that the user name MUST be a complete email address of the form &lt;user&gt;@&lt;domain&gt; (where &lt;domain&gt; is any of the values specified in the &lt;servernames&gt; block of XMLDomainList or a domain defined via the [domain management](manage-domains.html) ).
+
+That's it. Your users are now created and can be used by all James services.
+
+Use and JMX client to access the Users management function.
+
+The managed objects are exposed from localhost only (for security reasons) on the following URL:
+
+ `service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi` 
+
+If you want a remote access, you can install a web application management tool such as jmanage. You will get screens such as the following one.
+
+ ![](images/jmx-management/jmx-user.png "") 
+

Added: james/site-cms/trunk/content/server/manage.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/manage.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/manage.markdown (added)
+++ james/site-cms/trunk/content/server/manage.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,53 @@
+
+You need to make sure that your user/domain/mail repository configuration is correct before managing. If you change your user/domain/mail repository type (i.e. file to database) or the configuration of your user repository (i.e. the file or database URL) after you have added user/domain/mail, you may lose your user/domain/mail data. Please change these values with care.
+
+After you've done this, restart James to ensure that any changes you've made in the configuration are incorporated into the running system.
+
+You are now ready to manage [Domains](manage-domains.html) , [Users](manage-users.html) and [Recipient Rewrite Table](manage-recipientrewrite.html) .
+
+You can manage James via:
+
+
+1.  [CLI (Client Line Interface)](#Manage_via_CLI) 
+
+1.  [JMX (Java Management Extension)](#Manage_via_JMX) 
+<subsection name="Manage via CLI">
+Once James is up and listening, managing via the command line interface is simple.
+
+cd bin
+
+./james-cli.sh (or james-cli.bat on windows) ./james-cli.sh -h localhost -p 9999
+
+You will be shown with a list of commands.
+<pre>
+  usage: java org.apache.james.cli.ServerCmd --host &lt;arg&gt; &lt;command&gt;
+    -h,--host &lt;/arg&gt;   node hostname or ip address
+    -p,--port &lt;/arg&gt;   remote jmx agent port number
+  Available commands:
+    adduser &lt;/username&gt; &lt;/password&gt;
+    removeuser &lt;/username&gt;
+    listusers
+    adddomain &lt;/domainname&gt;
+    removedomain &lt;/domainname&gt;
+    listdomains
+      </pre>
+Note the address and port defined in conf/jmx.properties (default is jmx.address=127.0.0.1 and jmx.port=9999)
+</subsection><subsection name="Manage via JMX">
+James can be managed via JMX.
+
+The managed objects are exposed from localhost only (for security reasons) on the following URL:
+
+ `service:jmx:rmi://localhost/jndi/rmi://localhost:999/jmxrmi ` 
+
+Simply launch jconsole to access the exposed attributes and methods.
+
+If you want a remote access, change 'localhost' to your server hostname in the previous URL:
+
+ `service:jmx:rmi://localhost/jndi/rmi://localhost:999/jmxrmi ` 
+
+To manage through a firewall, you will have to take care to random ports creation (read [JMX agent](http://docs.oracle.com/javase/6/docs/technotes/guides/management/agent.html) , [JMX through firewall](http://olegz.wordpress.com/2009/03/23/jmx-connectivity-through-the-firewall) and [Getting Java JMX to work through firewalls properly](http://blogs.law.harvard.edu/hoanga/2006/07/07/getting-java-jmx-to-work-through-firewalls-properly) .
+
+You can install a web application management tool such as jmanage. You will get screens such as the following one.
+
+ ![](images/jmx-management/jmx-domainlist.png "") 
+</subsection>

Added: james/site-cms/trunk/content/server/monitor-folders.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/monitor-folders.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/monitor-folders.markdown (added)
+++ james/site-cms/trunk/content/server/monitor-folders.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,56 @@
+<subsection name="Monitor ./var Folder Usage">
+The directory structure in ./var is shown hereafter.
+<pre>
+mail
++-error
++-address-error
++-relay-denied
++-spam
+
+store
++-maildir
++-derby
++-jackrabbit
++-activemq
+  +-brokers
+    +-james
+  +-blob-transfer
+    +-outgoing
+    +-spool
+</pre>
+The $JAMES_ROOT/var folder is the place where James Server writes and reads the files it needs to achieve its functions.
+
+There should be two folders in var:
+
+
+- mail
+
+- store
+
+The mail folder does NOT contain the users mails (look at store folder (or your external database) to find the mailboxes). The mail folder contains the mails rejected during the spooling (depending on mailetcontainer.xml configuration). Sub folders of var/mail can be address-error, error, relay-denied, spam
+
+The store folder contains the files related to database, jcr, activemq,... needed by James. James Server default settings comes with a embedded Derby database that stores the users, domains and mailboxes (the user mails) (see store/derby folder).
+
+Of course, if you changed database.properties and still use a database for the mailboxes, you will have to look for the users, domains and mailboxes in your database, whatever, wherever it is.
+
+You can find in store folder sub-folders such as:
+<pre>
+activemq
++-brokers
+  +-james
++-blob-transfer
+  +-outgoing
+  +-spool
+</pre>
+The activemq component is configured to use this folder for queue (and topics if any) processing.
+<pre>
+maildir
+</pre>
+You can configure James to use MailDir as storage for the user mailboxes. Use var/store/maildir folder to contain the user's mails.
+<pre>
+jackrabbit
+</pre>
+You can configure James to use JCR (Java Content Repository, based on Apache Jackrabbit) as storage for the user mailboxes. Use var/store/jackrabbit folder to contain the user's mails.
+</subsection><subsection name="Monitor tmp Folder Usage">
+For some certain functions, James uses the system temporary folder (/tmp on linux). The system temp can be populated with some temporary files, but James should remove them after a short time.
+</subsection>

Added: james/site-cms/trunk/content/server/monitor-jmx.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/monitor-jmx.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/monitor-jmx.markdown (added)
+++ james/site-cms/trunk/content/server/monitor-jmx.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,47 @@
+
+You can monitor James Server via JMX.
+
+The managed objects are exposed from localhost only (for security reasons) on the following URL:
+
+ `service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi` 
+
+Simply launch jconsole to access the exposed attributes and methods. Active Connections active per component, limits,... can be displayed and following services can be monitored:
+
+
+- IMAP
+
+- POP3
+
+- SMTP
+
+- LMTP
+
+- RemoteManager
+
+- DNSService
+
+- Queues
+
+If you want to access the JXM server from a remote location, you can [configure the hostname and port](config-system.html) on which James listens to.
+
+You can enable satistics collection for SMTP/LMPT/POP3 Servers via JMX. Configure for example smtpserver.xml with
+<pre>
+&lt;handler class="org.apache.james.smtpserver.jmx.ConnectHandlerResultJMXMonitor"/&gt;
+&lt;handler class="org.apache.james.smtpserver.jmx.LineHandlerResultJMXMonitor"/&gt;
+&lt;handler class="org.apache.james.smtpserver.jmx.CommandHandlerResultJMXMonitor"/&gt;
+&lt;handler class="org.apache.james.smtpserver.jmx.HookResultJMXMonitor"/&gt; (only for smtp)
+    </pre>
+ ![](images/jmx-monitoring/jmx-org.apache.james.smtpserver.JamesDataCmdHandler.png "") 
+
+You can enable satistics collection for SMTP/LMPT/POP3 Servers via JMX. Configure for example smtpserver.xml with
+
+ ![](images/jmx-monitoring/jmx-org.apache.james.smtpserver.JamesDataCmdHandler.png "") 
+
+If you want a remote access, you can install a web application management tool such as jmanage. You will get screens such as the following one.
+
+ ![](images/jmx-monitoring/jmx-current-connections.png "") 
+
+ ![](images/jmx-monitoring/jmx-memory.png "") 
+
+ ![](images/jmx-monitoring/jmx-gc.png "") 
+



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org