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 [3/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/config-ssl-tls.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/config-ssl-tls.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/config-ssl-tls.markdown (added)
+++ james/site-cms/trunk/content/server/config-ssl-tls.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,133 @@
+
+This document explains how to enable James 3.0 servers to use Transport Layer Security (TLS) for encrypted client-server communication.
+<subsection name="Configure a Server to Use SSL/TLS">
+Each of the servers [SMTP](config-smtp-lmtp.html) , [POP3](config-pop3.html) and [IMAP](config-imap.html) supports use of SSL/TLS.
+
+TLS (Transport Layer Security) and SSL (Secure Sockets Layer) are protocols that provide data encryption and authentication between applications in scenarios where that data is being sent across an insecure network, such as checking your email (How does the Secure Socket Layer work?). The terms SSL and TLS are often used interchangeably or in conjunction with each other (TLS/SSL), but one is in fact the predecessor of the other — SSL 3.0 served as the basis for TLS 1.0 which, as a result, is sometimes referred to as SSL 3.1.
+
+You need to add a block in the corresponding configuration file (smtpserver.xml, pop3server.xml, imapserver.xml,..)
+<pre>
+&lt;tls socketTLS="false" startTLS="false"&gt;
+  &lt;keystore&gt;file://conf/keystore&lt;/keystore&gt;
+  &lt;secret&gt;yoursecret&lt;/secret&gt;
+  &lt;provider&gt;org.bouncycastle.jce.provider.BouncyCastleProvider&lt;/provider&gt;
+&lt;/tls&gt;
+</pre>
+Each of these block has an optional boolean configuration element **socketTLS** and **startTLS** which is used to toggle use of SSL or TLS for the service.
+
+With socketTLS (SSL/TLS in Thunderbird), all the communication is encrypted.
+
+With startTLS (STARTTLS in Thunderbird), the preamble is readable, but the rest is encrypted.
+ `
+* OK JAMES IMAP4rev1 Server  Server 192.168.1.4 is ready.
+* CAPABILITY IMAP4rev1 LITERAL+ CHILDREN WITHIN STARTTLS IDLE NAMESPACE UIDPLUS UNSELECT AUTH=PLAIN
+1 OK CAPABILITY completed.
+2 OK STARTTLS Begin TLS negotiation now.
+... rest is encrypted...
+` 
+You can only enable one of the both at the same time for a service.
+
+It is also recommended to change the port number on which the service will listen:
+
+
+- POP3 - port 110, Secure POP3 - port 995
+
+- IMAP - port 143, Secure IMAP4 - port 993
+
+- SMTP - port 25, Secure SMTP - port 465
+
+You will now need to create your certificate store and place it in the james/conf/ folder with the name you defined in the keystore tag.
+</subsection><subsection name="Certificate Keystores">
+To use TLS/SSL inside James you will need a certificate keystore.
+
+
+
+ **Creating your own Certificate Keystore** 
+
+(Adapted from the Tomcat 4.1 documentation)
+
+James currently operates only on JKS format keystores. This is Java's standard "Java KeyStore" format, and is the format created by the keytool command-line utility. This tool is included in the JDK.
+
+To import an existing certificate into a JKS keystore, please read the documentation (in your JDK documentation package) about keytool.
+
+To create a new keystore from scratch, containing a single self-signed Certificate, execute the following from a terminal command line:
+
+ `keytool -genkey -alias james -keyalg RSA -keystore your_keystore_filename` 
+
+(The RSA algorithm should be preferred as a secure algorithm, and this also ensures general compatibility with other servers and components.)
+
+As a suggested standard, create the keystore in the james/conf directory, with a name like james.keystore.
+
+After executing this command, you will first be prompted for the keystore password.
+
+Next, you will be prompted for general information about this Certificate, such as company, contact name, and so on. This information may be displayed to users when importing into the certificate store of the client, so make sure that the information provided here matches what they will expect.
+
+Important: in the "distinguished name", set the "common name" (CN) to the DNS name of your James server, the one you will use to access it from your mail client (like "mail.xyz.com").
+
+Finally, you will be prompted for the key password, which is the password specifically for this Certificate (as opposed to any other Certificates stored in the same keystore file).
+
+If everything was successful, you now have a keystore file with a Certificate that can be used by your server.
+
+You MUST have only one certificate in the keystore file used by James.
+
+
+
+ **Installing a Certificate provided by a Certificate Authority** 
+
+(Adapted from the Tomcat 4.1 documentation
+
+To obtain and install a Certificate from a Certificate Authority (like verisign.com, thawte.com or trustcenter.de) you should have read the previous section and then follow these instructions:
+
+Create a local Certificate Signing Request (CSR)
+
+In order to obtain a Certificate from the Certificate Authority of your choice you have to create a so called Certificate Signing Request (CSR). That CSR will be used by the Certificate Authority to create a Certificate that will identify your James server as "secure". To create a CSR follow these steps:
+
+Create a local Certificate as described in the previous section.
+
+The CSR is then created with:
+
+keytool -certreq -keyalg RSA -alias james -file certreq.csr -keystore your_keystore_filename
+
+Now you have a file called certreq.csr. The file is encoded in PEM format. You can submit it to the Certificate Authority (look at the documentation of the Certificate Authority website on how to do this). In return you get a Certificate.
+
+
+
+Now that you have your Certificate you can import it into you local keystore. First of all you may have to import a so called Chain Certificate or Root Certificate into your keystore (the major Certificate Authorities are already in place, so it's unlikely that you will need to perform this step). After that you can procede with importing your Certificate.
+
+Optionally Importing a so called Chain Certificate or Root Certificate
+
+Download a Chain Certificate from the Certificate Authority you obtained the Certificate from.
+
+For Verisign.com go to: http://www.verisign.com/support/install/intermediate.html
+
+For Trustcenter.de go to: http://www.trustcenter.de/certservices/cacerts/en/en.htm#server
+
+For Thawte.com go to: http://www.thawte.com/certs/trustmap.html (seems no longer valid)
+
+Import the Chain Certificate into you keystore
+
+keytool -import -alias root -keystore your_keystore_filename -trustcacerts -file filename_of_the_chain_certificate
+
+
+
+And finally import your new Certificate (It must be in X509 format):
+
+keytool -import -alias james -keystore your_keystore_filename -trustcacerts -file your_certificate_filename
+
+
+
+See also: http://www.agentbob.info/agentbob/79.html
+</subsection><subsection name="Verifying a SSL/TLS-enabled James Server">
+After you've configured a particular server to use TLS/SSL connections, the server port should no longer accept unencrypted TCP/IP connections. This can be tested by using a telnet client to directly connect to the server port. The telnet connection should simply hang until the client times out.
+
+To validate that the port is properly accepting SSL connections an SSL client can be used to open a connection to the server port. One such client is OpenSSL, available from the [OpenSSL web site](http://www.openssl.org) . Follow the instructions provided with the SSL client to create a connection to the server port. Upon connection, the usual server greeting should appear.
+<pre>
+/usr/bin/openssl s_client -quiet -connect localhost:465
+depth=0 /C=Unknown/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/CN=Unknown
+verify error:num=18:self signed certificate
+verify return:1
+depth=0 /C=Unknown/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/CN=Unknown
+verify return:1
+220 192.168.0.208 SMTP Server (JAMES SMTP Server) ready Thu, 9 Jun
+2011 20:31:07 +0200 (CEST)
+</pre></subsection>

Added: james/site-cms/trunk/content/server/config-system.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/config-system.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/config-system.markdown (added)
+++ james/site-cms/trunk/content/server/config-system.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,78 @@
+<subsection name="Introduction">
+There are a number of global configuration files that do not fall into any one component. They have effects that are global in scope across the server.
+
+Some of these files are crucial, while others can be ignored by any but the most sophisticated server administrators.
+</subsection><subsection name="spring-server.xml">
+In James distribution, the spring files are located under conf/context folder and splitted into a main file (james-server-context.xml) which imports 4 other files (1 per mailbox type): james-mailbox-jcr-context.xml, james-mailbox-jpa-context.xml, james-mailbox-maildir-context.xml, james-mailbox-memory-context.xml.
+
+Consult [spring-server.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/META-INF/org/apache/james/spring-server.xml) in SVN to get some examples and hints.
+
+spring beans files are the place where the Apache James Server wiring is done. It should be modified only by expert-users.
+</subsection><subsection name="james-database.properties">
+Consult [james-database.properties](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/james-database-template.properties) in SVN to get some examples and hints.
+
+The database connection in database.properties
+
+James has the capacity to use a JDBC-compatible database for storage of both message and user data. This section explains how to configure James to utilize a database for storage.
+
+To avoid vendor-specific issues, the JPA (Java Persistence Architecture) is used (using the Apache OpenJPA implementation).
+
+There must be a database instance accessible from the James server. An account with appropriate privileges (select, insert, delete into tables, and on initial startup creation of tables) and with sufficient quota for the data to be inserted into the database must be available.
+
+Also, since James will use JDBC to access the database, an appropriate JDBC driver must be available for installation. You can place the JDBC driver jar in the conf/lib folder, it will be automatically loaded.
+
+
+
+ **database.driverClassName** 
+:    he class name of the database driver to be used.
+
+ **database.url** 
+:    The JDBC connection URL for your database/driver.
+
+ **database.username** 
+:    The user id of the database account to be used by this connection.
+
+ **database.password** 
+:    The password of the database account to be used by this connection.
+
+ **vendorAdapter.database** 
+:    Supported adapters are: DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE .
+
+ **openjpa.streaming** 
+:    true or false - Use streaming for Blobs. This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable it. See [http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html](http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html) (#7.11. LOB Streaming).
+Note for postgresql databases: Add standard_conforming_strings=off to your postgresql.conf, otherwise you will get ""Invalid escape string Hint: Escape string must be empty or one character. {prepstmnt 174928937 SELECT t0.mailbox_id, t0.mailbox_highest_modseq, t0.mailbox_last_uid, t0.mailbox_name, t0.mailbox_namespace, t0.mailbox_uid_validity, t0.user_name FROM public.james_mailbox t0 WHERE (t0.mailbox_name LIKE ? ESCAPE '\\' AND t0.user_name = ? AND t0.mailbox_namespace = ?) [params=?, ?, ?]} [code=0, state=22025]"
+</subsection><subsection name="META-INF/persistence.xml">
+Consult [META-INF/persistence.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/META-INF/persistence.xml) in SVN to get some examples and hints.
+
+The JPA mapping and properties are defined in the in META-INF/persistence.xml.
+
+You can override the definition in external file and importing the external file in the persistence.xml (see jpa-mappings.xml provided example in SVN)
+<pre>
+&lt;mapping-file&gt;META-INF/jpa-mappings.xml&lt;/mapping-file&gt;</pre></subsection><subsection name="jmx.properties">
+Consult [jmx.properties](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/jmx-template.properties) in SVN to get some examples and hints.
+
+This is used to configure the JMX MBean server via which all management is achieved (also used by via the james-cli).
+
+
+
+ **jmx.address** 
+:    The IP address (host name) the MBean Server will bind/listen to.
+
+ **jmx.port** 
+:    The port number the MBean Server will bind/listen to.
+To access from a remote location, it has been reported that -Dcom.sun.management.jmxremote.ssl=false is needed in the startup script.
+</subsection><subsection name="sqlResources.xml">
+Consult [sqlResources.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/sqlResources.xml) in SVN to get some examples and hints.
+
+This file is deprecated but some mailets... still need it. The standard way to access database is JPA, but some functionalities are not yet migrated and still need the sqlResources.xml resources.
+
+The precise SQL statements used by Apache James Server to modify and view data stored in the database are specified in sqlResources.xml file.
+
+If you are using a SQL database with unusual SQL commands or data types, you may need to add special entries to this file. The James team does try to keep sqlResources.xml updated, so if you do run into a special case, please let us know.
+
+Also, if the database tables are not created a priori, but rather are to be created by James upon startup, special attention should be paid to the "create table" statements in this file. Such statements tend to be both very database and very database instance specific.
+</subsection><subsection name="JCR Repository Configuration">
+Consult [jcr-repository.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/jcr-repository-template.xml) in SVN to get some examples and hints.
+
+Used to configure the JCR mailbox (if configure in mailbox.xml).
+</subsection>

Added: james/site-cms/trunk/content/server/config-users.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/config-users.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/config-users.markdown (added)
+++ james/site-cms/trunk/content/server/config-users.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,50 @@
+<subsection name="Introduction">
+User repositories are required to store James user information and authentication data
+
+Consult [usersrepository.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/usersrepository-template.conf) in SVN to get some examples and hints.
+</subsection><subsection name="JPA Users Repository">
+JPA (database via OpenJPA) based user repository. This is the default implementation.
+
+The usersrepository tag as 2 attributes: name="LocalUsers" and class="org.apache.james.user.file.UsersFileRepository"&gt;
+
+
+
+ **algorithm** 
+:    Algorithm to has passwords. Supported password algorithm are: MD5, SHA-256, SHA-512, NONE
+
+ **enableVirtualHosting** 
+:    true (default) or false. Defines if the usernames must (true) or may not contain (false) a domain part (user@domain.tld).</subsection><subsection name="File Users Repository">
+The File UsersRepository implementations below are DEPRECATED and will get removed in the next release
+
+It just listed here for backward-compatibility
+
+File-based user repositories Use these configurations to store user info in the filesystem.
+
+The usersrepository tag as 2 attributes:name="LocalUsers" class="org.apache.james.user.file.UsersFileRepository"&gt;
+
+
+
+ **destination** 
+:    Example: file://var/users/.
+
+ **ignoreCase** 
+:    true or false.
+
+ **enableAliases** 
+:    true or false.
+
+ **enableForwarding** 
+:    true or false.
+
+ **enableVirtualHosting** 
+:    true (default) or false. Defines if the usernames must (true) or may not contain (false) a domain part (user@domain.tld).</subsection><subsection name="JDBC Users Repository">
+The JDBC UsersRepository implementations below are DEPRECATED and will get removed in the next release.
+
+It just listed here for backward-compatibility.
+</subsection><subsection name="LDAP Users Repository">
+Read-Only LDAP based UsersRepository
+
+Example:
+<pre>
+&lt;repository name="LocalUsers" class="org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository" ldapHost="ldap://myldapserver:389" 
+    principal="uid=ldapUser,ou=system" credentials="password" userBase="ou=People,o=myorg.com,ou=system" userIdAttribute="uid"/&gt;</pre></subsection>

Added: james/site-cms/trunk/content/server/config.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/config.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/config.markdown (added)
+++ james/site-cms/trunk/content/server/config.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,36 @@
+
+All configuration files resides in the ./conf and ./conf/META-INF folder.
+
+We ship with default configuration (embedded in jars) and -template files you can use to override the default configuration.
+
+You can/must configure James for the following:
+
+| Config File Sample | Config Area | Config Comment |
+|--------------------|-------------|----------------|
+|  [domainlist.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/domainlist-template.conf)  |  [Domain List Configuration](config-domainlist.html)  |  |
+|  [usersrepository.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/usersrepository-template.conf)  |  [Users Configuration](config-users.html)  |  |
+|  [recipientrewritetable.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/recipientrewritetable-template.conf)  |  [Recipient Rewrite Table Configuration](config-recipientrewritetable.html)  |  |
+|  [mailbox.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/mailbox-template.conf)  |  [Mailbox Configuration](config-mailbox.html)  |  |
+|  [mailrepositorystore.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/mailrepositorystore-template.conf)  |  [Mail Repository Stores Configuration](config-mailrepositorystore.html)  |  |
+|  [dnsservice.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/dnsservice-template.conf)  |  [DNS Service Configuration](config-dnsservice.html)  |  |
+|  [smtpserver.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/smtpserver-template.conf)  |  [SMTP Configuration](config-smtp-lmtp.html)  |  |
+|  [lmtpserver.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/lmtpserver-template.conf)  |  [LMTP Configuration](config-smtp-lmtp.html)  |  |
+|  [pop3server.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/pop3server-template.conf)  |  [POP3 Configuration](config-pop3.html)  |  |
+|  [imapserver.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/imapserver-template.conf)  |  [IMAP4 Configuration](config-imap4.html)  |  |
+|  [mailetcontainer.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/mailetcontainer-template.conf)  |  [Mailet Container Configuration](config-mailetcontainer.html)  |  |
+|  [fetchmail.conf](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/fetchmail-template.conf)  |  [FetchMail Configuration](config-fetchmail.html)  |  |
+
+For most advanced system configuration, you can configure James for the following:
+
+| System Config File Sample | System Config Area | System Config Comment |
+|---------------------------|--------------------|-----------------------|
+|  [spring-server.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/META-INF/org/apache/james/spring-server.xml)  |  [System Configuration](config-system.html)  |  |
+|  [james-database.properties](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/james-database-template.properties)  |  [System Configuration](config-system.html)  |  |
+|  [META-INF/persistence.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/META-INF/persistence-template.xml)  |  [System Configuration](config-system.html)  |  |
+|  [jmx.properties](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/jmx-template.properties) <br></br> |  [System Configuration](config-system.html)  |  |
+|  [log4j.properties](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/log4j-template.properties)  | See [monitoring with log4j](monitor-logging.html) section. |  |
+|  [sqlResources.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/sqlResources-template.xml)  |  [System Configuration](config-system.html)  | Deprecated |
+|  [jcr-repository.xml](https://svn.apache.org/repos/asf/james/app/tags/apache-james-3.0-beta4/src/main/resources/jcr-repository-template.xml)  |  [System Configuration](config-system.html)  |  |
+
+See also more specific configurations related to [TLS](config-tls.html) , [Sieve](config-sieve.html) and [Antispam](config-antispam.html) .
+

Added: james/site-cms/trunk/content/server/dev-build.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-build.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-build.markdown (added)
+++ james/site-cms/trunk/content/server/dev-build.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,99 @@
+
+This step is not necessary to use the standard out of the box version of James. A pre-built binary version of James is available from the James download directory.
+
+But if you wish to customize the James source code, it will be necessary for you to build the distribution yourself.
+
+You can read on this page how to build from the command line and from eclipse IDE.
+
+There are two ways to get the James source code.
+
+
+1. Download the source distribution - the source is available from the [James release mirrors](http://james.apache.org/download.cgi) . Simply choose the version of James you'd like to download, and pick the source distribution appropriate for your platform.
+
+1. Get the source code using SVN - this method gives you access to the cutting edge code base. Instructions on how to use SVN to get the James source code can be found [here](http://www.apache.org/dev/version-control.html) . Apache James Server beta1 repository is [http://svn.apache.org/repos/asf/james/server/tags/james-server-3.0-beta1/](http://svn.apache.org/repos/asf/james/server/tags/james-server-3.0-beta1/) .
+
+1. For information, you can download all Apache James sources (server, mailbox, imap, mailet...) if you check out [http://svn.apache.org/repos/asf/james/current/](http://svn.apache.org/repos/asf/james/current) . Watch out!: you will get a release, but what we call a "trunk", that is on constant development and debugging.
+
+We consider in this document that you have checked-out James source code in JAMES_SRC_HOME directory.
+
+Consult the [architecture](dev.html) page if you want to learn more on the internal source structure.
+
+To run the build you need two third-party tools.
+
+
+1. Java Development Kit - You must have a JDK of Java version 1.6 or higher installed to build the James distribution. The exact JDKs available depend on the platform. A JDK must be downloaded and installed before the build can run.
+
+1. Maven 3.0.2 - This is a Java-tailored, XML-configured, extensible build or make system. You need ant (3.0.2+) in order to build James. You can get maven 3.0.2 from [here](http://maven.apache.org/download.html) . Installation instructions for maven are also available on the same page [http://maven.apache.org/download.html](http://maven.apache.org/download.html) .
+
+Set (on windows) or export (on Unix) MAVEN_OPTS to tune the memory needed by maven with "MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=128m"
+
+In the JAMES_SRC_HOME top level directory (where the parent pom.xml resides), invoke maven with 'mvn' with any of the following command line arguments:
+
+- clean - deletes the target directory, making the system ready for a clean build.
+
+- compile - compiles the source code.
+
+- test - run unit tests for James.
+
+-  **package - generates all the James distributions, packed. From the root directory, cd to 'container-spring/target' to have the build distribution.** 
+
+- javadocs:javadocs - builds the James javadocs.
+
+- site - builds the entirety of the James website.
+
+
+For example, invoke `mvn package` to get a zip/tar of James distribution.
+
+All built products are output in the `container-spring/target` subdirectory of the James source directory. This directory will be deleted if you run build with the clean argument.
+
+ **Warning!** Any changes you've made in the 'dist' directory will be lost after a recompilation. If you are running James for this directory we recommend you backup to avoid losing work.
+
+You can also invoke the command line from a shell. Go to the server project cli folder and type mvn exec:java -Dexec.args="-h localhost -p 9999 help"
+<subsection name="Import projects in Eclipse with m2eclipse">
+You should have Eclipse IDE with [m2eclipse](http://m2eclipse.sonatype.org) plugin installed.
+
+You now need to import the maven projects in the Eclipse workspace.
+
+Therefore, click on the `File` menu and select `Import` . Choose `Existing Maven Project` and click on `Next` button.
+ ![](./images/eclipse/eclipse-import-maven-view-1.gif "") </subsection><subsection name="Select Projects to Import">
+Select the JAMES_SRC_HOME directory where you have checked out the source code.
+
+Eclipse should present you with the list of James server modules.
+
+Select the modules you want to import (by default, all) and click on `Finish` to execute the import.
+ ![](./images/eclipse/eclipse-import-maven-view-2.gif "") 
+You can also import other projects from [imap](http://james.apache.org/imap/source-code.html) , [mailbox](http://james.apache.org/mailbox/source-code.html) and [protocols](http://james.apache.org/protocols/source-code.html) to have a more complete view on the used sources code.
+</subsection><subsection name="Enable Workspace Resolution">
+Check that 'Workspace resolution' is enable in m2eclipse plugin.
+
+Your changes in code will be directly taken into account.
+ ![](./images/eclipse/eclipse-m2eclipse-project-dependencies.gif "") </subsection><subsection name="Prepare projects">
+Now you have James projects in Eclipse workspace.
+
+You still have to prepare the following to be able to run from Eclipse:
+
+
+1. Copy the `context` folder, `log4j.properties` and `META-INF` folder from `container-spring\src\main\config\james` directory to a source folder of `container-spring` project (you can use for example a new folder called `stage` as Eclipse source folder).
+
+1. Copy all files (except context folder log4j.properties and META-INF/persistence.xml) from `container-spring\src\main\config\james` folder to a `conf` folder ( `conf` folder must be a sub-folder of the JAMES_SRC_HOME directory where you made the check-out). As non-root privilege user, you may need to change the SMTP/IMAP/POP3 ports to values higher than 1024.
+
+1. For ease, you can also create 2 new eclipse projects to edit the files and visualize the created mails/store/...: james-server-container-spring-conf and james-server-container-spring-var.
+ ![](./images/eclipse/eclipse-m2eclipse-projects.gif "") </subsection><subsection name="Run James from Eclipse">
+That's it. Run or Debug James in Eclipse (right-click on the Main class) and Have Fun!.
+ ![](./images/eclipse/eclipse-run-james.gif "") 
+If you change a JPA Entity class, your will need to run 'mvn package' or add the following option to the VM argument of your run configuration '-javaagent:my_home_folder/.m2/repository/org/apache/openjpa/openjpa/2.0.1/openjpa-2.0.1.jar'
+</subsection>
+This was done using NetBeans 7, which comes bundeled with Maven 3, needed to build James 3. Older versions of NetBeans should be able to build James fine, provided that you configure them to use an instance of Maven 3, if they do not have it. I used james 3.0-beta1 release and it builded in 7:40 min on my notebook running Debian Squeeze.
+<subsection name="Getting the sources from the repository">
+Building James with NetBeans is very easy as it comes with Subersion and Maven support already build in. Maven is bundeled with the IDE, but Subverion is not, so you will have to install Subversion yourself and NetBeans will be able to use it. You can get more details on how to install and where to get Subversion from the NetBeans Help menu by clicking on **Help Contents** and from there go to the **IDE Basics-&gt;Version Control and File Hierarchy-&gt;Subversion** topic.
+
+For Linux users, Subversion is probably packaged by your distribution so use your distribution tools to install it (aptitude, yum, etc.)
+
+Once you have Subversion, go to **Team-&gt;Subversion-&gt;Checkout** menu entry.<br></br>You will see an dialog window used to enter the information about the Subversion repository you are going to use. It looks like this: ![](./images/netbeans/netbeans-svn-checkout1.png "") .<br></br>In the `Repository URL` field enter the location for James repository and click `Next` . You can use the following URL to get the trunk or developement version: [http://svn.apache.org/repos/asf/james/server/trunk](http://svn.apache.org/repos/asf/james/server/trunk) .<br></br>After this you will be presented with another dialog window where you can configure which folders to check out and where to save them on your machine. ![](./images/netbeans/netbeans-svn-checkout2.png "") .<br></br>If you supplied the above URL you can click `Finish` to get trunk version and start hacking. You can choose another folder by clicking `Browse` . A new dialog window will open and from there you cand browse the wh
 ole subversion repository. I wanted to build James 3.0beta so I choosed `james-serve-3.0-beta1` under james/server/tags/ folder. ![](./images/netbeans/netbeans-svn-checkout-browse.png "") .<br></br>
+
+After you click `Finish` NetBeans will checkout the sources. It will detect the Maven project and ask you if you wish to open the project. If you open the project you will see in the Projects Window ( `CTRL+1` if not visible) something similar to the next image:<br></br> ![](./images/netbeans/netbeans-james-project.png "") .
+</subsection><subsection name="Building the project">
+Building the project does not require too much work. Just go to `Run-&gt;Build Project` menu option. Make sure that James is the main project (if you have other projects open) or NetBeans will build that project instead of James. Once the build is finished you will find the binary distribution in `container-spring/target` directory. ![](./images/netbeans/james-build-dir.png "") .<br></br>
+</subsection>
+We will be happy to include on this page any other tutorial you could send use about developing James with your favorite Integrated Development Environment.
+

Added: james/site-cms/trunk/content/server/dev-database-schema.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-database-schema.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-database-schema.markdown (added)
+++ james/site-cms/trunk/content/server/dev-database-schema.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,9 @@
+ ![](images/database/james-database-schema-derby_1000.png "") 
+The users is in the JAMESUSER table.
+
+Depending on your virtualHosting config, JAMESUSER.NAME is the email address (or the user part that must be completed with a domain).
+
+The user has MAILBOXes via the SUBSCRIPTION table.
+
+The email are in MESSAGE (belonging to a MAILBOX via MEMBERSHIP). You have to look in the HEADER table to get all the detailed information (from, to, cc, bcc,...).
+

Added: james/site-cms/trunk/content/server/dev-extend-mailet.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-extend-mailet.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-extend-mailet.markdown (added)
+++ james/site-cms/trunk/content/server/dev-extend-mailet.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,48 @@
+
+Implementing a custom mailet is generally a simple task, most of whose complexity lies in coding the actual work to be done by the mailet. This is largely due to the simplicity of the Mailet interface and the fact that a GenericMailet class is provided as part of the Mailet package.
+
+In this discussion we will assume that any mailet being implemented is a subclass of GenericMailet. The GenericMailet class serves to abstract away of the configuration and logging details. While it provides a noop implementation of the init() and destroy() methods, these can be easily overridden to provide useful functionality.
+
+In general, the only four methods that you should need to implement are init(), destroy(), getMailetInfo(), and service(Mail). And only the last is required in all cases.
+<subsection name="Configuration">
+As described in the [SpoolManager configuration section](config-mailetcontainer.html) , mailets are configured with a set of String (name, value) pairs. These values are passed into the Mailet upon initialization (although the details of this process are hidden by the GenericMailet implementation). GenericMailet provides access to this configuration information through use of the getInitParameter(String) method. Passing in the name of the requested configuration value will yield the value if set, and null otherwise. Configuration values are available inside the init(), destroy(), and service(Mail) methods.
+</subsection><subsection name="Logging">
+There is a simple logging mechanism provided by the Mailet API. It does not support logging levels, so any log filtering will have to be implemented in the Mailet code. Logging is done by calling one of the two logging methods on GenericMailet - log(String) or log(String,Throwable). Logging is available inside the init(), destroy(), and service(Mail) methods.
+
+The value of getMailetInfo() for the Mailet is prepended to the log entries for that Mailet. So it may be desirable for you to override this method so you can distinguish mailet log entries by Mailet.
+</subsection><subsection name="Initialization">
+As part of the Mailet lifecycle, a Mailet is guaranteed to be initialized immediately after being instantiated. This happens once and only once for each Mailet instance. The Initialization phase is where configuration parsing and per-Mailet resource creation generally take place. Depending on your Mailet, it may or may not be necessary to do any initialization of the mailet. Initialization logic is implemented by overriding the init() method of GenericMailet.
+</subsection><subsection name="Servicing">
+The bulk of the Mailet logic is expected to be invoked from the service(Mail) method. This method is invoked each time a mail message is to be processed by the mailet. The message is passed in as an instance of the Mail interface, which is part of the Mailet API.
+
+The Mail interface is essentially a light wrapper around JavaMail's MimeMessage class with a few important differences. See the Javadoc for the interface for a description of the additional methods available on this wrapper.
+</subsection><subsection name="Destruction">
+As part of the Mailet lifecycle, a Mailet is guaranteed to be destroyed when the container cleans up the Mailet. This happens once and only once for each Mailet instance. The Destruction phase is where per-Mailet resource release generally takes place. Depending on your Mailet, it may or may not be necessary to do any destruction of the mailet. Destruction logic is implemented by overriding the destroy() method of GenericMailet.
+</subsection>
+Once a Mailet has been successfully implemented there are only a couple of additional steps necessary to actually deploy the Mailet.
+<subsection name="Adding Your Mailet to the Classpath">
+The Mailet must be added to James' classpath so that the Mailet can be loaded by James. There are three ways to add a custom Mailet to the classpath so that James will be able to load the Mailet. These are:
+
+1a. Download the source distribution, add a jar file containing the custom files to the lib directory of the unpacked source distribution, and build a new .sar file by following the directions [here](build-instructions.html) . This new .sar file will now include your custom classes.
+
+or
+
+1b. Place a jar file containing the custom class files in the lib subdirectory of the James installation. It will also be necessary to unpack the JavaMail and James jar files from the provided .sar file and add them to this directory.
+
+or
+
+1c. Place a jar file containing the custom class files in /path/to/james/conf/lib/ subdirectory.
+
+2. After this is done get sure you add the mailet package to the mailetcontainer.xml. For example:
+<pre>
+&lt;!-- Set the Java packages from which to load mailets and matchers --&gt;
+&lt;mailetpackages&gt;
+    &lt;mailetpackage&gt;org.apache.james.transport.mailets&lt;/mailetpackage&gt;
+    &lt;mailetpackage&gt;org.apache.james.transport.mailets.smime&lt;/mailetpackage&gt;
+    &lt;mailetpackage&gt;your.costum.package.transport-mailets&lt;/mailetpackage&gt;
+&lt;/mailetpackages&gt;
+</pre>
+After that restart james.
+</subsection><subsection name="James Configuration">
+Configuration of the processor chain is discussed [elsewhere](config-mailetcontainer.html) in this documentation. The details of configuring mailet deployment is discussed at length. Here we will only comment that it is important to add the appropriate mailet package for your custom mailet to the &lt;mailetpackages&gt; list and that the name of your mailet should not conflict with any of the mailets described [here](dev-provided-mailets.html) .
+</subsection>

Added: james/site-cms/trunk/content/server/dev-extend-matcher.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-extend-matcher.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-extend-matcher.markdown (added)
+++ james/site-cms/trunk/content/server/dev-extend-matcher.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,54 @@
+
+Implementing a custom matcher is generally a simple task, most of whose complexity lies in coding the actual work to be done by the matcher. This is largely due to the simplicity of the Matcher interface and the fact that a couple of abstract Matcher template classes are provided in the Mailet package. These two classes, GenericMatcher and GenericRecipientMatcher, greatly simplfy the task of Matcher authoring.
+
+As discussed elsewhere in this manual, the Matcher interface does not simply match or not match a particular message. Rather, it returns some subset of the original message recipients as a result of the match(Mail) method. This leads to the two different abstract Matcher implementations.
+
+The first, GenericMatcher, is intended for matchers where recipient evaluation is not necessary. Basically, you should subclass this implementation if your matcher is going to return all or none of the recipients.
+
+When subclassing this class, there are four methods that potentially need to be overridden. These are getMatcherInfo(), init(), match(Mail), and destroy(). More on these anon.
+
+The second implementation, GenericRecipientMatcher, is intended for those matchers where each recipient is evaluated individually. It is a subclass of GenericMatcher, and inherits most of its behavior from that class. The only major difference is that subclasses are expected to override matchRecipient(MailAddress) rather than match(Mail).
+<subsection name="Configuration">
+Matchers are passed a single String as part of their configuration. Interpretation of this list is left entirely to the body of the Matcher. This String value is available in the body of the Matcher through use of the getCondition() method of the GenericMatcher class. This method returns the String value passed to the Matcher, and returns null if no value is set. The method getCondition() is available inside the init(), destroy(), match(Mail), and matchRecipient(MailAddress) methods.
+</subsection><subsection name="Logging">
+There is a simple logging mechanism provided by the Mailet API. It does not support logging levels, so any log filtering will have to be implemented in the Matcher code. Logging is done by calling one of the two logging methods on GenericMatcher/GenericRecipientMatcher - log(String) or log(String,Throwable). Logging is available inside the init(), destroy(), match(Mail), and matchRecipient(MailAddress) methods.
+
+The value of getMatcherInfo() for the Matcher is prepended to the log entries for that Matcher. So it may be desirable for you to override this method so you can distinguish Matcher log entries by Matcher.
+</subsection><subsection name="Initialization">
+As part of the Matcher lifecycle, a Matcher is guaranteed to be initialized immediately after being instantiated. This happens once and only once for each Matcher instance. The Initialization phase is where configuration parsing and per-Matcher resource creation generally take place. Depending on your Matcher, it may or may not be necessary to do any initialization of the Matcher. Initialization logic is implemented by overriding the init() method of GenericMatcher/GenericRecipientMatcher.
+</subsection><subsection name="Matching">
+It is the matching phase where the Matcher's work is done. The exact form of this phase largely depends on which Matcher superclass is subclassed.
+
+If GenericMatcher is being subclassed, it is the match(Mail) that is implemented. As described above, this method returns a Collection of MailAddresses that is a subset of the original recipients for the Mail object.
+
+If it is a purely recipient-filtering Matcher, then the GenericRecipientMatcher should be subclassed. In this case, developers must provide an implementation of the matchRecipient(MailAddress) method. This method returns true if the recipient matches, and false otherwise.
+</subsection><subsection name="Destruction">
+As part of the Matcher lifecycle, a Matcher is guaranteed to be destroyed when the container cleans up the Matcher. This happens once and only once for each Matcher instance. The Destruction phase is where per-Matcher resource release generally takes place. Depending on your Matcher, it may or may not be necessary to do any destruction of the Matcher. Destruction logic is implemented by overriding the destroy() method of GenericMatcher/GenericRecipientMatcher.
+</subsection>
+Once a Matcher has been successfully implemented there are only a couple of additional steps necessary to actually deploy the Matcher.
+<subsection name="Adding Your Matcher to the Classpath">
+The Matcher must be added to James' classpath so that the Matcher can be loaded by James. There are two ways to add a custom Matcher to the classpath so that James will be able to load the Matcher. These are:
+
+1a. Download the source distribution, add a jar file containing the custom files to the lib directory of the unpacked source distribution, and build a new .sar file by following the directions [here](build-instructions.html) . This new .sar file will now include your custom classes.
+
+or
+
+1b. Place a jar file containing the custom class files in the lib subdirectory of the James installation. It will also be necessary to unpack the JavaMail and James jar files from the provided .sar file and add them to this directory.
+
+or
+
+1c. Place a jar file containing the custom class files in /path/to/james/conf/lib/ subdirectory.
+
+2. After this is done get sure you add the matcher package to the mailetcontainer.xml. For example:
+<pre>
+&lt;!-- Set the Java packages from which to load mailets and matchers --&gt;
+&lt;matcherpackages&gt;
+    &lt;matcherpackage&gt;org.apache.james.transport.matchers&lt;/matcherpackage&gt;
+    &lt;matcherpackage&gt;org.apache.james.transport.matchers.smime&lt;/matcherpackage&gt;
+    &lt;matcherpackage&gt;your.costum.package.transport-matchers&lt;/matcherpackage&gt;
+&lt;/matcherpackages&gt;
+</pre>
+After that restart james.
+</subsection><subsection name="James Configuration">
+Configuration of the processor chain is discussed [elsewhere](config-mailetcontainer.html) in this documentation. The details of configuring matcher deployment is discussed at length. Here we will only comment that it is important to add the appropriate matcher package for your custom matcher to the &lt;matcherpackages&gt; list and that the name of your matcher should not conflict with any of the matchers described [here](dev-provided-matchers.html) .
+</subsection>

Added: james/site-cms/trunk/content/server/dev-extend-smtp-hook.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-extend-smtp-hook.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-extend-smtp-hook.markdown (added)
+++ james/site-cms/trunk/content/server/dev-extend-smtp-hook.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,17 @@
+<subsection name="Why a Custom SMTP Hook">
+What to do if the Hook API is not enough for you ? You want for example to write a code which handles a new command like "YOURCOOLCOMMAND: whatever@example".
+
+For this kind of needs you should implement the CommandHandler interface. This gives you a lower-level API to handle this kind of tasks. If you want to support a custom Hook in your `CommandHandler` its the best to just extend `AbstractHookableCmdHandler` .
+</subsection><subsection name="Things to Remember ">
+Be aware that your implementation needs to be thread-safe as it will get used as singleton. If you need to store temporary informations within the SMTP Transaction/Session you should use the `SMTPSession.getState().put(...)` and `SMTPSession.getConnectionState().put(...)` methods.
+
+For a more explanation see the [apidocs](http://james.apache.org/protocols/apidocs/index.html) for the protocols library which is used by James SMTP Server.
+</subsection><subsection name="Get your Hook implementations loaded">
+Just create a jar file which contains your code and put it in /path/to/james/conf/lib/ folder. The jar will get picked up by the ClassLoader automatic then.
+
+After that open the smtpserver.xml file and add your hook to the `&lt;handlers&gt;&lt;/handlers&gt;` block in the order you want to have it executed. So if you have 2 MailHook implementation make sure the first one which is listed in smtpserver.xml is the one you want to call first.
+</subsection><subsection name="Return-Codes">
+Each of the Hooks need to return a HookResult to tell the SMTPServer if the next registered Hook should get called or not.
+
+For this the HookReturnCode is used.
+</subsection>

Added: james/site-cms/trunk/content/server/dev-extend.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-extend.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-extend.markdown (added)
+++ james/site-cms/trunk/content/server/dev-extend.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,11 @@
+<subsection name="Custom Mailet">
+See the [mailet](dev-extend-mailet.html) page for more information.
+</subsection><subsection name="Custom Matcher">
+See the [matcher](dev-extend-mailet.html) page for more information.
+</subsection><subsection name="SMTP Hook">
+See the [SMTP Hook](dev-extend-hook-smtp.html) page for more information.
+</subsection><subsection name="Mailbox Store">
+See the [mailbox](http://james.apache.org/mailbox) project for more information.
+</subsection><subsection name="Mailbox Listeners">
+See the [mailbox](http://james.apache.org/mailbox) project for more information.
+</subsection><subsection name="Queue"></subsection><subsection name="Queue Listeners"></subsection>

Added: james/site-cms/trunk/content/server/dev-provided-mailets.markdown
URL: http://svn.apache.org/viewvc/james/site-cms/trunk/content/server/dev-provided-mailets.markdown?rev=1335084&view=auto
==============================================================================
--- james/site-cms/trunk/content/server/dev-provided-mailets.markdown (added)
+++ james/site-cms/trunk/content/server/dev-provided-mailets.markdown Mon May  7 16:00:40 2012
@@ -0,0 +1,409 @@
+
+James provides a number of implemented Mailets for use by James administrators in their configurations. These are primarily mailets that members of the James developer or user communities have found useful in their own configurations. A description of how to configure Mailets and use them in the James SpoolManager can be found [here](config-mailetcontainer.html) .
+<subsection name="AddFooter">
+Description: This mailet adds a text footer to the message.
+
+Parameters:
+
+-  **text** (required) - the text that will be added as a footer to the message.
+
+</subsection><subsection name="AddHabeasWarrantMark">
+Description: This mailet adds a Habeas warrant mark (see [http://habeas.com](http://habeas.com) for details) to the message.
+
+Parameters: None.
+</subsection><subsection name="AddHeader">
+Description: This mailet is **deprecated** .Please use SetMimeHeader .
+</subsection><subsection name="AvalonListserv">
+Provides basic list server functionality. Implements basic filters for emails sent to the list, including restriction of senders to members, diallowing attachments in list messages, and subject line processing
+
+Parameters:
+
+-  **repositoryName** (required) - the name of the user repository that contains the users for this list.
+
+-  **membersonly** (optional) - whether only members of the list can send messages to this list. Defaults to false.
+
+-  **attachmentsallowed** (optional) - whether attachments are allowed in messages sent to this list. Defaults to true.
+
+-  **replytolist** (optional) - whether the reply-to address for all messages sent to this list is set to the list address. Defaults to true.
+
+-  **subjectprefix** (optional) - a String value. If set, this value is prepended to the subject line of all messages sent to the list.
+
+-  **autobracket** (optional) - a boolean value. If a subjectprefix is set, this value determines whether the prefix is bracketed before being prepended to the subject line. Defaults to true.
+
+</subsection><subsection name="AvalonListservManager">
+Processes list management commands of the form &lt;list-name&gt;-on@&lt;host&gt; and &lt;list-name&gt;-off@&lt;host&gt; where &lt;list-name&gt; and lt;host&gt; are arbitrary. Note that this should be used in tandem with a CommandForListserv matcher to ensure that only commands intended for a specific list are processed.
+
+Parameters:
+
+-  **repositoryName** (required) - the name of the user repository that contains the users for this list.
+
+</subsection><subsection name="BayesianAnalysis">
+Description: Spam detection mailet using bayesian analysis techniques.
+
+Parameters:
+
+-  **repositoryPath** (required) - The repositoryPath which is used.
+
+-  **headerName** - The HeaderName which get adds to holds the Probalitity. Default is *X-MessageIsSpamProbability* .
+
+-  **ignoreLocalSender** - Set to true if you want to ignore messages from local senders. By local sender we mean a return-path with a local server part (server listed in &lt;servernames&gt; in mailetcontainer.xml). Default is *false* .
+
+-  **maxSize** - Set this to the maximum message size (in bytes) after analysis will be skipped. Default is *100000* .
+
+</subsection><subsection name="BayesianAnalysisFeeder">
+Description: Feeds ham OR spam messages to train the BayesianAnalysis mailet.
+
+Parameters:
+
+-  **repositoryPath** (required) - The repositoryPath which is used.
+
+-  **feedType** (required) - The type of the message which is used to feed the mailet. Allowed values are *spam* and *ham* .
+
+-  **maxSize** - Set this to the maximum message size (in bytes) after analysis will be skipped. Default is *100000* .
+
+</subsection><subsection name="Bounce">
+Description: Generates a response to the reverse-path address.
+
+Parameters:
+
+-  **sender** - The senderAddress which will be used for sending the bounce. Possible values: *address* , *postmaster* , *sender* , *unaltered* . Default *postmaster* .
+
+-  **attachError** - Attach error. Default is false.
+
+-  **message** - Set the message which get included in the bounce.
+
+-  **prefix** - Optional subject prefix prepended to the original message.
+
+-  **inline** - Specify which mailpart will be included in the email body. Possible values: *unaltered* , *heads* , *body* , *all* , "none". Default "none".
+
+-  **attachment** - Specify which mailpart will be attached to the email. Possible values: *none* , *heads* , *body* , *all* , *message* . Default *message* .
+
+-  **passThrough** - If set to false the email will not processed after the bounce. Possible values: *true* , *false* . Default *true* .
+
+-  **fakeDomainCheck** - If set to false true will check if the sender domain is valid. Possible values: *true* , *false* . Default *true* .
+
+-  **debug** - If set true you can enable debugging. Possible values: *true* , *false* . Default *false* .
+
+</subsection><subsection name="ClamAVScan">
+Description: Does an antivirus scan check using a ClamAV daemon (CLAMD).
+
+Parameters:
+
+-  **host** - The host name of the server where CLAMD runs. The default is *localhost* 
+
+-  **port** - The port on which CLAMD listens. The default is *3310* .
+
+-  **maxPings** - The maximum number of connection retries during startup. If the value is *0* no startup test will be done.
+
+-  **pingIntervalMillis** (required) - The interval (in milliseconds) between each connection retry during startup. The default is *30000* (30 seconds)
+
+-  **streamBufferSize** - the BufferedOutputStream buffer size to use writing to the<I>stream connection</I>. The default is *8192* .
+
+-  **debug** - If set true you can enable debugging. Possible values: *true* , *false* . Default *false* .
+
+</subsection><subsection name="CommandListservFooter">
+Description: CommandListservFooter is based on the AddFooter mailet. It is used by the CommandListservProcessor to inject a footer into mailing list.
+
+Parameters: None.
+</subsection><subsection name="CommandListservManager">
+Description: CommandListservManager is the default implementation of ICommandListservManager. It loads all the configured IListServCommands and delegates to them at runtime.<br></br>It isn't responsible for procesing messages sent to the main mailing list, but is responsible for individual commands sent by users, such as: info, subscribe, etc...<br></br>Requests sent to the CommandListservManager take the form of: `
+&lt;listName&gt;-&lt;commandName&gt;@domain
+` If the command isn't recognized an error will be sent.<br></br><br></br>The configuration for this mailet sould be in the 'root' processor block.
+
+Parameters:
+
+-  **listName** - The listname
+
+-  **displayName** - The full listname
+
+-  **listOwner** - An emailaddress which will be used as owneraddress.
+
+-  **repositoryName** - the repository name
+
+-  **listDomain** - The domain
+
+<br></br>
+Example configuration:<pre>
+&lt;mailet match="CommandListservMatcher=announce@localhost" class="CommandListservManager"&gt;
+  &lt;listName&gt;announce&lt;/listName&gt;
+  &lt;displayName&gt;Announce mailing list&lt;/displayName&gt;
+  &lt;listOwner&gt;owner@localhost&lt;/listOwner&gt;
+  &lt;repositoryName&gt;list-announce&lt;/repositoryName&gt;
+  &lt;listDomain&gt;localhost&lt;/listDomain&gt;
+
+  &lt;commandpackages&gt;
+     &lt;commandpackage&gt;org.apache.james.transport.mailets.listservcommands&lt;/commandpackage&gt;
+  &lt;/commandpackages&gt;
+
+  &lt;commands&gt;
+     &lt;command name="subscribe" class="Subscribe"/&gt;
+     &lt;command name="subscribe-confirm" class="SubscribeConfirm"/&gt;
+     &lt;command name="unsubscribe" class="UnSubscribe"/&gt;
+     &lt;command name="unsubscribe-confirm" class="UnSubscribeConfirm"/&gt;
+     &lt;command name="error" class="ErrorCommand"/&gt;
+     &lt;command name="owner" class="Owner"/&gt;
+     &lt;command name="info" class="Info"/&gt;
+  &lt;/commands&gt;
+ &lt;/mailet&gt;
+</pre>
+</subsection><subsection name="DSNBounce">
+Description: Generates a Delivery Status Notification (DSN). Note that this is different than a mail-client's reply, which would use the Reply-To or From header.Bounced messages are attached in their entirety (headers and content) and the resulting MIME part type is "message/rfc822". The reverse-path and the Return-Path header of the response is set to *null* ( *&lt;&gt;* ), meaning that no reply should be sent. A sender of the notification message can optionally be specified. If one is not specified, the postmaster's address will be used.
+
+Parameters:
+
+-  **sender** - An address, postmaster,sender or unaltered. Default is *postmaster* 
+
+-  **prefix** - Optional subject prefix prepended to the original message.
+
+-  **attachment** - Values are message, heads or none. Default is *message* . test will be done.
+
+-  **messageString** - the message sent in the bounce, the first occurrence of the pattern [machine] is replaced with the name of the executing machine, default=Hi. This is the James mail server at [machine] ....
+
+-  **passThrough** (optional) - a boolean value (true/false) indicating whether processing should continue on the message is on. If false, the original message is GHOSTed. Defaults to false.
+
+-  **debug** - If set true you can enable debugging. Possible values: *true* , *false* . Default *false* .
+
+</subsection><subsection name="Forward">
+Description: This mailet forwards the message to a set of recipients.
+
+Parameters:
+
+-  **forwardto** (required) - a comma delimited list of email addresses.
+
+</subsection><subsection name="FromRepository">
+Description: This mailet ee-spools mail found in the specified Repository.
+
+Parameters:
+
+-  **repositoryPath** (required) - The repositoryPath which is used.
+
+-  **processor** (required) - The target processor to move the mails to.
+
+-  **delete** - If set to true the mails get deleted after re-spooling. Default is *false* .
+
+</subsection><subsection name="ICommandListservManager">
+Description: ICommandListservManager is the interface that describes the functionality of any command based list serv managers.
+
+Parameters: None.
+</subsection><subsection name="JDBCAlias">
+Description: This mailet does alias translation for email addresses stored in a database table.
+
+Parameters:
+
+-  **mappings** (required) - a URL of the form db://&lt;data-source&gt;/&lt;table&gt;, where &lt;table&gt; is the table in the database containing the alias info and &lt;data-source&gt; is the name of the data-source in mailetcontainer.xml that is to be used.
+
+-  **source-column** (required) - the column containing the aliases.
+
+-  **target-column** (required) - the column containing the alias targets.
+
+</subsection><subsection name="JDBCRecipientRewriteTable">
+Description: This mailet does complex alias translation for email addresses stored in a database table.
+
+Parameters:
+
+-  **table** (required) - the URL describing the database table. This URL has the form db://&lt;data-source&gt;/&lt;table&gt; where &lt;data-source&gt; and &lt;table&gt; are the names of the data-source as defined in mailetcontainer.xml and the table in the database.
+
+-  **sqlquery** (optional) - the text of the SQL query used by the mailet to do user lookup. The default is "select RecipientRewriteTable.target-address from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where (RecipientRewriteTable.user like ? or RecipientRewriteTable.user like '\\%') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain like '\\%' and VUTDomains.domain like ?)) order by concat(RecipientRewriteTable.user,'@',RecipientRewriteTable.domain) desc limit 1"
+
+</subsection><subsection name="LocalDelivery">
+Description: This mailet delivers messages to local mailboxes.
+
+Parameters: None.
+</subsection><subsection name="LogMessage">
+Description: Logs Message Headers and/or Body.
+
+Parameters:
+
+-  **passThrough** (optional) - If the "passThrough" in confs is true the mail will be left untouched in the pipe. If false will be destroyed. Default is true.
+
+-  **headers** (optional) - If set to true the headers get logged. Default is true"
+
+-  **body** (optional) - If set to true the body get logged. Default is true.
+
+-  **bodyMax** (optional) - The max length wich should be logged. Default is log all.
+
+-  **comment** (optional) - The comment which should be logged Default is none.
+
+</subsection><subsection name="NotifyPostmaster">
+Description: This mailet forwards the message as an attachment to the James postmaster.
+
+Parameters:
+
+-  **sendingAddress** (optional) - the address from which the forwarded email will be sent. Defaults to the postmaster address.
+
+-  **notice** (optional) - the text message that will accompany the forwarded message. Defaults to "We were unable to deliver the attached message because of an error in the mail server."
+
+-  **attachStackTrace** (optional) - whether an error stack trace is attached to the forwarded message.
+
+</subsection><subsection name="NotifySender">
+Description: This mailet forwards the message as an attachment to the original sender.
+
+Parameters:
+
+-  **sendingAddress** (optional) - the address from which the forwarded email will be sent. Defaults to the postmaster address.
+
+-  **notice** (optional) - the text message that will accompany the forwarded message. Defaults to "We were unable to deliver the attached message because of an error in the mail server."
+
+-  **attachStackTrace** (optional) - whether an error stack trace is attached to the forwarded message.
+
+</subsection><subsection name="Null">
+Description: This mailet ends processing for this mail.
+
+Parameters: None.
+</subsection><subsection name="PostmasterAlias">
+Description: Intercepts all mails addressed to postmaster@&lt;domain&gt; where &lt;domain&gt; is one of the domains managed by this James server and substitutes the configured James postmaster address for the original recipient address. This mailet is inserted automatically by James at the head of the root processor.
+
+Parameters: None.
+</subsection><subsection name="Redirect">
+Description: A mailet providing powerful, configurable redirection services.<br></br>This mailet can produce listserver, forward and notify behaviour, with the original message intact, attached, appended or left out altogether.<br></br>This built in functionality is controlled by the configuration as described [here](apidocs/org/apache/james/transport/mailets/Redirect.html) .
+
+It is also intended to be easily subclassed to make providing bespoke redirection mailets simple.<br></br>By extending it and overriding one or more of its methods new behaviour can be quickly created without the author having to address any other issue than the relevant one. For more information see the javadocs [here](apidocs/org/apache/james/transport/mailets/Redirect.html) .
+
+Parameters: [See javadocs.](apidocs/org/apache/james/transport/mailets/Redirect.html) 
+</subsection><subsection name="RemoteDelivery">
+Manages delivery of messages to recipients on remote SMTP hosts.
+
+Parameters:
+
+-  **outgoing** (required) - The URL for the repository that will hold messages being processed by the RemoteDelivery Mailet.
+
+-  **delayTime** (optional) - a non-negative Long value that is the time in milliseconds between redelivery attempts for a particular mail. Defaults to six hours.
+
+-  **maxRetries** (optional) - a non-negative Integer value that is number of times the Mailet will attempt to deliver a particular mail. Defaults to five.
+
+-  **timeout** (optional) - The SMTP connection timeout for SMTP connections generated by this Mailet. Defaults to 60 seconds.
+
+-  **deliveryThreads** (optional) - The number of threads this Mailet will use to generate SMTP connections.
+
+-  **gateway** (optional) - The host name of the SMTP server to be used as a gateway for this server. If this value is set, then all messages will be delivered to the gateway server, regardless of recipient address. To specify more than one gateway server, add multiple gateway tags, each containing one value. If more than one server is specified, they will be tried in order until one is successful. In addition the port may be specified for each gateway in the format &lt;host&gt;:&lt;port&gt;. If this value is unset, delivery will occur to SMTP servers resolved by MX lookup.
+
+-  **gatewayPort** (optional) - The default port number of the SMTP server to be used as a gateway for this server. This value will be employed when a gateway is set *and* the gateway value does not specify a port as described above.
+
+-  **bind** (optional) - If present, this value is a string describing the local IP address to which the mailet should be bound while delivering emails. If the tag is absent then the service will bind to the default local address of the machine. This tag is useful for multihomed machines.<br></br>Note: Currently you must use the same IP address for all of those RemoteDelivery instances where you explicitly supply a bind address.
+
+-  **startTLS** (optional) - a boolean value (true/false) indicating whether starTLS is on. Defaults to false.
+
+-  **sslEnable** (optional) - a boolean value (true/false) indicating whether starTLS is on. Defaults to false.
+
+-  **debug** (optional) - a boolean value (true/false) indicating whether debugging is on. Defaults to false.
+
+</subsection><subsection name="RemoveAllMailAttributes">
+Description: Removes all attributes on the Mail instance.
+
+Parameters: None.
+</subsection><subsection name="RemoveMailAttributes">
+Description: Remove attributes on the Mail instance.
+
+Parameters:
+
+-  **name** (required) - The name of the attribute to remove.
+
+</subsection><subsection name="Resend">
+Description:A mailet providing configurable redirection services. For more information see the javadocs [here](apidocs/org/apache/james/transport/mailets/Resend.html) .
+
+Parameters: [See javadocs.](apidocs/org/apache/james/transport/mailets/Resend.html) 
+</subsection><subsection name="ServerTime">
+Description: This mailet sends a message to the sender of the original mail message with a server timestamp.
+
+Parameters: None.
+</subsection><subsection name="SetMailAttributes">
+Description: Set attributes on the Mail instance.
+
+Parameters:
+
+-  **name** (required) - The name of the attribute to set.
+
+</subsection><subsection name="SetMimeHeader">
+Description: Set an MimeHeader on a MimeMessage.
+
+Parameters:
+
+-  **name** (required) - the name of the header to be added to the message.
+
+-  **value** (required) - the text that will be added as a header to the message.
+
+</subsection><subsection name="SMIMECheckSignature">
+Description: Verifies the s/mime signature of a message. The s/mime signing ensure that the private key owner is the real sender of the message. To be checked by this mailet the s/mime signature must contain the actual signature, the signer's certificate and optionally a set of certificate that can be used to create a chain of trust that starts from the signer's certificate and leads to a known trusted certificate.
+
+This check is composed by two steps: firstly it's ensured that the signature is valid, then it's checked if a chain of trust starting from the signer certificate and that leads to a trusted certificate can be created. The first check verifies that the the message has not been modified after the signature was put and that the signer's certificate was valid at the time of the signing. The latter should ensure that the signer is who he declare to be.
+
+Parameters: [See javadocs.](apidocs/org/apache/james/transport/mailets/smime/SMIMECheckSignature.html) 
+</subsection><subsection name="SMIMEDecrypt">
+Description: This mailet decrypts a s/mime encrypted message. It takes as input an encrypted message and it tries to dechiper it using the key specified in its configuration. If the decryption is successful the mail will be changed and it will contain the decrypted message. The mail attribute `org.apache.james.SMIMEDecrypt` will contain the public certificate of the key used in the process.
+
+Parameters: [See javadocs.](apidocs/org/apache/james/transport/mailets/smime/SMIMEDecrypt.html) 
+</subsection><subsection name="SMIMESign">
+Description: Puts a *server-side* SMIME signature on a message. It is a concrete subclass of SMIMEAbstractSign, with very few modifications to it.
+
+A text file with an explanation text is attached to the original message, and the resulting message with all its attachments is signed. The resulting appearence of the message is almost unchanged: only an extra attachment and the signature are added.
+
+Parameters: [See javadocs.](apidocs/org/apache/james/transport/mailets/smime/SMIMESign.html) 
+</subsection><subsection name="ToProcessor">
+Description: Redirects processing of the mail message to the specified processor.
+
+Parameters:
+
+-  **processor** (required) - the name of the processor to which the message is to be redirected.
+
+-  **noticeText** (optional) - a String value that, if present, is set as the error message of the redirected message. If this value is not present, no error message is set.
+
+</subsection><subsection name="ToMultiRepository">
+Description: Receives a Mail from JamesSpoolManager and takes care of delivery of the message to local inboxes or a specific repository. Differently from LocalDelivery this does not lookup the UserRepository This simply store the message in a repository named like the local part of the recipient address. If no repository is specified then this fallback to MailServer.getUserInbox. Otherwise you can add your own configuration for the repository.
+
+Parameters:
+
+-  **repositoryUrl** (required) - the URL of the repository to which the message is to be added.
+
+-  **addDeliveryHeader** (optional) - a String value which can be used specify a header which will add to the message. Default is to not add a header.
+
+</subsection><subsection name="ToRepository">
+Places a copy of the message in the specified repository.
+
+Parameters:
+
+-  **repositoryPath** (required) - the URL of the repository to which the message is to be added.
+
+-  **passThrough** (optional) - a boolean value (true/false) indicating whether processing should continue on the message is on. If false, the original message is GHOSTed. Defaults to false.
+
+</subsection><subsection name="UseHeaderRecipients">
+Description: Ignores the recipients associated with the Mail interface. Instead, it regenerates the mail recipients from the MimeMessage headers (To, Cc, Bcc) and inserts a new message at the queue root these new recipients. The original message is GHOSTed.
+
+Parameters:
+
+-  **debug** (optional) - a boolean value (true/false) indicating whether debugging is on. Defaults to false.
+
+</subsection><subsection name="UsersRepositoryAliasingForwarding">
+Receives a Mail from JamesSpoolManager and takes care of delivery of the message to local inboxes.
+
+Parameters:
+
+-  **enableAliases** (optional) - Specify wether the user aliases should be looked up or not. Default is false.
+
+-  **enableForwarding** (optional) -Enable the forwarding. Default to false.
+
+-  **usersRepository** (optional) - Specific users repository name. Default to empty. If empty does lookup the default userRepository.
+
+</subsection><subsection name="WhiteListManager">
+Manages for each local user a "white list" of remote addresses whose messages should never be blocked as spam.
+
+The normal behaviour is to check, for a local sender, if a remote recipient is already in the list: if not, it will be automatically inserted. This is under the interpretation that if a local sender *X* sends a message to a remote recipient *Y* , then later on if a message is sent by *Y* to *X* it should be considered always valid and never blocked; hence *Y* should be in the white list of *X* .
+
+Another mode of operations is when a local sender sends a message to *whitelistManagerAddress* with one of three specific values in the subject, to (i) send back a message displaying a list of the addresses in his own list; (ii) insert some new addresses in his own list; (iii) remove some addresses from his own list. In all this cases the message will be ghosted and the postmaster will reply to the sender.
+
+The sender name is always converted to its primary name (handling aliases).
+
+Parameters:
+
+-  **repositoryPath** - The repository path.
+
+-  **automaticInsert** (optional) - If true automatically inserts the local sender to remote recipients entries in the whitelist. Default is false.
+
+-  **whitelistManagerAddress** (optional) - Set this to an email address of the "whitelist manager" to send commands to (default is null).
+
+-  **displayFlag** (optional) - Set this to a unique text that you can use (by sending a message to the "whitelist manager" above) to tell the mailet to send back the contents of the white list. Default is null.
+
+-  **insertFlag** (optional) - Set this to a unique text that you can use (by sending a message to the "whitelist manager" above) to tell the mailet to insert some new remote recipients to the white list. Default is null.
+
+-  **removeFlag** (optional) - Set this to a unique text that you can use (by sending a message to the "whitelist manager" above) to tell the mailet to remove some remote recipients from the white list. Default is null.
+
+</subsection>



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