3 new revisions:
Revision: 2a9f0cc5f60b
Branch: default
Author: gm2552
Date: Thu Feb 12 19:33:29 2015 UTC
Log: Adding 4.0 build changes for stock assembly.
https://code.google.com/p/nhin-d/source/detail?r=2a9f0cc5f60b
Revision: 59aeff6b1419
Branch: default
Author: gm2552
Date: Thu Feb 12 19:33:50 2015 UTC
Log: Adding missing file.
https://code.google.com/p/nhin-d/source/detail?r=59aeff6b1419
Revision: 247c3694e9e6
Branch: default
Author: gm2552
Date: Thu Feb 12 19:40:52 2015 UTC
Log: Adding Java RI 4.0
https://code.google.com/p/nhin-d/source/detail?r=247c3694e9e6
==============================================================================
Revision: 2a9f0cc5f60b
Branch: default
Author: gm2552
Date: Thu Feb 12 19:33:29 2015 UTC
Log: Adding 4.0 build changes for stock assembly.
https://code.google.com/p/nhin-d/source/detail?r=2a9f0cc5f60b
Added:
/java/assembly/stock/src/scripts/james3/setdomain.bat
/java/assembly/stock/src/scripts/setdomain.bat
Modified:
/java/assembly/stock/pom.xml
/java/assembly/stock/src/books/users-guide/depl-hisp-only.confluence
/java/assembly/stock/src/scripts/james3/set-domain-mailetcontainer.xsl
/java/assembly/stock/src/scripts/set-domain.xsl
=======================================
--- /dev/null
+++ /java/assembly/stock/src/scripts/james3/setdomain.bat Thu Feb 12
19:33:29 2015 UTC
@@ -0,0 +1,4 @@
+set DIRECT_DOMAIN=%1
+ant -q -f %DIRECT_HOME%/apache-james-3.0-beta4/bin/set-domain.xml
+echo "Domain set to %1"
+echo "Postmaster set to postmaster@%1"
=======================================
--- /dev/null
+++ /java/assembly/stock/src/scripts/setdomain.bat Thu Feb 12 19:33:29 2015
UTC
@@ -0,0 +1,4 @@
+set DIRECT_DOMAIN=%1
+ant -q -f %DIRECT_HOME%/james-2.3.2/bin/set-domain.xml
+echo "Domain set to %1"
+echo "Postmaster set to postmaster@%1"
=======================================
--- /java/assembly/stock/pom.xml Wed Apr 23 18:28:24 2014 UTC
+++ /java/assembly/stock/pom.xml Thu Feb 12 19:33:29 2015 UTC
@@ -59,7 +59,14 @@
<url>
https://oss.sonatype.org/content/repositories/releases/</url>
</repository>
</repositories>
- <dependencies>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
@@ -217,18 +224,18 @@
<groupId>org.nhind</groupId>
<artifactId>config-service</artifactId>
<type>war</type>
- <version>2.0-SNAPSHOT</version>
+ <version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-service-client</artifactId>
<type>jar</type>
- <version>2.0-SNAPSHOT</version>
+ <version>2.0</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-model</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
@@ -240,42 +247,42 @@
<groupId>org.nhind</groupId>
<artifactId>xd</artifactId>
<type>war</type>
- <version>1.0.2</version>
+ <version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>xd-common</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>agent</artifactId>
- <version>2.1-SNAPSHOT</version>
+ <version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>gateway</artifactId>
- <version>3.1-SNAPSHOT</version>
+ <version>4.0</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>direct-common</artifactId>
- <version>1.3-SNAPSHOT</version>
+ <version>1.4.2</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>direct-common-audit</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>dns</artifactId>
- <version>1.2.3</version>
+ <version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-manager</artifactId>
- <version>1.0.1</version>
+ <version>1.1</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
@@ -285,7 +292,7 @@
<dependency>
<groupId>org.nhind</groupId>
<artifactId>xdmail</artifactId>
- <version>1.1.3</version>
+ <version>1.1.4</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
@@ -353,7 +360,7 @@
<artifactItem>
<groupId>org.nhind</groupId>
<artifactId>dns</artifactId>
- <version>1.2.3</version>
+ <version>1.2.5</version>
<type>tar.gz</type>
<overWrite>true</overWrite>
</artifactItem>
@@ -371,7 +378,7 @@
<artifactItem>
<groupId>org.nhind</groupId>
<artifactId>config-manager</artifactId>
- <version>1.0.1</version>
+ <version>1.1</version>
<type>tar.gz</type>
<overWrite>true</overWrite>
</artifactItem>
@@ -420,7 +427,6 @@
<include name="concurrent*" />
<include name="dnsjava*" />
<include name="dsn*" />
- <include name="guice*" />
<include name="jcs*" />
<include name="mail*" />
</fileset>
=======================================
--- /java/assembly/stock/src/books/users-guide/depl-hisp-only.confluence
Tue Jul 23 13:11:17 2013 UTC
+++ /java/assembly/stock/src/books/users-guide/depl-hisp-only.confluence
Thu Feb 12 19:33:29 2015 UTC
@@ -22,6 +22,18 @@
From a deployment perspective, there are no differences between 2.x and
3.x when installing the required components other than updated versions of
components. Configuration of the policy enable module is described in the
direct-policy library users [guide|
http://api.nhindirect.org/java/site/direct-policy/1.0/users-guide/dev-sta.html].
+h2. Major Updates in Version 4.0+
+
+Version 4.0 of the Mare Metal assembly introduced a number of new features
focused on real world production issues. These include:
+* A complete re-implementation of the configuration service API using a
RESTful paradigm.
+** Supports a pluggalbe authentication model and a BasicAuth model by
default.
+* Mandatory encryption of p12 files stored in the configuration service.
Pre-existing p12 files will remain unencrypted, but it is highly advised
that you re-import them.
+* Support of PKCS12 hardware tokens for storage of p12 secret keys.
+* RDBMS based auditing support and pluggable auditing configuration.
+* Default TLS edge encryption for IMAP, POP3, and SMTP in James 3.
+
+From a deployment perspective, there are some key configuration changes to
take advantage of the new features. These will be discussed in their
appropriate sections.
+
h2. Assumptions
* User is running one of the following software platforms. Other
platforms are supported and may only required slight variations of the
instructions listed this section, but the Bare Metal install has only been
validated on the following platforms:
@@ -35,6 +47,9 @@
*** 12.04 (Precise Pangolin)
*** 12.10 (Quantal Quetzal)
*** 13.04 (Raring Ringtail)
+*** 13.10 (Saucy Salamander)
+*** 14.04 (Trusty Tahr)
+*** 14.10 (Utopic Unicorn)
** FreeBSD 9.1
** CentOS 5+
** RHEL 5.5+
@@ -49,7 +64,7 @@
* Unzip
* Ant
-* Java SE 6
+* Java SE 6 or 7
h3. Unzip
@@ -116,19 +131,19 @@
pkg_add -r wget
{code}
-h3. Java 6 SE
+h3. Java SE
-The Java 6 SE platform provides the runtime environment that all of the
Bare Metal components will run in.
+The Java 6 and 7 SE platforms provides the runtime environment that all of
the Bare Metal components will run in. The package has been tested with
both.
_Windows_
-Download and install the Java 6 JRE from Oracle's download web [site|
http://www.oracle.com/technetwork/java/javase/downloads/jre-6u29-download-513650.html].
After installing the JRE, set the JAVA_HOME environment variable by
following the instructions below:
+Download and install the Java 6 or 7 JRE from Oracle's download web [site|
http://www.oracle.com/technetwork/java/javaseproducts/downloads/index.html].
After installing the JRE, set the JAVA_HOME environment variable by
following the instructions below:
* Right click on "My Computer" (may be in different locations depending on
the Windows version) and select Properties
* If running later versions of Windows, you may be
presented "Control\System" panel. If so, click Advanced system settings on
the left side of the window.
* In the System Properties Dialog, click the Advanced tab and then click
Environment Variables.
* Under System Variables click New.
-* Use the following setting:
+* Use the following settings example substituting with the appropriate
folder:
{code}
Variable Name: JAVA_HOME
@@ -158,7 +173,7 @@
The Oracle JREs are supported in the [WebUpdt8|
https://launchpad.net/~webupd8team/+archive/java] Personal Package Archive
(PPA) which automatically downloads and installs the JRE.
-To install the Java 6 JRE, follow the commands below:
+To install PPA, follow the commands below:
*Note:* The add-apt-repository command may not be available. Adding the
python-software-properties package should resolve this issue. It is also
okay to ignore the "no alternative" error messages displayed after running
the update-java-alternatives command.
@@ -166,11 +181,25 @@
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
+{code}
+
+To install Java 6:
+
+{code}
sudo apt-get install oracle-java6-installer
sudo update-java-alternatives -s java-6-oracle
export JAVA_HOME=/usr/lib/jvm/java-6-oracle
echo "export JAVA_HOME=$JAVA_HOME" | sudo tee -a /etc/environment
{code}
+
+To install Java 7:
+
+{code}
+ sudo apt-get install oracle-java7-installer
+ sudo update-java-alternatives -s java-7-oracle
+ export JAVA_HOME=/usr/lib/jvm/java-7-oracle
+ echo "export JAVA_HOME=$JAVA_HOME" | sudo tee -a /etc/environment
+{code}
_CentOS/RHEL_
@@ -234,7 +263,10 @@
The Sun JRE/JDK requires the JCE policy jars to be updated to allow for
unlimited strength encryption. The policy files must be downloaded
separately and copied in the JRE library.
-For all platforms, download the jce policy [file|
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html]
using a web browser. For Unix/Linux systems, it may be necessary to
manually copy or FTP the file from a system with a UI to the Unix/Linux
node.
+For all platforms, download the jce policy file using a web browser. For
Unix/Linux systems, it may be necessary to manually copy or FTP the file
from a system with a UI to the Unix/Linux node.
+
+* [Java 6|
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html]
+* [Java 7|
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html]
_Windows_
@@ -245,7 +277,7 @@
From the directory where you downloaded and placed the jce zip file, run
the following commands:
{code}
- unzip jce_policy-6.zip
+ unzip <jce zip file name>
sudo cp jce/local_policy.jar $JAVA_HOME/jre/lib/security
sudo cp jce/US_export_policy.jar $JAVA_HOME/jre/lib/security
{code}
@@ -270,26 +302,26 @@
From a browser, download the desired version of the assembly from one the
repositories above.
-Example: Download version 3.0 - [direct-project-stock-3.0.tar.gz|
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/3.0/direct-project-stock-3.0.tar.gz].
After downloading, unzip the contents to appropriate installation location.
+Example: Download version 4.0 - [direct-project-stock-4.0.tar.gz|
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz].
After downloading, unzip the contents to appropriate installation location.
_All Linux/Unix_
-Obtain the URL for appropriate version of the assembly and download it the
/opt directory by running wget command from the /opt directory. For
example, to download version direct-project-stock-3.0.tar.gz from maven
central, use the following commands:
+Obtain the URL for appropriate version of the assembly and download it the
/opt directory by running wget command from the /opt directory. For
example, to download version direct-project-stock-4.0.tar.gz from maven
central, use the following commands:
{code}
cd /opt
- sudo wget
http://repo2.maven.apache.org/maven2/org/nhind/direct-project-stock/3.0/direct-project-stock-3.0.tar.gz
+ sudo wget
http://repo2.maven.apache.org/maven2/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
{code}
If you are denied access to the location above, try the Sonatype
repostitory using the following command.
{code}
cd /opt
- sudo wget
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/3.0/direct-project-stock-3.0.tar.gz
+ sudo wget
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
{code}
Extract the contents of the assembly and set the DIRECT HOME logical using
the following command. Note the name of the tar.gz file if you downloaded
a different version:
{code}
- sudo tar xvfz direct-project-stock-3.0.tar.gz
+ sudo tar xvfz direct-project-stock-4.0.tar.gz
export DIRECT_HOME=`pwd`/direct
echo "export DIRECT_HOME=$DIRECT_HOME" | sudo tee -a /etc/environment
{code}
@@ -302,19 +334,19 @@
cd /
mkdir opt
cd /opt
- sudo wget
http://repo2.maven.apache.org/maven2/org/nhind/direct-project-stock/3.0/direct-project-stock-3.0.tar.gz
+ sudo wget
http://repo2.maven.apache.org/maven2/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
{code}
If you are denied access to the location above, try the Sonatype
repostitory using the following command.
{code}
cd /opt
- sudo wget
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/3.0/direct-project-stock-3.0.tar.gz
+ sudo wget
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
{code}
Extract the contents of the assembly and set the DIRECT HOME logical using
the following command. Note the name of the tar.gz file if you downloaded
a different version:
{code}
- sudo tar xvfz direct-project-stock-3.0.tar.gz
+ sudo tar xvfz direct-project-stock-4.0.tar.gz
sed -i .bak 's/setenv=/setenv=DIRECT_HOME=\/opt\/direct,/g'
/etc/login.conf
cap_mkdb /etc/login.conf
{code}
@@ -425,16 +457,30 @@
_Windows_
+*NOTE* You will need ant installed to use the batch file method.
+
*James 2.3.2*
-Manually edit the file config.xml under DIRECT
HOME/james-2.3.2/apps/james/SAR-INF and change the following settings:
+To set the domain via the batch file, open a command prompt, CD to
the %DIRECT_HOME%/james-2.3.2 directory and run the following command:
+
+{code}
+ bin/setdomain <your domain name>
+{code}
+
+If you don't have Ant installed, manually edit the file config.xml
under %DIRECT_HOME%/james-2.3.2/apps/james/SAR-INF and change the following
settings:
* <postmaster>postmaster@localhost</postmaster> to
<postmaster>postmaster@<your domain name></postmaster>
* <servername>localhost</servername> to <servername>your domain
name</servername>
* match="RecipAndSenderIsNotLocal=
mydomain.com" to
match="RecipAndSenderIsNotLocal=your domain name"
*James 3*
-Manually edit the file domainlist.conf under DIRECT
HOME/apache-james-3.0-beta4/conf and change the following settings under
the XML based configuration (not the JPA configuration settings):
+To set the domain via the batch file, open a command prompt, CD to
the %DIRECT_HOME%/apache-james-3.0-beta4 directory and run the following
command:
+
+{code}
+ bin/setdomain <your domain name>
+{code}
+
+Manually edit the file domainlist.conf
under %DIRECT_HOM%E/apache-james-3.0-beta4/conf and change the following
settings under the XML based configuration (not the JPA configuration
settings):
*NOTE:* James3 has better support of multiple domains hosted in a single
mail server. You may add multiple domains to this list, but you must list
only one default domain.
* <domainname>localhost</domainname> to <domainname>your domain
name</domainname>
@@ -547,11 +593,11 @@
Following are optional, but recommended, next steps to secure your
environment.
-_Secure Configuration Service Port (8081)_
+h3. Secure Configuration Service Port (8081)
To secure the configuration service, it is recommended to limit access to
port 8081 to localhost and/or a local subnet.
-_Secure Configuration Service Password_
+h3. Secure Configuration Service Password
To further protect the configuration service, or if port 8081 must remain
public, it is recommended to change the default password.
@@ -579,10 +625,16 @@
sh bin/startup.sh
{code}
-_Tweak Message Monitoring Service Settings_
+h3. Add Own Server Certificate to James 3
+
+If you are using James 3, the default configuration enables last mile
encryption (SSL and TLS) on the edge POP3, SMTP, and IMAP protocols. This
is enabled via configuration in the imapserver.conf, pop3server.conf, and
smtpserver.conf files. For POP3 and IMAP4, all connections use the
STARTTLS command. For the SMTP protocol, the configuration enables
STARTTLS for local outgoing connections that must be authenticated, but all
incoming SMTP exchanges from external systems will continue to use non
SSL/TLS connections.
+
+To enable encryption, a server certificate must be installed along with
its private key. The James 3 configuration comes pre-packaged with a self
signed certificate. Most email and edge clients will display a warning to
the user noting that the certificate should probably not be trusted. At
this point, it is recommneded that you either install your own certificate
or install a certificate from a PKI third party. In either case, you will
need to create your own keystore file with your own certificate and deploy
it in the James _conf_ directory. This should be the same place where the
default cakeystore.jks is located. After deploying your own keystore, you
will need to update the SSL connection section of the imapserver.conf,
pop3server.conf, and smtpserver.conf files with the location of your own
keystore file and passphrase for the keystore file.
+
+h3. Tweak Message Monitoring Service Settings
The message monitoring service is preconfigured with common settings, but
can be tweaked to your specific requirements. See the monitoring
deployment [guide|
http://api.nhindirect.org/java/site/direct-msg-monitor/1.1.3/users-guide/deployment.html]
for more details.
-_Define Policy Definitions_
+h3. Define Policy Definitions
Starting with version 3.0, an optional module is available for defining
X509 certificate policies. See the policy enablement module
(direct-policy) users [guide|
http://api.nhindirect.org/java/site/direct-policy/1.0/users-guide/] for
full details.
=======================================
--- /java/assembly/stock/src/scripts/james3/set-domain-mailetcontainer.xsl
Wed Oct 3 14:53:24 2012 UTC
+++ /java/assembly/stock/src/scripts/james3/set-domain-mailetcontainer.xsl
Thu Feb 12 19:33:29 2015 UTC
@@ -55,7 +55,32 @@
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:for-each>
- </xsl:element>
+ <xsl:for-each select="SmptAgentConfigProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityManagerProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSubject">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSecret">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentAuditorProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ </xsl:element>
</xsl:when>
<!-- Otherwise just copy things -->
=======================================
--- /java/assembly/stock/src/scripts/set-domain.xsl Fri Jul 20 12:21:13
2012 UTC
+++ /java/assembly/stock/src/scripts/set-domain.xsl Thu Feb 12 19:33:29
2015 UTC
@@ -61,7 +61,32 @@
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
- </xsl:for-each>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentConfigProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityManagerProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSubject">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSecret">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentAuditorProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
</xsl:element>
</xsl:when>
==============================================================================
Revision: 59aeff6b1419
Branch: default
Author: gm2552
Date: Thu Feb 12 19:33:50 2015 UTC
Log: Adding missing file.
https://code.google.com/p/nhin-d/source/detail?r=59aeff6b1419
Modified:
/java/assembly/stock/src/scripts/build.xml
=======================================
--- /java/assembly/stock/src/scripts/build.xml Fri Apr 25 13:08:45 2014 UTC
+++ /java/assembly/stock/src/scripts/build.xml Thu Feb 12 19:33:50 2015 UTC
@@ -65,9 +65,9 @@
<property name="james3.stage.springserver"
value="${james3.stage.conf.dir}/META-INF/org/apache/james/spring-server.xml"></property>
<!-- tomcat properties -->
- <property name="tomcat.binary.url"
value="
http://apache.mirrors.pair.com/tomcat/tomcat-7/v7.0.53/bin/apache-tomcat-7.0.53.tar.gz"></property>
- <property name="tomcat.binary.zip"
value="${build.download.dir}/apache-tomcat-7.0.53.tar.gz"></property>
- <property name="tomcat.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/apache-tomcat-7.0.53"></property>
+ <property name="tomcat.binary.url"
value="
http://apache.mirrors.pair.com/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz"></property>
+ <property name="tomcat.binary.zip"
value="${build.download.dir}/apache-tomcat-7.0.59.tar.gz"></property>
+ <property name="tomcat.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/apache-tomcat-7.0.59"></property>
<property name="tomcat.webapp.dir"
value="${tomcat.stage.dir}/webapps"></property>
<property name="tomcat.bin.dir"
value="${tomcat.stage.dir}/bin"></property>
<property name="tomcat.stage.config"
value="${tomcat.stage.dir}/conf/server.xml"></property>
@@ -83,7 +83,7 @@
<!-- Config server files -->
<property name="config.root" value="${config.root}/../config"></property>
<property name="config.service.dir"
value="${config.root}/config-service/target"></property>
- <property name="config.service.orig.war"
value="config-service-2.0-SNAPSHOT.war"></property>
+ <property name="config.service.orig.war"
value="config-service-2.1.2.war"></property>
<property name="config.service.dest.war"
value="config-service.war"></property>
<property name="config.ui.dir"
value="${config.root}/config-ui/target"></property>
<property name="config.ui.orig.war" value="config-ui-1.3.war"></property>
@@ -92,7 +92,7 @@
<!-- xd server files -->
<property name="xd.root" value="${config.root}/../xd"></property>
<property name="xd.service.dir"
value="${config.root}/xd/target"></property>
- <property name="xd.service.orig.war" value="xd-1.0.2.war"></property>
+ <property name="xd.service.orig.war" value="xd-1.0.3.war"></property>
<property name="xd.service.dest.war" value="xd.war"></property>
@@ -146,6 +146,9 @@
<property name="lib.spring-orm"
value="${install.root.dir}/lib/spring-orm-3.0.4.RELEASE.jar"></property>
<property name="lib.spring-tx"
value="${install.root.dir}/lib/spring-tx-3.0.4.RELEASE.jar"></property>
<property name="lib.javassist"
value="${install.root.dir}/lib/javassist-3.4.GA.jar"></property>
+ <property name="lib.antlr"
value="${install.root.dir}/lib/antlr-2.7.6.jar"></property>
+ <property name="lib.slf4j-api"
value="${install.root.dir}/lib/slf4j-api-1.6.1.jar"></property>
+ <property name="lib.commons-collections"
value="${install.root.dir}/lib/commons-collections-3.2.1.jar"></property>
<!-- Support libraries (DNS) -->
<property name="lib.jcs"
value="${install.root.dir}/lib/jcs-1.3.jar"></property>
@@ -157,8 +160,8 @@
<property name="lib.jaxrpc-api"
value="${install.root.dir}/lib/jaxrpc-api-1.1.jar"></property>
<property name="lib.commons-discovery"
value="${install.root.dir}/lib/commons-discovery-0.4.jar"></property>
<property name="lib.axis"
value="${install.root.dir}/lib/axis-1.4.jar"></property>
- <property name="lib.config.proxy"
value="${install.root.dir}/lib/config-service-client-2.0-SNAPSHOT.jar"></property>
- <property name="lib.config-model"
value="${install.root.dir}/lib/config-model-1.0-SNAPSHOT.jar"></property>
+ <property name="lib.config.proxy"
value="${install.root.dir}/lib/config-service-client-2.0.jar"></property>
+ <property name="lib.config-model"
value="${install.root.dir}/lib/config-model-1.0.jar"></property>
<!-- Package libraries -->
<property name="agent.dir"
value="${install.root.dir}/../agent"></property>
@@ -167,12 +170,12 @@
<property name="direct-common-audit.dir"
value="${install.root.dir}/../direct-common-audit"></property>
<property name="xdmail.dir"
value="${install.root.dir}/../xdmail"></property>
<property name="xd-common.dir"
value="${install.root.dir}/../xd-common"></property>
- <property name="lib.agent"
value="${install.root.dir}/lib/agent-2.1-SNAPSHOT.jar"></property>
- <property name="lib.gateway"
value="${install.root.dir}/lib/gateway-3.1-SNAPSHOT.jar"></property>
- <property name="lib.direct-common"
value="${install.root.dir}/lib/direct-common-1.3-SNAPSHOT.jar"></property>
- <property name="lib.direct-common-audit"
value="${install.root.dir}/lib/direct-common-audit-1.0-SNAPSHOT.jar"></property>
- <property name="lib.xdmail"
value="${install.root.dir}/lib/xdmail-1.1.3.jar"></property>
- <property name="lib.xd-common"
value="${install.root.dir}/lib/xd-common-1.0.2.jar"></property>
+ <property name="lib.agent"
value="${install.root.dir}/lib/agent-2.0.13.jar"></property>
+ <property name="lib.gateway"
value="${install.root.dir}/lib/gateway-4.0.jar"></property>
+ <property name="lib.direct-common"
value="${install.root.dir}/lib/direct-common-1.4.2.jar"></property>
+ <property name="lib.direct-common-audit"
value="${install.root.dir}/lib/direct-common-audit-1.0.jar"></property>
+ <property name="lib.xdmail"
value="${install.root.dir}/lib/xdmail-1.1.4.jar"></property>
+ <property name="lib.xd-common"
value="${install.root.dir}/lib/xd-common-1.0.3.jar"></property>
<property name="lib.policy"
value="${install.root.dir}/lib/direct-policy-1.0.jar"></property>
<!-- Stylesheet to edit the config file -->
@@ -370,6 +373,9 @@
<copy file="${lib.spring-orm}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
<copy file="${lib.spring-tx}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
<copy file="${lib.javassist}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.antlr}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.slf4j-api}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-collections}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
<!-- edit the config.xml file -->
<copy file="${james.stage.config}" tofile="${james.stage.config.save}"
overwrite="true"></copy>
@@ -378,6 +384,7 @@
<copy file="${src}/scripts/phoenix.sh" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
<copy file="${src}/scripts/run.bat" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
<copy file="${src}/scripts/setdomain.sh" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
+ <copy file="${src}/scripts/setdomain.bat" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
<copy file="${src}/scripts/set-domain.xml"
todir="${james.stage.dir}/bin" overwrite="true"></copy>
<copy file="${src}/scripts/set-domain.xsl"
todir="${james.stage.dir}/bin" overwrite="true"></copy>
@@ -451,6 +458,7 @@
<copy file="${lib.spring-orm}" todir="${james3.stage.lib.dir}"></copy>
<copy file="${lib.spring-tx}" todir="${james3.stage.lib.dir}"></copy>
<copy file="${lib.javassist}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.antlr}" todir="${james3.stage.lib.dir}"></copy>
<!-- copy the new config files -->
<copy file="${src}/scripts/james3/domainlist.conf"
tofile="${james3.stage.domainlist}" overwrite="true"></copy>
@@ -465,6 +473,7 @@
<copy file="${src}/scripts/james3/spring-server.xml"
tofile="${james3.stage.springserver}" overwrite="true"></copy>
<copy file="${src}/scripts/james3/setdomain.sh"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/setdomain.bat"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
<copy file="${src}/scripts/james3/set-domain.xml"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
<copy file="${src}/scripts/james3/set-domain-domainlist.xsl"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
<copy file="${src}/scripts/james3/set-domain-mailetcontainer.xsl"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
@@ -473,11 +482,11 @@
</target>
<target name="configure-tomcat">
- <property name="config.service.orig.war"
value="config-service-2.0-SNAPSHOT.war"></property>
+ <property name="config.service.orig.war"
value="config-service-2.1.2.war"></property>
<property name="config.service.dest.war"
value="config-service.war"></property>
<property name="config.ui.orig.war" value="config-ui.war"></property>
<property name="config.ui.dest.war" value="config-ui.war"></property>
- <property name="xd.service.orig.war" value="xd-1.0.2.war"></property>
+ <property name="xd.service.orig.war" value="xd-1.0.3.war"></property>
<property name="xd.service.dest.war" value="xd.war"></property>
<property name="msg-monitor.service.orig.war"
value="direct-msg-monitor-web-1.1.3.war"></property>
<property name="msg-monitor.service.dest.war"
value="msg-monitor.war"></property>
==============================================================================
Revision: 247c3694e9e6
Branch: default
Author: gm2552
Date: Thu Feb 12 19:40:52 2015 UTC
Log: Adding Java RI 4.0
https://code.google.com/p/nhin-d/source/detail?r=247c3694e9e6
Added:
/java/tags/stock-4.0/install.sh
/java/tags/stock-4.0/pom.xml
/java/tags/stock-4.0/src/books/users-guide.xml
/java/tags/stock-4.0/src/books/users-guide/depl-hisp-only.confluence
/java/tags/stock-4.0/src/books/users-guide/depl-intro.confluence
/java/tags/stock-4.0/src/books/users-guide/images/certGenOpen.png
/java/tags/stock-4.0/src/books/users-guide/preface.apt
/java/tags/stock-4.0/src/descriptors/distribution.xml
/java/tags/stock-4.0/src/libs/wrapper-freebsd-x86-32
/java/tags/stock-4.0/src/libs/wrapper-freebsd-x86-64
/java/tags/stock-4.0/src/scripts/auditStore.properties
/java/tags/stock-4.0/src/scripts/build.xml
/java/tags/stock-4.0/src/scripts/catalina.bat
/java/tags/stock-4.0/src/scripts/catalina.sh
/java/tags/stock-4.0/src/scripts/config.xml
/java/tags/stock-4.0/src/scripts/edit-config.xsl
/java/tags/stock-4.0/src/scripts/edit-tomcat.xsl
/java/tags/stock-4.0/src/scripts/james3/cakeystore.jks
/java/tags/stock-4.0/src/scripts/james3/domainlist.conf
/java/tags/stock-4.0/src/scripts/james3/imapserver.conf
/java/tags/stock-4.0/src/scripts/james3/log4j.properties
/java/tags/stock-4.0/src/scripts/james3/mailetcontainer.conf
/java/tags/stock-4.0/src/scripts/james3/persistence_james.xml
/java/tags/stock-4.0/src/scripts/james3/pop3server.conf
/java/tags/stock-4.0/src/scripts/james3/set-domain-domainlist.xsl
/java/tags/stock-4.0/src/scripts/james3/set-domain-mailetcontainer.xsl
/java/tags/stock-4.0/src/scripts/james3/set-domain.xml
/java/tags/stock-4.0/src/scripts/james3/setdomain.bat
/java/tags/stock-4.0/src/scripts/james3/setdomain.sh
/java/tags/stock-4.0/src/scripts/james3/smtpserver.conf
/java/tags/stock-4.0/src/scripts/james3/spring-server.xml
/java/tags/stock-4.0/src/scripts/james3/wrapper.conf
/java/tags/stock-4.0/src/scripts/phoenix.sh
/java/tags/stock-4.0/src/scripts/run.bat
/java/tags/stock-4.0/src/scripts/set-domain.xml
/java/tags/stock-4.0/src/scripts/set-domain.xsl
/java/tags/stock-4.0/src/scripts/setdomain.bat
/java/tags/stock-4.0/src/scripts/setdomain.sh
/java/tags/stock-4.0/src/site/resources/css/site.css
/java/tags/stock-4.0/src/site/resources/images/logo.png
/java/tags/stock-4.0/src/site/site.xml
/java/tags/stock-4.0/src/site/xdoc/index.xml
/java/tags/stock-4.0/src/tools/certGen.bat
/java/tags/stock-4.0/src/tools/certGen.sh
/java/tags/stock-4.0/src/tools/createPKCS12.sh
/java/tags/stock-4.0/src/tools/dnsCertDumper.bat
/java/tags/stock-4.0/src/tools/dnsCertDumper.sh
/java/tags/stock-4.0/src/tools/ldapCertDumper.bat
/java/tags/stock-4.0/src/tools/ldapCertDumper.sh
/java/tags/stock-4.0/src/tools/policyBuilder.bat
/java/tags/stock-4.0/src/tools/policyBuilder.sh
/java/tags/stock-4.0/src/tools/stripP12Pass.sh
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/install.sh Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,39 @@
+#!/bin/sh -x
+if [ $# -gt 0 ] ; then
+ export DIRECT_INSTALL_DIR_REL=$1
+ if [ ! -d $DIRECT_INSTALL_DIR_REL -a ! -e $DIRECT_INSTALL_DIR_REL ]; then
+ mkdir $DIRECT_INSTALL_DIR_REL
+ else
+ if [ ! -d $DIRECT_INSTALL_DIR_REL ]; then
+ echo "Can't make directory $DIRECT_INSTALL_DIR_REL"
+ exit 1
+ fi
+ fi
+else
+ export DIRECT_INSTALL_DIR_REL=build
+ if [ ! -d $DIRECT_INSTALL_DIR_REL -a ! -e $DIRECT_INSTALL_DIR_REL ]; then
+ mkdir $DIRECT_INSTALL_DIR_REL
+ else
+ if [ ! -d $DIRECT_INSTALL_DIR_REL ]; then
+ echo "Can't make directory $DIRECT_INSTALL_DIR_REL"
+ exit 1
+ fi
+ fi
+fi
+if [ ! -d $DIRECT_INSTALL_DIR_REL ]; then
+ echo "Installation directory $DIRECT_INSTALL_DIR_REL does not exist"
+ exit 1
+fi
+export DIRECT_INSTALL_DIR=`cd $DIRECT_INSTALL_DIR_REL; pwd`
+export DIRECT_INSTALL_PACKAGE_DIR=${DIRECT_INSTALL_DIR}/james-2.3.2
+if [ -d $DIRECT_INSTALL_PACKAGE_DIR -o -e $DIRECT_INSTALL_PACKAGE_DIR ];
then
+ echo "Can't install to $DIRECT_INSTALL_PACKAGE_DIR - file or directory
exists"
+ exit 1
+else
+ echo "DIRECT_INSTALL_DIR=$DIRECT_INSTALL_DIR"
+ echo "DIRECT_INSTALL_DIR_REL=$DIRECT_INSTALL_DIR_REL"
+ echo "Installing Direct in $DIRECT_INSTALL_PACKAGE_DIR"
+ echo "Installing Direct in $DIRECT_INSTALL_PACKAGE_DIR"
+ export DIRECT_INSTALL_CD=`pwd`
+ ant -f src/scripts/build.xml
+fi
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/pom.xml Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,643 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="
http://maven.apache.org/POM/4.0.0"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd ">
+ <groupId>org.nhind</groupId>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>direct-project-stock</artifactId>
+ <packaging>pom</packaging>
+ <name>The direct project stock assembly.</name>
+ <version>4.0</version>
+ <description>Stock assembly for the direct project using the Apache
James mail server and the Apache Jetty web container.</description>
+ <inceptionYear>2010</inceptionYear>
+
<url>
http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/direct-project-stock/${project.version}</url>
+ <developers>
+ <developer>
+ <name>Greg Meyer</name>
+ <id>GM2552</id>
+ <email>
gm2...@cerner.com</email>
+ <roles>
+ <role>owner</role>
+ </roles>
+ </developer>
+ <developer>
+ <id>MBAMBERG</id>
+ <name>Mark Bamberg</name>
+ <email>
mbam...@nhinconnect.org</email>
+ <organization>HNIN Direct</organization>
+ <organizationUrl>
http://nhindirect.org</organizationUrl>
+ </developer>
+ </developers>
+ <organization>
+ <name>The Direct Proejct</name>
+ <url>
http://nhindirect.org</url>
+ </organization>
+ <prerequisites>
+ <maven>2.0.4</maven>
+ </prerequisites>
+ <scm>
+
<url>
http://code.google.com/p/nhin-d/source/browse/#hg/java/assembly/stock</url>
+
<connection>scm:hg:
https://nhin-d.googlecode.com/hg/nhin-d/java/assembly/stock</connection>
+ </scm>
+ <issueManagement>
+ <system>Google Code</system>
+ <url>
http://code.google.com/p/nhin-d/issues/list</url>
+ </issueManagement>
+ <licenses>
+ <license>
+ <name>New BSD License</name>
+ <url>
http://nhindirect.org/BSDLicense</url>
+ </license>
+ </licenses>
+ <repositories>
+ <repository>
+ <id>sonatype-snapshot</id>
+ <name>Sonatype OSS Maven SNAPSHOT Repository</name>
+
<url>
https://oss.sonatype.org/content/repositories/snapshots/</url>
+ </repository>
+ <repository>
+ <id>sonatype-release</id>
+ <name>Sonatype OSS Maven release Repository</name>
+
<url>
https://oss.sonatype.org/content/repositories/releases/</url>
+ </repository>
+ </repositories>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.6.1</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <version>2.2.0</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <type>jar</type>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <type>jar</type>
+ <version>
3.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ <type>jar</type>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ <type>jar</type>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <type>jar</type>
+ <version>2.1_3</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <type>jar</type>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-jta</artifactId>
+ <type>jar</type>
+ <version>1.0.1B-rc4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <type>jar</type>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <type>jar</type>
+ <version>
3.2.6.ga</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <type>jar</type>
+ <version>
3.3.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <type>jar</type>
+ <version>
3.0.0.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <type>jar</type>
+ <version>
3.3.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <type>jar</type>
+ <version>
3.3.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>3.2.3.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>3.2.3.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>3.2.3.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>3.2.3.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>3.2.3.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>3.0.4.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ <version>3.0.4.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>3.0.4.RELEASE</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>direct-msg-monitor-web</artifactId>
+ <type>war</type>
+ <version>1.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>config-service</artifactId>
+ <type>war</type>
+ <version>2.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>config-service-client</artifactId>
+ <type>jar</type>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>config-model</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>config-ui</artifactId>
+ <type>war</type>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>xd</artifactId>
+ <type>war</type>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>xd-common</artifactId>
+ <version>1.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>agent</artifactId>
+ <version>2.0.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>gateway</artifactId>
+ <version>4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>direct-common</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>direct-common-audit</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>dns</artifactId>
+ <version>1.2.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>config-manager</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>dsn</artifactId>
+ <version>1.4.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>xdmail</artifactId>
+ <version>1.1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nhind</groupId>
+ <artifactId>direct-policy</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.james</groupId>
+ <artifactId>apache-jsieve-mailet</artifactId>
+ <version>0.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.3</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>2.1.13</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>RELEASE</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>1.0-beta-6</version>
+ </extension>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>1.0-beta-6</version>
+ </extension>
+ </extensions>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-artifact-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+
<outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-dns-services</id>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.nhind</groupId>
+ <artifactId>dns</artifactId>
+ <version>1.2.5</version>
+ <type>tar.gz</type>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ </artifactItems>
+
<outputDirectory>${project.build.directory}/direct</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-config-mgmt</id>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.nhind</groupId>
+ <artifactId>config-manager</artifactId>
+ <version>1.1</version>
+ <type>tar.gz</type>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ </artifactItems>
+
<outputDirectory>${project.build.directory}/direct</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copyscripts</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <copy todir="${project.build.directory}/src">
+ <fileset dir="${basedir}/src"/>
+ </copy>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>package tools</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <mkdir dir="${project.build.directory}/direct/" />
+ <mkdir dir="${project.build.directory}/direct/tools" />
+ <mkdir dir="${project.build.directory}/direct/tools/lib"
/>
+ <copy
todir="${project.build.directory}/direct/tools/lib">
+ <fileset dir="${project.build.directory}/lib">
+ <include name="activiation*" />
+ <include name="agent*" />
+ <include name="direct-policy*" />
+ <include name="bcmail*" />
+ <include name="bcprov*" />
+ <include name="commons-codec*" />
+ <include name="commons-io*" />
+ <include name="commons-logging*" />
+ <include name="concurrent*" />
+ <include name="dnsjava*" />
+ <include name="dsn*" />
+ <include name="jcs*" />
+ <include name="mail*" />
+ </fileset>
+ </copy>
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <id>installScript</id>
+ <phase>package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>/bin/sh</executable>
+
<workingDirectory>${project.build.directory}</workingDirectory>
+ <arguments>
+ <argument>${project.basedir}/install.sh</argument>
+ <argument>direct</argument>
+ </arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+
<descriptor>src/descriptors/distribution.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- DOXIA does not yet copy resources to the generated-site or
site location. Bug
+ DOXIA-355 was submitted in July of 09 and is listed to be resolved
in DOXIA 1.2.
+ This plugin a is work around for copying the resources from the
book source to
+ the generate site. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>book</id>
+ <phase>pre-site</phase>
+ <configuration>
+ <tasks>
+ <copy
todir="${project.build.directory}/generated-site/xdoc/users-guide/images/">
+ <fileset
dir="${basedir}/src/books/users-guide/images/" />
+ </copy>
+ <copy
todir="${project.build.directory}/site/users-guide/images/">
+ <fileset
dir="${basedir}/src/books/users-guide/images/" />
+ </copy>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-maven-plugin</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>render-books</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <books>
+ <book>
+ <directory>src/books/users-guide</directory>
+ <descriptor>src/books/users-guide.xml</descriptor>
+ <formats>
+ <format>
+ <id>xdoc</id>
+ </format>
+ </formats>
+ </book>
+ </books>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-decoration-model</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-confluence</artifactId>
+ <version>1.2</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.6.1</version>
+ <configuration>
+ <charset>UTF-8</charset>
+ <docencoding>UTF-8</docencoding>
+ <docfilessubdirs>true</docfilessubdirs>
+ <detectJavaApiLink>true</detectJavaApiLink>
+ <detectLinks>true</detectLinks>
+ <source>1.6</source>
+ <show>protected</show>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0</version>
+ <configuration>
+
<tagBase>scm:hg:
https://nhin-d.googlecode.com/hg/nhin-d/java/tags</tagBase>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>2.1.1</version>
+ <dependencies>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <distributionManagement>
+ <site>
+ <id>nhind-site</id>
+ <name>NHIN Direct API publication site</name>
+
<url>sftp://
api.nhindirect.org/x/www/api.nhindirect.org/java/site/assembly/stock/${project.version}</url>
+ </site>
+ <snapshotRepository>
+ <id>sonatype-snapshot</id>
+ <name>Sonatype OSS Maven SNAPSHOT Repository</name>
+ <url>
https://oss.sonatype.org/content/repositories/snapshots/</url>
+ <uniqueVersion>false</uniqueVersion>
+ </snapshotRepository>
+ <repository>
+ <id>sonatype-release</id>
+ <name>Sonatype OSS Maven Release Repositor</name>
+
<url>
https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+ <uniqueVersion>false</uniqueVersion>
+ </repository>
+ </distributionManagement>
+</project>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/books/users-guide.xml Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<book xmlns="
http://maven.apache.org/BOOK/1.0.0"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="
http://maven.apache.org/BOOK/1.0.0 ../../../doxia/doxia-book/target/generated-site/xsd/book-1.0.0.xsd">
+ <id>users-guide</id>
+ <title>Direct Java Reference Implementation Bare Metal Users
Guide</title>
+ <chapters>
+ <chapter>
+ <id>preface</id>
+ <title>Preface</title>
+ <sections>
+ <section>
+ <id>preface</id>
+ </section>
+ </sections>
+ </chapter>
+ <chapter>
+ <id>deploy</id>
+ <title>Deploymenet Guide</title>
+ <sections>
+ <section>
+ <id>depl-intro</id>
+ </section>
+ <section>
+ <id>depl-hisp-only</id>
+ </section>
+ </sections>
+ </chapter>
+ </chapters>
+</book>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/books/users-guide/depl-hisp-only.confluence
Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,640 @@
+h1. HISP Only Deployment (no source)
+
+This section outlines step by step instructions on installing and
deploying a Bare Metal instance of the Java reference implementation. The
instructions contains steps for a select list of software platforms such as
Windows, Ubuntu, CentOS, and RedHat Enterprise linux.
+
+h2. Major Updates in Version 2.0+
+
+Version 2.0 of the Bare Metal assembly added three major functional
enhancements from the previous 1.x releases:
+
+* Support of the delivery notification implementation [guide|
http://wiki.directproject.org/file/detail/Implementation+Guide+for+Delivery+Notification+in+Direct+v1.0.pdf]
for timely and reliable delivery.
+* Support for common message failure scenarios including common bounce
messages with context appropriate failure information.
+* Experimental support for the Apache James server 3.0-beta4 release.
+
+From a deployment and configuration perspective, the key differences are
the addition of the message monitoring service deployed in Tomcat and
changes to the James config.xml file for support of the delivery
notification guide and other failure scenarios. If you are upgrading from
version 1.x, be aware of the addition of the new monitoring service and the
config.xml changes. Also note that the Tomcat startup file (catalina.sh)
increases the max perm gen size.
+
+If you installing 2.0 and later from scratch, the appropriate changes have
already been included in the assembly.
+
+*NOTE:* James 3 support is only experimental. There are no guarantees
that it will work with all configurations, and the final release of James 3
may change significantly from the current beta-4 release.
+
+h2. Major Updates in Version 3.0+
+
+Version 3.0 of the Bare Metal assembly added the policy enablement module
as an optional component.
+
+From a deployment perspective, there are no differences between 2.x and
3.x when installing the required components other than updated versions of
components. Configuration of the policy enable module is described in the
direct-policy library users [guide|
http://api.nhindirect.org/java/site/direct-policy/1.0/users-guide/dev-sta.html].
+
+h2. Major Updates in Version 4.0+
+
+Version 4.0 of the Mare Metal assembly introduced a number of new features
focused on real world production issues. These include:
+* A complete re-implementation of the configuration service API using a
RESTful paradigm.
+** Supports a pluggalbe authentication model and a BasicAuth model by
default.
+* Mandatory encryption of p12 files stored in the configuration service.
Pre-existing p12 files will remain unencrypted, but it is highly advised
that you re-import them.
+* Support of PKCS12 hardware tokens for storage of p12 secret keys.
+* RDBMS based auditing support and pluggable auditing configuration.
+* Default TLS edge encryption for IMAP, POP3, and SMTP in James 3.
+
+From a deployment perspective, there are some key configuration changes to
take advantage of the new features. These will be discussed in their
appropriate sections.
+
+h2. Assumptions
+
+* User is running one of the following software platforms. Other
platforms are supported and may only required slight variations of the
instructions listed this section, but the Bare Metal install has only been
validated on the following platforms:
+** Windows
+*** Server 2003 or later
+*** XP SP2 or later
+** Ubuntu Linux
+*** 10.10 (Maverick Meerkat)
+*** 11.04 (Natty Narwhal)
+*** 11.10 (Oneiric Ocelot)
+*** 12.04 (Precise Pangolin)
+*** 12.10 (Quantal Quetzal)
+*** 13.04 (Raring Ringtail)
+*** 13.10 (Saucy Salamander)
+*** 14.04 (Trusty Tahr)
+*** 14.10 (Utopic Unicorn)
+** FreeBSD 9.1
+** CentOS 5+
+** RHEL 5.5+
+* Assumed that the install has administrative privileges on the install
box.
+** Root or sudo access for linux/unix based platforms
+** Administrator privileges for Windows based platforms
+* Assumed user has registered a domain with an accredited domain registrar
such as [GoDaddy|
http://www.godaddy.com/]
+
+h2. General Tools and Runtimes
+
+The reference implementation requires some tools to be available on the
platform to install and run the Bare Metal components.
+
+* Unzip
+* Ant
+* Java SE 6 or 7
+
+h3. Unzip
+
+An unzip tool is required to unpack the stock assembly. Recommended tools
and installation locations are listed below:
+
+_Windows_
+
+Any one of the following will work for Windows:
+
+* [Winzip|
www.winzip.com]
+* [WinRar|
http://www.win-rar.com/download.html]
+
+_Ubuntu_
+
+Install unzip using the following command:
+
+{code}
+ sudo apt-get install unzip
+{code}
+
+_CentOS/RHEL_
+
+Unzip tools should already be installed, but if not execute the following
commands with root or sudo privileges:
+
+{code}
+ yum install unzip
+ yum install gzip
+ yum install tar
+{code}
+
+h3. Ant
+
+The Ant tool is used for setting the domain name in the Apache James
server.
+
+_Windows_
+
+Download Apache Ant from the following location and follow in the install
instructions under Documentation/Manual located on the upper left side of
the site below
+
+* [Apache Ant|
http://ant.apache.org/bindownload.cgi]
+
+_Ubuntu_
+
+Install ant using the following command:
+
+{code}
+ sudo apt-get install ant
+{code}
+
+_CentOS/RHEL_
+
+TDB
+
+_FreeBSD_
+
+Install ant using the following command (should run as root or with
elevated privileges):
+
+{code}
+ pkg_add -r apache-ant
+{code}
+
+FreeBSD also does not come with _wget_ by default. Install wget using the
following command:
+
+{code}
+ pkg_add -r wget
+{code}
+
+h3. Java SE
+
+The Java 6 and 7 SE platforms provides the runtime environment that all of
the Bare Metal components will run in. The package has been tested with
both.
+
+_Windows_
+
+Download and install the Java 6 or 7 JRE from Oracle's download web [site|
http://www.oracle.com/technetwork/java/javaseproducts/downloads/index.html].
After installing the JRE, set the JAVA_HOME environment variable by
following the instructions below:
+
+* Right click on "My Computer" (may be in different locations depending on
the Windows version) and select Properties
+* If running later versions of Windows, you may be
presented "Control\System" panel. If so, click Advanced system settings on
the left side of the window.
+* In the System Properties Dialog, click the Advanced tab and then click
Environment Variables.
+* Under System Variables click New.
+* Use the following settings example substituting with the appropriate
folder:
+
+{code}
+ Variable Name: JAVA_HOME
+ Variable Value: C:\Program Files\java\jre6
+{code}
+
+* Click OK on all screens.
+
+_Ubuntu 10.10 - 11.10_
+
+Install Sun Java 6 JDK. By default it is not included in the shipped
repository, and needs to be added manually. After installing, you need to
update java-alternatives to use the newly installed Java version instead of
shipped version.
+
+*Note:* For Ubuntu 10.10 Maverick, the add-apt-repository command may not
be not available. Instead, uncomment or add the canonical
repository "_
http://archive.canonical.com/ lucid partner_" in the
/etc/apt/sources.list and follow the remainder of the steps.
+
+{code}
+ sudo add-apt-repository "deb
http://archive.canonical.com/ lucid partner"
+ sudo apt-get update
+ sudo apt-get install sun-java6-jdk
+ sudo update-java-alternatives -s java-6-sun
+ export JAVA_HOME=/usr/lib/jvm/java-6-sun
+ echo "export JAVA_HOME=$JAVA_HOME" | sudo tee -a /etc/environment
+{code}
+
+*Note:* It is okay to ignore the "no alternative" error messages displayed
after running the update-java-alternatives command.
+
+_Ubuntu 12.04 - 13.04_
+
+The Oracle JREs are supported in the [WebUpdt8|
https://launchpad.net/~webupd8team/+archive/java] Personal Package Archive
(PPA) which automatically downloads and installs the JRE.
+
+To install PPA, follow the commands below:
+
+*Note:* The add-apt-repository command may not be available. Adding the
python-software-properties package should resolve this issue. It is also
okay to ignore the "no alternative" error messages displayed after running
the update-java-alternatives command.
+
+{code}
+ sudo apt-get install python-software-properties
+ sudo add-apt-repository ppa:webupd8team/java
+ sudo apt-get update
+{code}
+
+To install Java 6:
+
+{code}
+ sudo apt-get install oracle-java6-installer
+ sudo update-java-alternatives -s java-6-oracle
+ export JAVA_HOME=/usr/lib/jvm/java-6-oracle
+ echo "export JAVA_HOME=$JAVA_HOME" | sudo tee -a /etc/environment
+{code}
+
+To install Java 7:
+
+{code}
+ sudo apt-get install oracle-java7-installer
+ sudo update-java-alternatives -s java-7-oracle
+ export JAVA_HOME=/usr/lib/jvm/java-7-oracle
+ echo "export JAVA_HOME=$JAVA_HOME" | sudo tee -a /etc/environment
+{code}
+
+_CentOS/RHEL_
+
+Obtain/downlaod the JDK 6 Update 29 package using the following command
for the appropriate processor architecture:
+
+x86 (32 bit)
+{code}
+ wget
http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-i586-rpm.bin
+{code}
+
+x64 (64 bit)
+{code}
+ wget
http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64-rpm.bin
+{code}
+
+After downloading, execute the following commands to install the JDK for
the appropriate processor architecture:
+
+x86 (32 bit)
+{code}
+ chmod 755 jdk-6u29-linux-i586-rpm.bin
+ sudo ./jdk-6u29-linux-i586-rpm.bin
+{code}
+
+x64 (64 bit)
+{code}
+ chmod 755 jdk-6u29-linux-x64-rpm.bin
+ sudo ./jdk-6u29-linux-x64-rpm.bin
+{code}
+
+After installing, you need to update java alternatives to use the newly
installed Java version instead of shipped version. Start by creating
alternatives for the new java commands installed above. Execute the
following commands to set the Sun JDK:
+
+{code}
+ sudo alternatives --install /usr/bin/java java
/usr/java/jdk1.6.0_22/bin/java 100
+ sudo alternatives --install /usr/bin/jar jar
/usr/java/jdk1.6.0_22/bin/jar 100
+ sudo alternatives --install /usr/bin/javac javac
/usr/java/jdk1.6.0_22/bin/javac 100
+
+ sudo alternatives --config java
+ sudo alternatives --config jar
+ sudo alternatives --config javac
+{code}
+
+Finally set the JAVA_HOME environment variable for the new JDK using the
following commands:
+
+{code}
+ export JAVA_HOME=/usr/java/jdk1.6.0_22
+ echo "export JAVA_HOME=$JAVA_HOME" | sudo tee -a /etc/environment
+{code}
+
+_FreeBSD_
+
+Obtain/downlaod the JDK 6 using the pkg\_add command if you do not already
have Java 6 installed. This step uses the openjdk6 implementation as the
Oracle installtation generally requires building the distribution from the
_ports_ and is a much more involved process (should run as root or with
elevated privileges).
+
+{code}
+ pkg_add -r openjdk6
+ set JAVA_HOME=/usr/local/openjdk6
+ sed -i .bak 's/setenv=/setenv=JAVA_HOME=\/usr\/local\/openjdk6,/g'
/etc/login.conf
+ cap_mkdb /etc/login.conf
+{code}
+
+h3. Java Cryptographic Extensions
+
+The Sun JRE/JDK requires the JCE policy jars to be updated to allow for
unlimited strength encryption. The policy files must be downloaded
separately and copied in the JRE library.
+
+For all platforms, download the jce policy file using a web browser. For
Unix/Linux systems, it may be necessary to manually copy or FTP the file
from a system with a UI to the Unix/Linux node.
+
+* [Java 6|
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html]
+* [Java 7|
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html]
+
+_Windows_
+
+Unzip the downloaded file and copy the jar files from the jce directory to
the JAVA_HOME/jre/lib/security folder (Example: C:\Program
Files\java\jre6\lib\security). Overwrite the existing files.
+
+_All Linux/Unix/FreeBSD_
+
+From the directory where you downloaded and placed the jce zip file, run
the following commands:
+
+{code}
+ unzip <jce zip file name>
+ sudo cp jce/local_policy.jar $JAVA_HOME/jre/lib/security
+ sudo cp jce/US_export_policy.jar $JAVA_HOME/jre/lib/security
+{code}
+
+
+h2. Obtain Reference Implementation Stock Assembly
+
+The stock assembly contains all of the pre-assembled and configured
components of the Bare Metal deployment. Download the latest version of
the stock assembly from the maven central [repository|
http://repo2.maven.org/maven2/org/nhind/direct-project-stock/] or the
Sonatype [repository|
https://oss.sonatype.org/content/repositories/snapshots/org/nhind/direct-project-stock/].
+
+*Note:* The maven central repository may black list some IP ranges such as
virutal machines running in the Amazon EC2 cloud. Use the Sonatype
repository if you are blocked from the maven central repository.
+
+The assembly contains a root directly named _direct_ and has the following
folders under the root.
+
+* apache-tomcat-7.0.41
+* DirectDNSServices
+* ConfigTools
+* james-2.3.2
+* apache-james-3.0-beta4
+* tools
+
+_Windows_
+
+From a browser, download the desired version of the assembly from one the
repositories above.
+
+Example: Download version 4.0 - [direct-project-stock-4.0.tar.gz|
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz].
After downloading, unzip the contents to appropriate installation location.
+
+_All Linux/Unix_
+
+Obtain the URL for appropriate version of the assembly and download it the
/opt directory by running wget command from the /opt directory. For
example, to download version direct-project-stock-4.0.tar.gz from maven
central, use the following commands:
+{code}
+ cd /opt
+ sudo wget
http://repo2.maven.apache.org/maven2/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
+{code}
+
+If you are denied access to the location above, try the Sonatype
repostitory using the following command.
+{code}
+ cd /opt
+ sudo wget
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
+{code}
+
+Extract the contents of the assembly and set the DIRECT HOME logical using
the following command. Note the name of the tar.gz file if you downloaded
a different version:
+
+{code}
+ sudo tar xvfz direct-project-stock-4.0.tar.gz
+ export DIRECT_HOME=`pwd`/direct
+ echo "export DIRECT_HOME=$DIRECT_HOME" | sudo tee -a /etc/environment
+{code}
+
+_FreeBSD_
+
+Obtain the URL for appropriate version of the assembly and download it the
/opt directory by running wget command from the /opt directory. You may
need to initially create the /opt directory. For example, to download
version direct-project-stock-3.0.tar.gz from maven central, use the
following commands:
+
+{code}
+ cd /
+ mkdir opt
+ cd /opt
+ sudo wget
http://repo2.maven.apache.org/maven2/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
+{code}
+
+If you are denied access to the location above, try the Sonatype
repostitory using the following command.
+{code}
+ cd /opt
+ sudo wget
https://oss.sonatype.org/content/repositories/releases/org/nhind/direct-project-stock/4.0/direct-project-stock-4.0.tar.gz
+{code}
+
+Extract the contents of the assembly and set the DIRECT HOME logical using
the following command. Note the name of the tar.gz file if you downloaded
a different version:
+
+{code}
+ sudo tar xvfz direct-project-stock-4.0.tar.gz
+ sed -i .bak 's/setenv=/setenv=DIRECT_HOME=\/opt\/direct,/g'
/etc/login.conf
+ cap_mkdb /etc/login.conf
+{code}
+
+You will need to logout or possiblly reboot at this point in order for the
global DIRECT_HOME variable to take affect. Failing to reboot will cause
the setdomain script to fail in later steps.
+
+{code}
+ reboot
+{code}
+
+h2. Launch Tomcat
+
+Before running the James mail servier, the configuration and message
monitiroing services must be running and some minimum configuration
completed. All of these services run inside the Tomcat web server.
+
+To start the tomcat server, run the following command from the DIRECT
HOME/apache-tomcat-7.0.41/bin directory.
+
+_Windows_
+{code}
+ startup
+{code}
+
+_All Unix/Linux/FreeBSD_
+{code}
+ sudo ./startup.sh
+{code}
+
+*Note:* It may take a few minutes for the web server to finish loading as
it must initially deploy all of the services when run for the first time.
+
+To validate that Tomcat and the configuration services loaded
successfully, launch a browser window against the server node with the
following URL:
+
+{code}
+ http://<server>:8081/config-ui
+{code}
+
+You should be presented with the configuration ui login [screen|
http://api.nhindirect.org/java/site/gateway/2.1/users-guide/smtp-depl-wsconfig.html]
+
+h2. Domain Name and Certificate Generation
+
+The first step in running your mail server is configuring the domain and a
loading a trust anchor and certificate into the configuration ui.
+
+First determine your HISPs domain name. Depending on the type of
certificate resolution services you wish to host, your domain nameing
convention may slightly differ. Regardless of the certificate hosting
model, you will need to have to have registered domain. For this document,
we will assume you have a domain registered called
example.com.
+
+*Note:* Refer to the Direct Project DNS Configuration [Guide|
http://wiki.directproject.org/DNS+Configuration+Guide] as a starting point
for determining your DNS naming convention.
+
+Now that we have our registered domain, we will host our HISP Direct
messaging under the domain
direct.example.com.
+
+The next step is create a root certificate (anchor) for our domain and an
X509 certificate for encrypting/decrypting and signing message. There are
many different options for getting these certiicates such as using openssl
or obtaining a certificate from a comercial third party such as Entrust or
VeriSign. However the Direct Project reference implementation assembly
ships a tool called certGen for generating root CAs and certificates for
the purpose of pilots and interop testing.
+
+Full documentation for the certGen tool can be found [here|
http://api.nhindirect.org/java/site/agent/1.5.1/users-guide/dev-cert-gen.html].
The documentation in the certGen link runs the certGen tool from the
reference implemntation source tree. In the Bare Metal assembly, the
certGen tool is found under the /direct/tools directory that was extracted
from the tar.gz file.
+
+Run the certGen tool from tools directory using the following command:
+
+_Windows_
+{code}
+ certGen
+{code}
+
+_All Unix/Linux/FreeBSD_
+{code}
+ ./certGen.sh
+{code}
+
+h3. Certificate Generation
+
+Now create a CA for your domain. In the certGen tool, enter a common name
(CN:) for your new CA. For our domain
direct.example.com, we might use
something like _
Direct.Example.Com Root CA_. Fill the other fields as
needed. It is recommended you set the expiration to 1 year, the key
strenth to at least 2048 bytes, and provide a password for your CA's
private key.
+
+After creating the CA, create a leaf cert and using your domain name as
the CN: field and fill in all other fields as needed. It is recommended
you set the expiration to 1 year, the key strength to at least 1024 bytes,
and provide a password for your private key. Also make sure the _Add Email
To Al Subject Names_ is checked. After creating your CA and certificate,
you should have to following similarly named files in your /tools directory
(assuming the
direct.example.com domain and no email address entered in the
CA dialog. If an email address is entered, then the CA files will have the
eamil address in the file name instead of the CN field).
+
+*
Direct.Example.com Root CA.der = Root CA file (trust anchor for you HISP)
+*
Direct.Example.com Root CAKey.der - Root CA private key file
+* direct.example.com.der - Org certificate file
+* direct.example.comKey.der - Org certificate private key file
+* direct.example.com.p12 - Org certificate PKCS12 file
+
+h2. Import Anchors and Certificates
+
+Before the James mail server can be run, you must create you domain in the
configuration ui tool and import anchors and certificates. Follow the
steps below to create your domain and import your trust anchor and
certificate. A full description of the config ui and operations can be
found [here|
http://api.nhindirect.org/java/site/gateway/2.1/users-guide/smtp-depl-wsconfig.html].
+
+# Log into http://<server>:8081/config-ui with username: admin and
password: adm1nD1r3ct
+## Click Create New Domain.
+## Enter the Domain Name and Postmaster E-Mail Address for the domain this
HISP will be handling. Typical postmaster address is postmaster@<domain
name>.
+## Choose ENABLED as the status.
+## Click Add
+# Click the Anchors tab.
+## Click *Browse...* and browse to the location of your trust anchor, and
select it.
+## Check Incoming and Outgoing
+## Choose ENABLED as the status.
+## Click add anchor
+# Click Certificate at the top of the screen
+## Click *Browse...* and browse to the location of you org certificate
PKCS12 file, and select it
+## Choose ENABLED as the status.
+## Click Add Crtificate
+
+*Note:* You do not have to enter any additional agent setting in version
1.2 and higher of the Bare Metal assembly. The agent automatically
defaults to standard settings for optimal interoperability.
+
+Before your HISP can communicate with other HISP, you must import anchors
from other HISPs to estabilish trusted communication. You must also
provide your trust anchor to the HISP(s) you are communicating with. There
are a few options of HISPs that exist for interop testing that can be
easily accessed. Anchors of these HISP can be found and downloaded from
the Direct Project google code source [page|
http://code.google.com/p/nhin-d/source/browse/certs/anchors/].
+
+*
securehealth.email.com
+** Testing HISP running the latest version of the Java Bare Metal
assembly. Contact
gm2...@cerner.com to establish a trust relationship.
+** Anchor File Name: Direct Securehealthemail CA.der
+* Health Value Stage
+** Microsoft Health Vault staging environment. Anchors are exchange by
sending an email with you are and your anchor to
hv...@microsoft.com. More
details can be found in this [blog|
http://blogs.msdn.com/b/familyhealthguy/archive/2011/02/12/start-sharing-information-with-patients-today.aspx]
+** Anchor File Name: HealthVault_Staging CA.cer
+
+h2. Configure and Run James Mail Server
+
+First, configure james with your domain name. Depending on the version of
James you choose to use, the configuration will differ slightly.
+
+_Windows_
+
+*NOTE* You will need ant installed to use the batch file method.
+
+*James 2.3.2*
+
+To set the domain via the batch file, open a command prompt, CD to
the %DIRECT_HOME%/james-2.3.2 directory and run the following command:
+
+{code}
+ bin/setdomain <your domain name>
+{code}
+
+If you don't have Ant installed, manually edit the file config.xml
under %DIRECT_HOME%/james-2.3.2/apps/james/SAR-INF and change the following
settings:
+* <postmaster>postmaster@localhost</postmaster> to
<postmaster>postmaster@<your domain name></postmaster>
+* <servername>localhost</servername> to <servername>your domain
name</servername>
+* match="RecipAndSenderIsNotLocal=
mydomain.com" to
match="RecipAndSenderIsNotLocal=your domain name"
+
+*James 3*
+
+To set the domain via the batch file, open a command prompt, CD to
the %DIRECT_HOME%/apache-james-3.0-beta4 directory and run the following
command:
+
+{code}
+ bin/setdomain <your domain name>
+{code}
+
+Manually edit the file domainlist.conf
under %DIRECT_HOM%E/apache-james-3.0-beta4/conf and change the following
settings under the XML based configuration (not the JPA configuration
settings):
+
+*NOTE:* James3 has better support of multiple domains hosted in a single
mail server. You may add multiple domains to this list, but you must list
only one default domain.
+* <domainname>localhost</domainname> to <domainname>your domain
name</domainname>
+* <defaultDomain>localhost</defaultDomain> to <defaultDomain>your domain
name</defaultDomain>
+
+Manually edit the file mailetcontainer.conf under DIRECT
HOME/apache-james-3.0-beta4/conf and change the following settings:
+* <postmaster>postmaster@localhost</postmaster> to
<postmaster>postmaster@<your domain name></postmaster>
+*
match="org.nhindirect.gateway.smtp.james.matcher.RecipAndSenderIsNotLocal=
mydomain.com"
to
match="org.nhindirect.gateway.smtp.james.matcher.RecipAndSenderIsNotLocal=your
domain name"
+
+_All Unix/Linux/FreeBSD_
+
+Run the following commands:
+
+*James 2.3.2*
+
+{code}
+ cd $DIRECT_HOME/james-2.3.2
+ sh bin/setdomain.sh <your domain name>
+{code}
+
+*James 3*
+
+{code}
+ cd $DIRECT_HOME/apache-james-3.0-beta4
+ sh bin/setdomain.sh <your domain name>
+{code}
+
+Now start the Apache James mail server with security and trust agent with
the following commands:
+
+_Windows_
+
+From the DIRECT HOME/james-2.3.2/bin or DIRECT
HOME/apache-james-3.0-beta4/bin directory (depending on your James version)
run:
+
+*James 2.3.2*
+
+{code}
+ run.bat
+{code}
+
+*James 3*
+
+{code}
+ james install
+ james start
+{code}
+
+_All Unix/Linux/FreeBSD_
+
+*James 2.3.2*
+
+{code}
+ cd $DIRECT_HOME/james-2.3.2
+ sudo -E sh bin/run.sh > james.log 2>&1 &
+{code}
+
+*James 3*
+
+{code}
+ cd $DIRECT_HOME/apache-james-3.0-beta4/bin
+ sudo james startup
+{code}
+
+Now add your first user. The differs betweeen James versions as James
2.3.2 uses a telnet client and James 3 uses a JMX based command line
interface.
+
+
+*James 2.3.2*
+
+*Note For Windows Users:* You will need to open a separate command window
from the previous step. Later versions of Windows do not come with the
Telnet client installed. You have to manually install this using the
server manager console.
+
+{code}
+ telnet localhost 4555
+ > root
+ > root
+ > adduser username password
+ > quit
+{code}
+
+*Note:* The username should not contain _@domainname_. This is required
for James 3+, but should not be used for James 2.3.2.
+
+*James 3*
+
+{code}
+ cd $DIRECT_HOME/apache-james-3.0-beta4/bin
+ ./james-cli.sh -h localhost adduser username password
+{code}
+
+*Note:* The username *should* contain _@domainname_. This is required for
James 3+.
+
+h2. DNS Records
+
+Now that your HISP is running, you need to make it available to the public
internet. If you intend to make your HISP's certificate available via DNS
CERT records, you will need to install and configure the Direct DNS
Server. Instructions can be found in the DNS Servers users/deployment
[guide|
http://api.nhindirect.org/java/site/dns/1.2.1/users-guide/deploy.html].
This guide includes directions on integrating with GoDaddy.
+
+If you are not using DNS to distribute your certificates, you may use your
registrar's DNS configuration tooling to setup MX records for you HISP.
+
+h2. Distributing Certificates
+
+The prefered distribution mechanism for distributing your HISP's org
certificate is DNS CERT records. Instructions for setting up the Direct
DNS server are found in the DNS server deploymenet [guide|
http://api.nhindirect.org/java/site/dns/1.2.1/users-guide/deploy.html].
+
+*NOTE* Some OS distributions such as Ubuntu may already be running their
own DNS server process. If the OS is already running a DNS server bound to
the DNS ports (TCP and UDP ports 53), then you will need to stop these
services before running the Direct DNS server. For example, to determine
if Ubuntu already has a DNS running, run the following command and check
for a process listening on port.
+
+{code}
+ netstat -anp | grep 53
+{code}
+
+Another alternative is LDAP. The default settings in the security and
trust agent will attempt to use the Direct LDAP specication if SRV records
can be found. The LDAP standards can be found on the S&I framework's
Certificate Discovery for Direct Project workgroup [page|
https://docs.google.com/document/d/1igDpIizm7CTfV-fUw\_1EnrCUGIljFEgLPRHpgK5iaec/edit].
+
+A fall back alternative is manually distributing your org certificate to
the HISPs that you will communicate. This is an out of band process that
will require you to determine how to get your certificate to the HISP.
Likewise another HISP may need to manually give you their certificate(s) if
they do not support DNS or LDAP discovery. To add another HISPs
certificate (not anchor) to you HISP, import the certificate file into the
Certificates section of the configuration ui tool.
+
+h2. Recommended Next Steps
+
+Following are optional, but recommended, next steps to secure your
environment.
+
+h3. Secure Configuration Service Port (8081)
+
+To secure the configuration service, it is recommended to limit access to
port 8081 to localhost and/or a local subnet.
+
+h3. Secure Configuration Service Password
+
+To further protect the configuration service, or if port 8081 must remain
public, it is recommended to change the default password.
+
+_Windows_
+
+Manuall edit the config-servlet.xml file under DIRECT
HOME/apache-tomcat-7.0.41/webapps/config-ui/WEB-INF and change the
following setting to your new password:
+
+{code}
+ <security:user name="admin" password="adm1nD1r3ct"
authorities="ROLE_ADMIN"/>
+{code}
+
+Restart the tomcat server by running the following commands from the
DIRECT HOME/apache-tomcat-7.0.41/bin directory.
+
+{code}
+ shutdown
+ startup
+{code}
+
+_All Unix/Linux/FreeBSD_
+
+{code}
+ cp
$DIRECT_HOME/apache-tomcat-7.07/webapps/config-ui/WEB-INF/config-servlet.xml
$DIRECT_HOME/apache-tomcat-7.0.41/webapps/config-ui/WEB-INF/config-servlet.xml.orig
+ sed -i "s/adm1nD1r3ct/your_new_password/g"
$DIRECT_HOME/apache-tomcat-7.0.41/webapps/config-ui/WEB-INF/config-servlet.xml
+ sh bin/shutdown.sh
+ sh bin/startup.sh
+{code}
+
+h3. Add Own Server Certificate to James 3
+
+If you are using James 3, the default configuration enables last mile
encryption (SSL and TLS) on the edge POP3, SMTP, and IMAP protocols. This
is enabled via configuration in the imapserver.conf, pop3server.conf, and
smtpserver.conf files. For POP3 and IMAP4, all connections use the
STARTTLS command. For the SMTP protocol, the configuration enables
STARTTLS for local outgoing connections that must be authenticated, but all
incoming SMTP exchanges from external systems will continue to use non
SSL/TLS connections.
+
+To enable encryption, a server certificate must be installed along with
its private key. The James 3 configuration comes pre-packaged with a self
signed certificate. Most email and edge clients will display a warning to
the user noting that the certificate should probably not be trusted. At
this point, it is recommneded that you either install your own certificate
or install a certificate from a PKI third party. In either case, you will
need to create your own keystore file with your own certificate and deploy
it in the James _conf_ directory. This should be the same place where the
default cakeystore.jks is located. After deploying your own keystore, you
will need to update the SSL connection section of the imapserver.conf,
pop3server.conf, and smtpserver.conf files with the location of your own
keystore file and passphrase for the keystore file.
+
+h3. Tweak Message Monitoring Service Settings
+
+The message monitoring service is preconfigured with common settings, but
can be tweaked to your specific requirements. See the monitoring
deployment [guide|
http://api.nhindirect.org/java/site/direct-msg-monitor/1.1.3/users-guide/deployment.html]
for more details.
+
+h3. Define Policy Definitions
+
+Starting with version 3.0, an optional module is available for defining
X509 certificate policies. See the policy enablement module
(direct-policy) users [guide|
http://api.nhindirect.org/java/site/direct-policy/1.0/users-guide/] for
full details.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/books/users-guide/depl-intro.confluence Thu
Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,9 @@
+h1. About This Chapter
+
+This contents in this chapter are a starting-point, from which a
production HISP can be derived. The Bare Metal project is not intended to
be a final solution for real-world scenarios. It documents the fastest and
simplest way to launch an minimally operational HISP using the Java
reference implementation.
+
+It is strongly advised and encouraged to back the reference implementation
with a tested and proven enterprise mail server. Please review the various
deployment models and [configurations|
http://api.nhindirect.org/java/site/gateway/2.0.2/users-guide/depl-james.html]
with your system architect and decide which best suits your needs. This
should also involve input from you security officer to evaluate issues such
as HIPAA compliance.
+
+The Bare Metal install is not HIPAA compliant nor does it describe a
highly available and/or fault tolerant deployment.
+
+* [HISP Only Deployment (no source)|./depl-hisp-only.html]
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/books/users-guide/images/certGenOpen.png Thu
Feb 12 19:40:52 2015 UTC
Binary file, no diff available.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/books/users-guide/preface.apt Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,12 @@
+ -----
+ Introduction
+ -----
+ Greg Meyer
+ -----
+
+About this Document
+
+ This document describes the Bare Metal installation of the Java Direct
Project reference implementation from a pre-compiled assembly (no source).
For instructions of a source code based
+ install, see the Bare Metal Project Java source
{{{
http://wiki.directproject.org/Bare+Metal+Project+-+Java+%28source%29}page}}
on the Direct Project {{{
http://wiki.directproject.org}wiki}}.
+
+ * {{{./depl-intro.html}Deployment Guide}} - This section describes how
to deploy a Bare Metal installation from the stock reference implementation
assembly.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/descriptors/distribution.xml Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,63 @@
+<assembly
xmlns="
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>assembly</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${project.build.directory}/direct</directory>
+ <outputDirectory>/direct</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>src/tools/certGen.sh</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ <fileMode>777</fileMode>
+ </file>
+ <file>
+ <source>src/tools/certGen.bat</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ </file>
+ <file>
+ <source>src/tools/createPKCS12.sh</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ <fileMode>777</fileMode>
+ </file>
+ <file>
+ <source>src/tools/dnsCertDumper.sh</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ <fileMode>777</fileMode>
+ </file>
+ <file>
+ <source>src/tools/dnsCertDumper.bat</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ </file>
+ <file>
+ <source>src/tools/ldapCertDumper.sh</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ <fileMode>777</fileMode>
+ </file>
+ <file>
+ <source>src/tools/ldapCertDumper.bat</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ </file>
+ <file>
+ <source>src/tools/stripP12Pass.sh</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ <fileMode>777</fileMode>
+ </file>
+ <file>
+ <source>src/tools/policyBuilder.sh</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ <fileMode>777</fileMode>
+ </file>
+ <file>
+ <source>src/tools/policyBuilder.bat</source>
+ <outputDirectory>direct/tools/</outputDirectory>
+ </file>
+ </files>
+</assembly>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/libs/wrapper-freebsd-x86-32 Thu Feb 12
19:40:52 2015 UTC
Binary file, no diff available.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/libs/wrapper-freebsd-x86-64 Thu Feb 12
19:40:52 2015 UTC
Binary file, no diff available.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/auditStore.properties Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,5 @@
+auditStore.db.databasePlatform=org.hibernate.dialect.DerbyDialect
+auditStore.db.databaseDriver=org.apache.derby.jdbc.EmbeddedDriver
+auditStore.db.databaseURL=jdbc:derby:nhindconfig;create=true
+auditStore.db.username=nhind
+auditStore.db.password=nhind
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/build.xml Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,571 @@
+<project name="install" default="assemble" basedir=".">
+ <description>
+ Install the apache-james mail server for use with the Direct Project
+ </description>
+
+ <!-- check the os -->
+ <condition property="is.windows">
+ <os family="windows"></os>
+ </condition>
+ <condition property="is.unix">
+ <and>
+ <os family="unix"></os>
+ <not>
+ <os family="mac"></os>
+ </not>
+ </and>
+ </condition>
+ <condition property="is.mac">
+ <and>
+ <os family="unix"></os>
+ <os family="mac"></os>
+ </and>
+ </condition>
+ <condition property="is.someunix">
+ <os family="unix"></os>
+ </condition>
+
+ <!-- set global properties for this build -->
+
+ <property environment="env"></property>
+ <property name="install.root.dir"
value="${env.DIRECT_INSTALL_CD}"></property>
+
+ <property name="src" value="${install.root.dir}/src"></property>
+ <property name="resources.dir" value="${src}/main/resources"></property>
+ <property name="build.dir" value="${install.root.dir}/build"></property>
+ <property name="build.download.dir"
value="${build.dir}/download"></property>
+ <property name="apache.james.binary.url"
value="
http://www.gtlib.gatech.edu/pub/apache/james/server/apache-james-2.3.2.zip"></property>
+ <property name="apache.james.binary.zip"
value="${build.download.dir}/apache-james-2.3.2.zip"></property>
+
+ <property name="apache.james3.binary.url"
value="
http://mirrors.gigenet.com/apache//james/apache-james/3.0beta4/apache-james-3.0-beta4-app.tar.gz"></property>
+ <property name="apache.james3.binary.tar.gz"
value="${build.download.dir}/apache-james-3.0-beta4-app.tar.gz"></property>
+
+ <property name="james.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/james-2.3.2"></property>
+ <property name="james.stage.apps.dir"
value="${james.stage.dir}/apps/james"></property>
+ <property name="james.stage.config"
value="${james.stage.apps.dir}/SAR-INF/config.xml"></property>
+ <property name="james.stage.config.save"
value="${james.stage.apps.dir}/SAR-INF/config.xml.save"></property>
+ <property name="
james.stage.config.new"
value="${james.stage.apps.dir}/SAR-INF/config-new.xml"></property>
+ <property name="james.stage.apps.SAR-INF.lib.dir"
value="${james.stage.apps.dir}/SAR-INF/lib"></property>
+ <property name="james.stage.lib.dir"
value="${james.stage.dir}/lib"></property>
+ <property name="james.stage.lib.properties.dir"
value="${james.stage.lib.dir}/properties"></property>
+ <property name="james.stage.apps.james.sar.path"
value="${james.stage.dir}/apps/james.sar"></property>
+
+ <property name="james3.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/apache-james-3.0-beta4"></property>
+ <property name="james3.stage.conf.dir"
value="${james3.stage.dir}/conf"></property>
+ <property name="james3.stage.domainlist"
value="${james3.stage.conf.dir}/domainlist.conf"></property>
+ <property name="james3.stage.mailetcontainer"
value="${james3.stage.conf.dir}/mailetcontainer.conf"></property>
+ <property name="james3.stage.pop3server"
value="${james3.stage.conf.dir}/pop3server.conf"></property>
+ <property name="james3.stage.imapserver"
value="${james3.stage.conf.dir}/imapserver.conf"></property>
+ <property name="james3.stage.smtpserver"
value="${james3.stage.conf.dir}/smtpserver.conf"></property>
+ <property name="james3.stage.keystore"
value="${james3.stage.conf.dir}/cakeystore.jks"></property>
+ <property name="james3.stage.wrapper"
value="${james3.stage.conf.dir}/wrapper.conf"></property>
+ <property name="james3.stage.logging"
value="${james3.stage.conf.dir}/log4j.properties"></property>
+ <property name="james3.stage.lib.dir"
value="${james3.stage.conf.dir}/lib"></property>
+ <property name="james3.stage.persistence"
value="${james3.stage.conf.dir}/META-INF/persistence_james.xml"></property>
+ <property name="james3.stage.springserver"
value="${james3.stage.conf.dir}/META-INF/org/apache/james/spring-server.xml"></property>
+
+ <!-- tomcat properties -->
+ <property name="tomcat.binary.url"
value="
http://apache.mirrors.pair.com/tomcat/tomcat-7/v7.0.59/bin/apache-tomcat-7.0.59.tar.gz"></property>
+ <property name="tomcat.binary.zip"
value="${build.download.dir}/apache-tomcat-7.0.59.tar.gz"></property>
+ <property name="tomcat.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/apache-tomcat-7.0.59"></property>
+ <property name="tomcat.webapp.dir"
value="${tomcat.stage.dir}/webapps"></property>
+ <property name="tomcat.bin.dir"
value="${tomcat.stage.dir}/bin"></property>
+ <property name="tomcat.stage.config"
value="${tomcat.stage.dir}/conf/server.xml"></property>
+ <property name="tomcat.stage.config.save"
value="${tomcat.stage.config}.save"></property>
+ <property name="
tomcat.stage.config.new"
value="${tomcat.stage.config}.new"></property>
+ <property name="dnsservices.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/DirectDNSServices"></property>
+ <property name="dnsserver.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/DirectDNSServices/DirectDNSServer"></property>
+ <property name="dnsmgmt.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/DirectDNSServices/DNSMgmtConsole"></property>
+ <property name="configmgmr.stage.dir"
value="${env.DIRECT_INSTALL_DIR}/ConfigTools/ConfigMgmtConsole"></property>
+
+ <property name="maven.repo" value="${env.HOME}/.m2/repository"></property>
+
+ <!-- Config server files -->
+ <property name="config.root" value="${config.root}/../config"></property>
+ <property name="config.service.dir"
value="${config.root}/config-service/target"></property>
+ <property name="config.service.orig.war"
value="config-service-2.1.2.war"></property>
+ <property name="config.service.dest.war"
value="config-service.war"></property>
+ <property name="config.ui.dir"
value="${config.root}/config-ui/target"></property>
+ <property name="config.ui.orig.war" value="config-ui-1.3.war"></property>
+ <property name="config.ui.dest.war" value="config-ui.war"></property>
+
+ <!-- xd server files -->
+ <property name="xd.root" value="${config.root}/../xd"></property>
+ <property name="xd.service.dir"
value="${config.root}/xd/target"></property>
+ <property name="xd.service.orig.war" value="xd-1.0.3.war"></property>
+ <property name="xd.service.dest.war" value="xd.war"></property>
+
+
+ <!-- message monitor server files -->
+ <property name="msg-monitor.root"
value="${config.root}/../msg-monitor"></property>
+ <property name="msg-monitor.service.dir"
value="${config.root}/msg-monitor/target"></property>
+ <property name="msg-monitor.service.orig.war"
value="direct-msg-monitor-web-1.1.3.war"></property>
+ <property name="msg-monitor.service.dest.war"
value="msg-monitor.war"></property>
+
+
+ <!-- Support libraries -->
+ <property name="lib.activation"
value="${install.root.dir}/lib/activation-1.1.1.jar"></property>
+ <property name="lib.aopalliance"
value="${install.root.dir}/lib/aopalliance-1.0.jar"></property>
+ <property name="lib.apache-mailet"
value="${install.root.dir}/lib/apache-mailet-2.4.jar"></property>
+ <property name="lib.apache-mailet-base"
value="${install.root.dir}/lib/apache-mailet-base-1.1.jar"></property>
+ <property name="lib.bcmail-jdk15"
value="${install.root.dir}/lib/bcmail-jdk15-140.jar"></property>
+ <property name="lib.bcprov-jdk15"
value="${install.root.dir}/lib/bcprov-jdk15-140.jar"></property>
+ <property name="lib.commons-codec"
value="${install.root.dir}/lib/commons-codec-1.4.jar"></property>
+ <property name="lib.commons-io"
value="${install.root.dir}/lib/commons-io-1.4.jar"></property>
+ <property name="lib.commons-logging"
value="${install.root.dir}/lib/commons-logging-1.1.1.jar"></property>
+ <property name="lib.commons-lang"
value="${install.root.dir}/lib/commons-lang-2.4.jar"></property>
+ <property name="lib.mail"
value="${install.root.dir}/lib/mail-1.4.3.jar"></property>
+ <property name="lib.dsn"
value="${install.root.dir}/lib/dsn-1.4.3.jar"></property>
+ <property name="lib.guice"
value="${install.root.dir}/lib/guice-2.0.jar"></property>
+ <property name="lib.apache-jsieve"
value="${install.root.dir}/lib/apache-jsieve-0.4.jar"></property>
+ <property name="lib.apache-jsieve-mailet"
value="${install.root.dir}/lib/apache-jsieve-mailet-0.4.jar"></property>
+ <property name="lib.httpclient"
value="${install.root.dir}/lib/httpclient-4.1.1.jar"></property>
+ <property name="lib.httpcore"
value="${install.root.dir}/lib/httpcore-4.1.jar"></property>
+ <property name="lib.jackson-core-asl"
value="${install.root.dir}/lib/jackson-core-asl-1.7.5.jar"></property>
+ <property name="lib.jackson-jaxrs"
value="${install.root.dir}/lib/jackson-jaxrs-1.7.5.jar"></property>
+ <property name="lib.jackson-mapper-asl"
value="${install.root.dir}/lib/jackson-mapper-asl-1.7.5.jar"></property>
+ <property name="lib.jdom"
value="${install.root.dir}/lib/jdom-1.1.jar"></property>
+ <property name="lib.jaxb-impl"
value="${install.root.dir}/lib/jaxb-impl-2.1.13.jar"></property>
+ <property name="lib.aopalliance"
value="${install.root.dir}/lib/aopalliance-1.0.jar"></property>
+ <property name="lib.asm"
value="${install.root.dir}/lib/asm-1.5.3.jar"></property>
+ <property name="lib.cglib"
value="${install.root.dir}/lib/cglib-2.1_3.jar"></property>
+ <property name="lib.dom4j"
value="${install.root.dir}/lib/dom4j-1.6.1.jar"></property>
+ <property name="lib.geronimo-spec-jta"
value="${install.root.dir}/lib/geronimo-spec-jta-1.0.1B-rc4.jar"></property>
+ <property name="lib.geronimo-jpa_2.0_spec"
value="${install.root.dir}/lib/geronimo-jpa_2.0_spec-1.0.jar"></property>
+ <property name="lib.hibernate"
value="${install.root.dir}/lib/hibernate-3.2.6.ga.jar"></property>
+ <property name="lib.hibernate-annotations"
value="${install.root.dir}/lib/hibernate-annotations-3.3.1.GA.jar"></property>
+ <property name="lib.hibernate-commons-annotations"
value="${install.root.dir}/lib/hibernate-commons-annotations-3.0.0.ga.jar"></property>
+ <property name="lib.hibernate-core"
value="${install.root.dir}/lib/hibernate-core-3.3.2.GA.jar"></property>
+ <property name="lib.hibernate-entitymanager"
value="${install.root.dir}/lib/hibernate-entitymanager-3.3.2.GA.jar"></property>
+ <property name="lib.spring-aop"
value="${install.root.dir}/lib/spring-aop-3.2.3.RELEASE.jar"></property>
+ <property name="lib.spring-beans"
value="${install.root.dir}/lib/spring-beans-3.2.3.RELEASE.jar"></property>
+ <property name="lib.spring-core"
value="${install.root.dir}/lib/spring-core-3.2.3.RELEASE.jar"></property>
+ <property name="lib.spring-context"
value="${install.root.dir}/lib/spring-context-3.2.3.RELEASE.jar"></property>
+ <property name="lib.spring-expression"
value="${install.root.dir}/lib/spring-expression-3.2.3.RELEASE.jar"></property>
+ <property name="lib.spring-jdbc"
value="${install.root.dir}/lib/spring-jdbc-3.0.4.RELEASE.jar"></property>
+ <property name="lib.spring-orm"
value="${install.root.dir}/lib/spring-orm-3.0.4.RELEASE.jar"></property>
+ <property name="lib.spring-tx"
value="${install.root.dir}/lib/spring-tx-3.0.4.RELEASE.jar"></property>
+ <property name="lib.javassist"
value="${install.root.dir}/lib/javassist-3.4.GA.jar"></property>
+ <property name="lib.antlr"
value="${install.root.dir}/lib/antlr-2.7.6.jar"></property>
+ <property name="lib.slf4j-api"
value="${install.root.dir}/lib/slf4j-api-1.6.1.jar"></property>
+ <property name="lib.commons-collections"
value="${install.root.dir}/lib/commons-collections-3.2.1.jar"></property>
+
+ <!-- Support libraries (DNS) -->
+ <property name="lib.jcs"
value="${install.root.dir}/lib/jcs-1.3.jar"></property>
+ <property name="lib.concurrent"
value="${install.root.dir}/lib/concurrent-1.0.jar"></property>
+
+ <!-- Support libraries (config-service) -->
+ <property name="lib.wsdl4j"
value="${install.root.dir}/lib/wsdl4j-1.6.2.jar"></property>
+ <property name="lib.saaj-api"
value="${install.root.dir}/lib/saaj-api-1.3.jar"></property>
+ <property name="lib.jaxrpc-api"
value="${install.root.dir}/lib/jaxrpc-api-1.1.jar"></property>
+ <property name="lib.commons-discovery"
value="${install.root.dir}/lib/commons-discovery-0.4.jar"></property>
+ <property name="lib.axis"
value="${install.root.dir}/lib/axis-1.4.jar"></property>
+ <property name="lib.config.proxy"
value="${install.root.dir}/lib/config-service-client-2.0.jar"></property>
+ <property name="lib.config-model"
value="${install.root.dir}/lib/config-model-1.0.jar"></property>
+
+ <!-- Package libraries -->
+ <property name="agent.dir"
value="${install.root.dir}/../agent"></property>
+ <property name="gateway.dir"
value="${install.root.dir}/../gateway"></property>
+ <property name="direct-common.dir"
value="${install.root.dir}/../direct-common"></property>
+ <property name="direct-common-audit.dir"
value="${install.root.dir}/../direct-common-audit"></property>
+ <property name="xdmail.dir"
value="${install.root.dir}/../xdmail"></property>
+ <property name="xd-common.dir"
value="${install.root.dir}/../xd-common"></property>
+ <property name="lib.agent"
value="${install.root.dir}/lib/agent-2.0.13.jar"></property>
+ <property name="lib.gateway"
value="${install.root.dir}/lib/gateway-4.0.jar"></property>
+ <property name="lib.direct-common"
value="${install.root.dir}/lib/direct-common-1.4.2.jar"></property>
+ <property name="lib.direct-common-audit"
value="${install.root.dir}/lib/direct-common-audit-1.0.jar"></property>
+ <property name="lib.xdmail"
value="${install.root.dir}/lib/xdmail-1.1.4.jar"></property>
+ <property name="lib.xd-common"
value="${install.root.dir}/lib/xd-common-1.0.3.jar"></property>
+ <property name="lib.policy"
value="${install.root.dir}/lib/direct-policy-1.0.jar"></property>
+
+ <!-- Stylesheet to edit the config file -->
+ <property name="edit.config.stylesheet"
value="${src}/scripts/edit-config.xsl"></property>
+
+ <!-- Stylesheet to edit server.xml for tomcat configuration -->
+ <property name="edit.tomcat.stylesheet"
value="${src}/scripts/edit-tomcat.xsl"></property>
+
+ <!-- FreeBSD Wrappers-->
+ <property name="wrapper.freebsd.32"
value="${src}/libs/wrapper-freebsd-x86-32"></property>
+ <property name="wrapper.freebsd.64"
value="${src}/libs/wrapper-freebsd-x86-64"></property>
+
+ <target name="windows-specific" if="is.windows">
+ <echo message="src is ${src}"></echo>
+ <property name="wget.command.path"
value="${resources.dir}/wget.exe"></property>
+ </target>
+
+ <target name="unix-specific" if="is.unix">
+ <property name="wget.command.path" value="/usr/bin/wget"></property>
+ </target>
+
+ <target name="mac-specific" if="is.mac">
+ <!--
+ <exec executable="which" outputproperty="wget.command.path"
resultproperty="which.wget.result">
+ <arg line="wget" />
+ </exec>
+ -->
+ <property name="which.wget.result" value="1"></property>
+
+ <exec executable="which" outputproperty="curl.command.path"
resultproperty="which.curl.result" failonerror="false">
+ <arg line="curl"></arg>
+ </exec>
+
+ <!-- do we have a downloader? -->
+ <condition property="no.downloader">
+ <and>
+ <not>
+ <equals arg1="${which.wget.result}" arg2="0"></equals>
+ </not>
+ <not>
+ <equals arg1="${which.curl.result}" arg2="0"></equals>
+ </not>
+ </and>
+ </condition>
+ </target>
+
+ <!-- Fail if we can't find a downloader command -->
+ <target name="fail-if-no-downloader" if="no.downloader">
+ <echo message="which.curl.result = ${which.curl.result}"></echo>
+ <echo message="which.wget.result = ${which.wget.result}"></echo>
+ <fail message="No downloader available - install wget or curl"></fail>
+ </target>
+
+ <target name="init"
depends="windows-specific,unix-specific,mac-specific,fail-if-no-downloader">
+ <!-- Create the time stamp -->
+ <tstamp></tstamp>
+ </target>
+
+ <target name="assemble" depends="init" description="assemble the apache
james mail server">
+
+ <!-- Create the build directory structure -->
+
+ <mkdir dir="${build.dir}"></mkdir>
+ <mkdir dir="${build.download.dir}"></mkdir>
+ <fail unless="env.DIRECT_INSTALL_DIR" message="Environment variable
DIRECT_INSTALL_DIR is not set"></fail>
+
+ <!-- get the apache james binary install package -->
+ <available file="${apache.james.binary.zip}"
property="apache.james.download.exists"></available>
+ <antcall target="get-james"></antcall>
+
+ <!-- get the apache james binary install package -->
+ <available file="${apache.james3.binary.tar.gz}"
property="apache.james3.download.exists"></available>
+ <antcall target="get-james3"></antcall>
+
+
+ <!-- get the tomcat binary install package -->
+ <available file="${tomcat.binary.zip}"
property="tomcat.download.exists"></available>
+ <antcall target="get-tomcat"></antcall>
+
+ <!-- unpack -->
+ <delete dir="${james.stage.dir}"></delete>
+ <delete dir="${james.stage3.dir}"></delete>
+ <delete dir="${tomcat.stage.dir}"></delete>
+ <unzip dest="${env.DIRECT_INSTALL_DIR}"
src="${apache.james.binary.zip}"></unzip>
+ <untar compression="gzip" dest="${env.DIRECT_INSTALL_DIR}"
src="${tomcat.binary.zip}"></untar>
+ <untar compression="gzip" dest="${env.DIRECT_INSTALL_DIR}"
src="${apache.james3.binary.tar.gz}"></untar>
+
+ <!-- configure james -->
+ <antcall target="configure"></antcall>
+ <antcall target="make-shell-files-executable"></antcall>
+ <antcall target="clean"></antcall>
+ </target>
+
+ <!-- get apache-james -->
+ <target name="get-james" depends="get-james-get"
unless="apache.james.download.exists"></target>
+
+
+ <!-- get james get -->
+ <target name="get-james-get" unless="apache.james.download.exists">
+ <echo>downloading ${apache.james.binary.url}</echo>
+ <mkdir dir="${build.download.dir}"/>
+ <get src="${apache.james.binary.url}" dest="${build.download.dir}"
ignoreerrors="false" retries="5"/>
+ </target>
+
+ <!-- get apache-james3 -->
+ <target name="get-james3" depends="get-james3-get"
unless="apache.james3.download.exists"></target>
+
+
+ <!-- get james3 get -->
+ <target name="get-james3-get" unless="apache.james3.download.exists">
+ <echo>downloading ${apache.james3.binary.url}</echo>
+ <mkdir dir="${build.download.dir}"/>
+ <get src="${apache.james3.binary.url}"
dest="${build.download.dir}" ignoreerrors="false" retries="5"/>
+ </target>
+
+ <!-- get tomcat -->
+ <target name="get-tomcat" depends="get-tomcat-get"
unless="tomcat.download.exists"></target>
+
+ <!-- get tomcat get -->
+ <target name="get-tomcat-get" unless="tomcat.download.exists">
+ <echo>downloading ${tomcat.binary.url}</echo>
+ <mkdir dir="${build.download.dir}"/>
+ <get src="${tomcat.binary.url}" dest="${build.download.dir}"
ignoreerrors="false" retries="5"/>
+
+ </target>
+
+ <target name="configure"
depends="configure-james,configure-james3,configure-tomcat"></target>
+
+ <target name="configure-james">
+ <!-- expand the sar file in apps -->
+ <unzip dest="${james.stage.apps.dir}"
src="${james.stage.apps.james.sar.path}"></unzip>
+
+ <!-- trim the expanded sar -->
+ <delete dir="${james.stage.apps.dir}/META-INF"></delete>
+ <delete dir="${james.stage.apps.SAR-INF.lib.dir}"></delete>
+ <mkdir dir="${james.stage.apps.SAR-INF.lib.dir}"></mkdir>
+ <mkdir dir="${james.stage.lib.properties.dir}"></mkdir>
+
+
+ <!-- populate new libraries -->
+ <copy file="${lib.activation}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.aopalliance}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.apache-mailet}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.apache-mailet-base}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.bcmail-jdk15}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.bcprov-jdk15}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-codec}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-io}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-lang}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-logging}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.guice}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.mail}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.dsn}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.agent}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.gateway}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.direct-common}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.direct-common-audit}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.xdmail}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.xd-common}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.policy}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.jcs}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.concurrent}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.wsdl4j}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.saaj-api}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.jaxrpc-api}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-discovery}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.axis}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.config.proxy}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.config-model}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.apache-jsieve}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.apache-jsieve-mailet}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.httpclient}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.httpcore}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.jackson-core-asl}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.jackson-jaxrs}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.jackson-mapper-asl}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.jdom}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.aopalliance}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.asm}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.cglib}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.dom4j}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.geronimo-spec-jta}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.geronimo-jpa_2.0_spec}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.hibernate}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.hibernate-annotations}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.hibernate-commons-annotations}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.hibernate-core}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.hibernate-entitymanager}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-aop}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-beans}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-context}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-core}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-expression}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-jdbc}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-orm}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.spring-tx}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.javassist}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.antlr}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.slf4j-api}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+ <copy file="${lib.commons-collections}"
todir="${james.stage.apps.SAR-INF.lib.dir}"></copy>
+
+ <!-- edit the config.xml file -->
+ <copy file="${james.stage.config}" tofile="${james.stage.config.save}"
overwrite="true"></copy>
+ <copy file="${src}/scripts/config.xml" tofile="${james.stage.config}"
overwrite="true"></copy>
+
+ <copy file="${src}/scripts/phoenix.sh" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
+ <copy file="${src}/scripts/run.bat" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
+ <copy file="${src}/scripts/setdomain.sh" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
+ <copy file="${src}/scripts/setdomain.bat" todir="${james.stage.dir}/bin"
overwrite="true"></copy>
+ <copy file="${src}/scripts/set-domain.xml"
todir="${james.stage.dir}/bin" overwrite="true"></copy>
+ <copy file="${src}/scripts/set-domain.xsl"
todir="${james.stage.dir}/bin" overwrite="true"></copy>
+
+ <!-- copy the audit db properties file -->
+ <copy file="${src}/scripts/auditStore.properties"
todir="${james.stage.lib.properties.dir}" overwrite="true"></copy>
+
+ <!-- clean up work files -->
+ <delete file="${
james.stage.config.new}" failonerror="false"></delete>
+
+ </target>
+
+ <target name="configure-james3">
+
+ <!-- delete the template files that aren't needed -->
+ <delete
file="${james3.stage.conf.dir}/domainlist-template.conf"></delete>
+ <delete
file="${james3.stage.conf.dir}/mailetcontainer-template.conf"></delete>
+ <delete
file="${james3.stage.conf.dir}/pop3server-template.conf"></delete>
+ <delete
file="${james3.stage.conf.dir}/imapserver-template.conf"></delete>
+ <delete
file="${james3.stage.conf.dir}/smtpserver-template.conf"></delete>
+ <delete
file="${james3.stage.conf.dir}/META-INF/persistence.xml"></delete>
+
+ <!-- make the directory for the audit DB prop files -->
+ <mkdir dir="${james3.stage.conf.dir}/properties"></mkdir>
+
+ <!-- populate new libraries -->
+ <copy file="${lib.activation}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.bcmail-jdk15}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.bcprov-jdk15}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.guice}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.dsn}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.agent}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.gateway}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.direct-common}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.direct-common-audit}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.xdmail}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.xd-common}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.policy}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jcs}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.concurrent}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.wsdl4j}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.saaj-api}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jaxrpc-api}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.commons-discovery}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.axis}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.config.proxy}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.config-model}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.httpclient}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.httpcore}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jackson-core-asl}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jackson-jaxrs}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jackson-mapper-asl}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jdom}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.jaxb-impl}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.aopalliance}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.asm}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.cglib}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.dom4j}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.geronimo-spec-jta}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.geronimo-jpa_2.0_spec}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.hibernate}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.hibernate-annotations}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.hibernate-commons-annotations}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.hibernate-core}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.hibernate-entitymanager}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-aop}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-beans}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-context}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-core}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-expression}"
todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-jdbc}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-orm}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.spring-tx}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.javassist}" todir="${james3.stage.lib.dir}"></copy>
+ <copy file="${lib.antlr}" todir="${james3.stage.lib.dir}"></copy>
+
+ <!-- copy the new config files -->
+ <copy file="${src}/scripts/james3/domainlist.conf"
tofile="${james3.stage.domainlist}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/mailetcontainer.conf"
tofile="${james3.stage.mailetcontainer}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/pop3server.conf"
tofile="${james3.stage.pop3server}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/imapserver.conf"
tofile="${james3.stage.imapserver}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/smtpserver.conf"
tofile="${james3.stage.smtpserver}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/cakeystore.jks"
tofile="${james3.stage.keystore}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/wrapper.conf"
tofile="${james3.stage.wrapper}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/log4j.properties"
tofile="${james3.stage.logging}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/persistence_james.xml"
tofile="${james3.stage.persistence}" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/spring-server.xml"
tofile="${james3.stage.springserver}" overwrite="true"></copy>
+
+ <copy file="${src}/scripts/james3/setdomain.sh"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/setdomain.bat"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/set-domain.xml"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/set-domain-domainlist.xsl"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
+ <copy file="${src}/scripts/james3/set-domain-mailetcontainer.xsl"
todir="${james3.stage.dir}/bin" overwrite="true"></copy>
+
+ <copy file="${src}/scripts/auditStore.properties"
todir="${james3.stage.conf.dir}/properties" overwrite="true"></copy>
+ </target>
+
+ <target name="configure-tomcat">
+ <property name="config.service.orig.war"
value="config-service-2.1.2.war"></property>
+ <property name="config.service.dest.war"
value="config-service.war"></property>
+ <property name="config.ui.orig.war" value="config-ui.war"></property>
+ <property name="config.ui.dest.war" value="config-ui.war"></property>
+ <property name="xd.service.orig.war" value="xd-1.0.3.war"></property>
+ <property name="xd.service.dest.war" value="xd.war"></property>
+ <property name="msg-monitor.service.orig.war"
value="direct-msg-monitor-web-1.1.3.war"></property>
+ <property name="msg-monitor.service.dest.war"
value="msg-monitor.war"></property>
+
+ <!-- Copy war files -->
+ <copy file="${install.root.dir}/lib/${config.service.orig.war}"
tofile="${tomcat.webapp.dir}/${config.service.dest.war}"></copy>
+ <copy file="${install.root.dir}/lib/${config.ui.orig.war}"
tofile="${tomcat.webapp.dir}/${config.ui.dest.war}"></copy>
+ <copy file="${install.root.dir}/lib/${xd.service.orig.war}"
tofile="${tomcat.webapp.dir}/${xd.service.dest.war}"></copy>
+ <copy file="${install.root.dir}/lib/${msg-monitor.service.orig.war}"
tofile="${tomcat.webapp.dir}/${msg-monitor.service.dest.war}"></copy>
+
+ <!-- Copy catalina.sh and catalina.bat files -->
+ <copy file="${src}/scripts/catalina.sh"
tofile="${tomcat.bin.dir}/catalina.sh"></copy>
+ <copy file="${src}/scripts/catalina.bat"
tofile="${tomcat.bin.dir}/catalina.bat"></copy>
+
+ <xslt style="${edit.tomcat.stylesheet}" in="${tomcat.stage.config}"
out="${
tomcat.stage.config.new}">
+ <param name="port" expression="8081"></param>
+ </xslt>
+ <copy file="${tomcat.stage.config}" tofile="${james.stage.config.save}"
overwrite="true"></copy>
+ <copy file="${
tomcat.stage.config.new}" tofile="${tomcat.stage.config}"
overwrite="true"></copy>
+ <delete file="${
tomcat.stage.config.new}" />
+
+ <!-- Copy FreeBSD wrappers -->
+ <copy file="${wrapper.freebsd.32}"
tofile="${dnsserver.stage.dir}/bin/wrapper-freebsd-x86-32"
overwrite="true"></copy>
+ <copy file="${wrapper.freebsd.64}"
tofile="${dnsserver.stage.dir}/bin/wrapper-freebsd-x86-64"
overwrite="true"></copy>
+ <copy file="${wrapper.freebsd.32}"
tofile="${james3.stage.dir}/bin/wrapper-freebsd-x86-32"
overwrite="true"></copy>
+ <copy file="${wrapper.freebsd.64}"
tofile="${james3.stage.dir}/bin/wrapper-freebsd-x86-64"
overwrite="true"></copy>
+
+ </target>
+
+ <!-- make shell files executable -->
+ <target name="make-shell-files-executable" if="is.someunix">
+ <exec executable="sh">
+ <arg line="-c 'cd ${james.stage.dir}/bin; chmod a+x *.sh'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${james3.stage.dir}/bin; chmod a+x *.sh'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${james3.stage.dir}/bin; chmod a+x wrapper*'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${james3.stage.dir}/bin; chmod a+x james'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${tomcat.stage.dir}/bin; chmod a+x *.sh'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsserver.stage.dir}/bin; chmod a+x
wrapper-linux-x86-32'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsserver.stage.dir}/bin; chmod a+x
wrapper-linux-x86-64'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsserver.stage.dir}/bin; chmod a+x
wrapper-solaris-x86-32'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsserver.stage.dir}/bin; chmod a+x
wrapper-freebsd-x86-32'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsserver.stage.dir}/bin; chmod a+x
wrapper-freebsd-x86-64'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsserver.stage.dir}/bin; chmod a+x
DirectDNSServer'"></arg>
+ </exec>
+ <exec executable="sh">
+ <arg line="-c 'cd ${configmgmr.stage.dir}/bin; chmod a+x
ConfigMgmtConsole'"></arg>
+ </exec>
+ <!-- DNS Management Console is replaced by ConfigMgmtConsole... Removed
it -->
+ <exec executable="sh">
+ <arg line="-c 'cd ${dnsservices.stage.dir}; rm -r
DNSMgmtConsole'"></arg>
+ </exec>
+ </target>
+
+
+
+ <!-- clean up -->
+ <target name="clean" depends="init" description="clean up">
+ <!-- Delete the ${build} directory tree -->
+ <delete dir="${build.dir}/download"></delete>
+ </target>
+
+</project>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/catalina.bat Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,323 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem
http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+if "%OS%" == "Windows_NT" setlocal
+rem
---------------------------------------------------------------------------
+rem Start/Stop Script for the CATALINA Server
+rem
+rem Environment Variable Prerequisites
+rem
+rem Do not set the variables in this script. Instead put them into a
script
+rem setenv.bat in CATALINA_BASE/bin to keep your customizations separate.
+rem
+rem CATALINA_HOME May point at your Catalina "build" directory.
+rem
+rem CATALINA_BASE (Optional) Base directory for resolving dynamic
portions
+rem of a Catalina installation. If not present,
resolves to
+rem the same directory that CATALINA_HOME points to.
+rem
+rem CATALINA_OPTS (Optional) Java runtime options used when
the "start",
+rem "run" or "debug" command is executed.
+rem Include here and not in JAVA_OPTS all options, that
should
+rem only be used by Tomcat itself, not by the stop
process,
+rem the version command etc.
+rem Examples are heap size, GC logging, JMX ports etc.
+rem
+rem CATALINA_TMPDIR (Optional) Directory path location of temporary
directory
+rem the JVM should use (java.io.tmpdir). Defaults to
+rem %CATALINA_BASE%\temp.
+rem
+rem JAVA_HOME Must point at your Java Development Kit installation.
+rem Required to run the with the "debug" argument.
+rem
+rem JRE_HOME Must point at your Java Runtime installation.
+rem Defaults to JAVA_HOME if empty. If JRE_HOME and
JAVA_HOME
+rem are both set, JRE_HOME is used.
+rem
+rem JAVA_OPTS (Optional) Java runtime options used when any command
+rem is executed.
+rem Include here and not in CATALINA_OPTS all options,
that
+rem should be used by Tomcat and also by the stop
process,
+rem the version command etc.
+rem Most options should go into CATALINA_OPTS.
+rem
+rem JAVA_ENDORSED_DIRS (Optional) Lists of of semi-colon separated
directories
+rem containing some jars in order to allow replacement
of APIs
+rem created outside of the JCP (i.e. DOM and SAX from
W3C).
+rem It can also be used to update the XML parser
implementation.
+rem Defaults to $CATALINA_HOME/endorsed.
+rem
+rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
+rem command is executed. The default is "dt_socket".
+rem
+rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda
start"
+rem command is executed. The default is 8000.
+rem
+rem JPDA_SUSPEND (Optional) Java runtime options used when the "jpda
start"
+rem command is executed. Specifies whether JVM should
suspend
+rem execution immediately after startup. Default is "n".
+rem
+rem JPDA_OPTS (Optional) Java runtime options used when the "jpda
start"
+rem command is executed. If used, JPDA_TRANSPORT,
JPDA_ADDRESS,
+rem and JPDA_SUSPEND are ignored. Thus, all required jpda
+rem options MUST be specified. The default is:
+rem
+rem -agentlib:jdwp=transport=%JPDA_TRANSPORT%,
+rem
address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
+rem
+rem LOGGING_CONFIG (Optional) Override Tomcat's logging config file
+rem Example (all one line)
+rem set
LOGGING_CONFIG="-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
+rem
+rem LOGGING_MANAGER (Optional) Override Tomcat's logging manager
+rem Example (all one line)
+rem set
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+rem
+rem TITLE (Optional) Specify the title of Tomcat window. The
default
+rem TITLE is Tomcat if it's not specified.
+rem Example (all one line)
+rem set TITLE=Tomcat.Cluster#1.Server#1 [%DATE% %TIME%]
+rem
+rem
+rem
+rem $Id: catalina.bat 1344732 2012-05-31 14:08:02Z kkolinko $
+rem
---------------------------------------------------------------------------
+
+rem Suppress Terminate batch job on CTRL+C
+if not ""%1"" == ""run"" goto mainEntry
+if "%TEMP%" == "" goto mainEntry
+if exist "%TEMP%\%~nx0.run" goto mainEntry
+echo Y>"%TEMP%\%~nx0.run"
+if not exist "%TEMP%\%~nx0.run" goto mainEntry
+echo Y>"%TEMP%\%~nx0.Y"
+call "%~f0" %* <"%TEMP%\%~nx0.Y"
+rem Use provided errorlevel
+set RETVAL=%ERRORLEVEL%
+del /Q "%TEMP%\%~nx0.Y" >NUL 2>&1
+exit /B %RETVAL%
+:mainEntry
+del /Q "%TEMP%\%~nx0.run" >NUL 2>&1
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+rem Copy CATALINA_BASE from CATALINA_HOME if not defined
+if not "%CATALINA_BASE%" == "" goto gotBase
+set "CATALINA_BASE=%CATALINA_HOME%"
+:gotBase
+
+rem Ensure that any user defined CLASSPATH variables are not used on
startup,
+rem but allow them to be specified in setenv.bat, in rare case when it is
needed.
+set CLASSPATH=
+
+rem Get standard environment variables
+if not exist "%CATALINA_BASE%\bin\setenv.bat" goto checkSetenvHome
+call "%CATALINA_BASE%\bin\setenv.bat"
+goto setenvDone
+:checkSetenvHome
+if exist "%CATALINA_HOME%\bin\setenv.bat"
call "%CATALINA_HOME%\bin\setenv.bat"
+:setenvDone
+
+rem Get standard Java environment variabless
+if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
+echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
+echo This file is needed to run this program
+goto end
+:okSetclasspath
+call "%CATALINA_HOME%\bin\setclasspath.bat" %1
+if errorlevel 1 goto end
+
+rem Add on extra jar file to CLASSPATH
+rem Note that there are no quotes as we do not want to introduce random
+rem quotes into the CLASSPATH
+if "%CLASSPATH%" == "" goto emptyClasspath
+set "CLASSPATH=%CLASSPATH%;"
+:emptyClasspath
+set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar"
+
+if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
+set "CATALINA_TMPDIR=%CATALINA_BASE%\temp"
+:gotTmpdir
+
+rem Add tomcat-juli.jar to classpath
+rem tomcat-juli.jar can be over-ridden per instance
+if not exist "%CATALINA_BASE%\bin\tomcat-juli.jar" goto juliClasspathHome
+set "CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar"
+goto juliClasspathDone
+:juliClasspathHome
+set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
+:juliClasspathDone
+
+if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
+set LOGGING_CONFIG=-Dnop
+if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
+set
LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
+:noJuliConfig
+set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG% -XX:MaxPermSize=512m
+
+if not "%LOGGING_MANAGER%" == "" goto noJuliManager
+set
LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
+:noJuliManager
+set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER% -XX:MaxPermSize=512m
+
+rem ----- Execute The Requested Command
---------------------------------------
+
+echo Using CATALINA_BASE: "%CATALINA_BASE%"
+echo Using CATALINA_HOME: "%CATALINA_HOME%"
+echo Using CATALINA_TMPDIR: "%CATALINA_TMPDIR%"
+if ""%1"" == ""debug"" goto use_jdk
+echo Using JRE_HOME: "%JRE_HOME%"
+goto java_dir_displayed
+:use_jdk
+echo Using JAVA_HOME: "%JAVA_HOME%"
+:java_dir_displayed
+echo Using CLASSPATH: "%CLASSPATH%"
+
+set _EXECJAVA=%_RUNJAVA%
+set MAINCLASS=org.apache.catalina.startup.Bootstrap
+set ACTION=start
+set SECURITY_POLICY_FILE=
+set DEBUG_OPTS=
+set JPDA=
+
+if not ""%1"" == ""jpda"" goto noJpda
+set JPDA=jpda
+if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
+set JPDA_TRANSPORT=dt_socket
+:gotJpdaTransport
+if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
+set JPDA_ADDRESS=8000
+:gotJpdaAddress
+if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
+set JPDA_SUSPEND=n
+:gotJpdaSuspend
+if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
+set
JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
+:gotJpdaOpts
+shift
+:noJpda
+
+if ""%1"" == ""debug"" goto doDebug
+if ""%1"" == ""run"" goto doRun
+if ""%1"" == ""start"" goto doStart
+if ""%1"" == ""stop"" goto doStop
+if ""%1"" == ""configtest"" goto doConfigTest
+if ""%1"" == ""version"" goto doVersion
+
+echo Usage: catalina ( commands ... )
+echo commands:
+echo debug Start Catalina in a debugger
+echo debug -security Debug Catalina with a security manager
+echo jpda start Start Catalina under JPDA debugger
+echo run Start Catalina in the current window
+echo run -security Start in the current window with security manager
+echo start Start Catalina in a separate window
+echo start -security Start in a separate window with security manager
+echo stop Stop Catalina
+echo configtest Run a basic syntax check on server.xml
+echo version What version of tomcat are you running?
+goto end
+
+:doDebug
+shift
+set _EXECJAVA=%_RUNJDB%
+set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\java"
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
+goto execCmd
+
+:doRun
+shift
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
+goto execCmd
+
+:doStart
+shift
+if not "%OS%" == "Windows_NT" goto noTitle
+if "%TITLE%" == "" set TITLE=Tomcat
+set _EXECJAVA=start "%TITLE%" %_RUNJAVA%
+goto gotTitle
+:noTitle
+set _EXECJAVA=start %_RUNJAVA%
+:gotTitle
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
+goto execCmd
+
+:doStop
+shift
+set ACTION=stop
+set CATALINA_OPTS=
+goto execCmd
+
+:doConfigTest
+shift
+set ACTION=configtest
+set CATALINA_OPTS=
+goto execCmd
+
+:doVersion
+%_EXECJAVA% -classpath "%CATALINA_HOME%\lib\catalina.jar"
org.apache.catalina.util.ServerInfo
+goto end
+
+
+:execCmd
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+rem Execute Java with the applicable properties
+if not "%JPDA%" == "" goto doJpda
+if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
-Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doSecurity
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
-Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doJpda
+if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS%
-Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doSecurityJpda
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS%
-Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
-Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+
+:end
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/catalina.sh Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,536 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
-----------------------------------------------------------------------------
+# Control Script for the CATALINA Server
+#
+# Environment Variable Prerequisites
+#
+# Do not set the variables in this script. Instead put them into a script
+# setenv.sh in CATALINA_BASE/bin to keep your customizations separate.
+#
+# CATALINA_HOME May point at your Catalina "build" directory.
+#
+# CATALINA_BASE (Optional) Base directory for resolving dynamic
portions
+# of a Catalina installation. If not present, resolves
to
+# the same directory that CATALINA_HOME points to.
+#
+# CATALINA_OUT (Optional) Full path to a file where stdout and stderr
+# will be redirected.
+# Default is $CATALINA_BASE/logs/catalina.out
+#
+# CATALINA_OPTS (Optional) Java runtime options used when the "start",
+# "run" or "debug" command is executed.
+# Include here and not in JAVA_OPTS all options, that
should
+# only be used by Tomcat itself, not by the stop process,
+# the version command etc.
+# Examples are heap size, GC logging, JMX ports etc.
+#
+# CATALINA_TMPDIR (Optional) Directory path location of temporary
directory
+# the JVM should use (java.io.tmpdir). Defaults to
+# $CATALINA_BASE/temp.
+#
+# JAVA_HOME Must point at your Java Development Kit installation.
+# Required to run the with the "debug" argument.
+#
+# JRE_HOME Must point at your Java Runtime installation.
+# Defaults to JAVA_HOME if empty. If JRE_HOME and
JAVA_HOME
+# are both set, JRE_HOME is used.
+#
+# JAVA_OPTS (Optional) Java runtime options used when any command
+# is executed.
+# Include here and not in CATALINA_OPTS all options, that
+# should be used by Tomcat and also by the stop process,
+# the version command etc.
+# Most options should go into CATALINA_OPTS.
+#
+# JAVA_ENDORSED_DIRS (Optional) Lists of of colon separated directories
+# containing some jars in order to allow replacement of
APIs
+# created outside of the JCP (i.e. DOM and SAX from W3C).
+# It can also be used to update the XML parser
implementation.
+# Defaults to $CATALINA_HOME/endorsed.
+#
+# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
+# command is executed. The default is "dt_socket".
+#
+# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda
start"
+# command is executed. The default is 8000.
+#
+# JPDA_SUSPEND (Optional) Java runtime options used when the "jpda
start"
+# command is executed. Specifies whether JVM should
suspend
+# execution immediately after startup. Default is "n".
+#
+# JPDA_OPTS (Optional) Java runtime options used when the "jpda
start"
+# command is executed. If used, JPDA_TRANSPORT,
JPDA_ADDRESS,
+# and JPDA_SUSPEND are ignored. Thus, all required jpda
+# options MUST be specified. The default is:
+#
+# -agentlib:jdwp=transport=$JPDA_TRANSPORT,
+#
address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND
+#
+# CATALINA_PID (Optional) Path of the file which should contains the
pid
+# of the catalina startup java process, when start
(fork) is
+# used
+#
+# LOGGING_CONFIG (Optional) Override Tomcat's logging config file
+# Example (all one line)
+#
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
+#
+# LOGGING_MANAGER (Optional) Override Tomcat's logging manager
+# Example (all one line)
+#
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+#
+# $Id: catalina.sh 1202062 2011-11-15 06:50:02Z mturk $
+#
-----------------------------------------------------------------------------
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false
+darwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+Darwin*) darwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`/"$link"
+ fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CATALINA_HOME if not already set
+[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
+
+# Copy CATALINA_BASE from CATALINA_HOME if not already set
+[ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME"
+
+# Ensure that any user defined CLASSPATH variables are not used on startup,
+# but allow them to be specified in setenv.sh, in rare case when it is
needed.
+CLASSPATH=
+
+if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then
+ . "$CATALINA_BASE/bin/setenv.sh"
+elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
+ . "$CATALINA_HOME/bin/setenv.sh"
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
+ [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath
--unix "$CATALINA_HOME"`
+ [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath
--unix "$CATALINA_BASE"`
+ [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For OS400
+if $os400; then
+ # Set job priority to standard for interactive (interactive - 6) by using
+ # the interactive priority - 6, the helper threads that respond to
requests
+ # will be running at the same priority as interactive jobs.
+ COMMAND='chgjob job('$JOBNAME') runpty(6)'
+ system $COMMAND
+
+ # Enable multi threading
+ export QIBM_MULTI_THREADED=Y
+fi
+
+# Get standard Java environment variables
+if $os400; then
+ # -r will Only work on the os400 if the files are:
+ # 1. owned by the user
+ # 2. owned by the PRIMARY group of the user
+ # this will not work if the user belongs in secondary groups
+ . "$CATALINA_HOME"/bin/setclasspath.sh
+else
+ if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
+ . "$CATALINA_HOME"/bin/setclasspath.sh
+ else
+ echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
+ echo "This file is needed to run this program"
+ exit 1
+ fi
+fi
+
+# Add on extra jar files to CLASSPATH
+if [ ! -z "$CLASSPATH" ] ; then
+ CLASSPATH="$CLASSPATH":
+fi
+CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar
+
+if [ -z "$CATALINA_OUT" ] ; then
+ CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out
+fi
+
+if [ -z "$CATALINA_TMPDIR" ] ; then
+ # Define the java.io.tmpdir to use for Catalina
+ CATALINA_TMPDIR="$CATALINA_BASE"/temp
+fi
+
+# Add tomcat-juli.jar to classpath
+# tomcat-juli.jar can be over-ridden per instance
+if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
+ CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar
+else
+ CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar
+fi
+
+# Bugzilla 37848: When no TTY is available, don't output to console
+have_tty=0
+if [ "`tty`" != "not a tty" ]; then
+ have_tty=1
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+ JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
+ CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
+ CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
+ CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+# Set juli LogManager config file if it is present and an override has not
been issued
+if [ -z "$LOGGING_CONFIG" ]; then
+ if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
+
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
+ else
+ # Bugzilla 45585
+ LOGGING_CONFIG="-Dnop"
+ fi
+fi
+
+if [ -z "$LOGGING_MANAGER" ]; then
+ JAVA_OPTS="$JAVA_OPTS
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
+else
+ JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER"
+fi
+
+# Uncomment the following line to make the umask available when using the
+# org.apache.catalina.security.SecurityListener
+#JAVA_OPTS="$JAVA_OPTS
-Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
+JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=512m"
+
+# ----- Execute The Requested Command
-----------------------------------------
+
+# Bugzilla 37848: only output this if we have a TTY
+if [ $have_tty -eq 1 ]; then
+ echo "Using CATALINA_BASE: $CATALINA_BASE"
+ echo "Using CATALINA_HOME: $CATALINA_HOME"
+ echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+ if [ "$1" = "debug" ] ; then
+ echo "Using JAVA_HOME: $JAVA_HOME"
+ else
+ echo "Using JRE_HOME: $JRE_HOME"
+ fi
+ echo "Using CLASSPATH: $CLASSPATH"
+ if [ ! -z "$CATALINA_PID" ]; then
+ echo "Using CATALINA_PID: $CATALINA_PID"
+ fi
+fi
+
+if [ "$1" = "jpda" ] ; then
+ if [ -z "$JPDA_TRANSPORT" ]; then
+ JPDA_TRANSPORT="dt_socket"
+ fi
+ if [ -z "$JPDA_ADDRESS" ]; then
+ JPDA_ADDRESS="8000"
+ fi
+ if [ -z "$JPDA_SUSPEND" ]; then
+ JPDA_SUSPEND="n"
+ fi
+ if [ -z "$JPDA_OPTS" ]; then
+
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
+ fi
+ CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
+ shift
+fi
+
+if [ "$1" = "debug" ] ; then
+ if $os400; then
+ echo "Debug command not available on OS400"
+ exit 1
+ else
+ shift
+ if [ "$1" = "-security" ] ; then
+ if [ $have_tty -eq 1 ]; then
+ echo "Using Security Manager"
+ fi
+ shift
+ exec "$_RUNJDB" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
+ -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH"
\
+ -sourcepath "$CATALINA_HOME"/../../java \
+ -Djava.security.manager \
+ -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+ -Dcatalina.base="$CATALINA_BASE" \
+ -Dcatalina.home="$CATALINA_HOME" \
+ -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+ org.apache.catalina.startup.Bootstrap "$@" start
+ else
+ exec "$_RUNJDB" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
+ -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH"
\
+ -sourcepath "$CATALINA_HOME"/../../java \
+ -Dcatalina.base="$CATALINA_BASE" \
+ -Dcatalina.home="$CATALINA_HOME" \
+ -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+ org.apache.catalina.startup.Bootstrap "$@" start
+ fi
+ fi
+
+elif [ "$1" = "run" ]; then
+
+ shift
+ if [ "$1" = "-security" ] ; then
+ if [ $have_tty -eq 1 ]; then
+ echo "Using Security Manager"
+ fi
+ shift
+ eval exec \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
+ -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath
\"$CLASSPATH\" \
+ -Djava.security.manager \
+ -Djava.security.policy==\"$CATALINA_BASE/conf/catalina.policy\" \
+ -Dcatalina.base=\"$CATALINA_BASE\" \
+ -Dcatalina.home=\"$CATALINA_HOME\" \
+ -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
+ org.apache.catalina.startup.Bootstrap "$@" start
+ else
+ eval exec \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
+ -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath
\"$CLASSPATH\" \
+ -Dcatalina.base=\"$CATALINA_BASE\" \
+ -Dcatalina.home=\"$CATALINA_HOME\" \
+ -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
+ org.apache.catalina.startup.Bootstrap "$@" start
+ fi
+
+elif [ "$1" = "start" ] ; then
+
+ if [ ! -z "$CATALINA_PID" ]; then
+ if [ -f "$CATALINA_PID" ]; then
+ if [ -s "$CATALINA_PID" ]; then
+ echo "Existing PID file found during start."
+ if [ -r "$CATALINA_PID" ]; then
+ PID=`cat "$CATALINA_PID"`
+ ps -p $PID >/dev/null 2>&1
+ if [ $? -eq 0 ] ; then
+ echo "Tomcat appears to still be running with PID $PID. Start
aborted."
+ exit 1
+ else
+ echo "Removing/clearing stale PID file."
+ rm -f "$CATALINA_PID" >/dev/null 2>&1
+ if [ $? != 0 ]; then
+ if [ -w "$CATALINA_PID" ]; then
+ cat /dev/null > "$CATALINA_PID"
+ else
+ echo "Unable to remove or clear stale PID file. Start
aborted."
+ exit 1
+ fi
+ fi
+ fi
+ else
+ echo "Unable to read PID file. Start aborted."
+ exit 1
+ fi
+ else
+ rm -f "$CATALINA_PID" >/dev/null 2>&1
+ if [ $? != 0 ]; then
+ if [ ! -w "$CATALINA_PID" ]; then
+ echo "Unable to remove or write to empty PID file. Start
aborted."
+ exit 1
+ fi
+ fi
+ fi
+ fi
+ fi
+
+ shift
+ touch "$CATALINA_OUT"
+ if [ "$1" = "-security" ] ; then
+ if [ $have_tty -eq 1 ]; then
+ echo "Using Security Manager"
+ fi
+ shift
+ eval \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
+ -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath
\"$CLASSPATH\" \
+ -Djava.security.manager \
+ -Djava.security.policy==\"$CATALINA_BASE/conf/catalina.policy\" \
+ -Dcatalina.base=\"$CATALINA_BASE\" \
+ -Dcatalina.home=\"$CATALINA_HOME\" \
+ -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
+ org.apache.catalina.startup.Bootstrap "$@" start \
+ >> "$CATALINA_OUT" 2>&1 "&"
+
+ else
+ eval \"$_RUNJAVA\" \"$LOGGING_CONFIG\" $JAVA_OPTS $CATALINA_OPTS \
+ -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath
\"$CLASSPATH\" \
+ -Dcatalina.base=\"$CATALINA_BASE\" \
+ -Dcatalina.home=\"$CATALINA_HOME\" \
+ -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
+ org.apache.catalina.startup.Bootstrap "$@" start \
+ >> "$CATALINA_OUT" 2>&1 "&"
+
+ fi
+
+ if [ ! -z "$CATALINA_PID" ]; then
+ echo $! > "$CATALINA_PID"
+ fi
+
+elif [ "$1" = "stop" ] ; then
+
+ shift
+
+ SLEEP=5
+ if [ ! -z "$1" ]; then
+ echo $1 | grep "[^0-9]" >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ SLEEP=$1
+ shift
+ fi
+ fi
+
+ FORCE=0
+ if [ "$1" = "-force" ]; then
+ shift
+ FORCE=1
+ fi
+
+ if [ ! -z "$CATALINA_PID" ]; then
+ if [ -f "$CATALINA_PID" ]; then
+ if [ -s "$CATALINA_PID" ]; then
+ kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ echo "PID file found but no matching process was found. Stop
aborted."
+ exit 1
+ fi
+ else
+ echo "PID file is empty and has been ignored."
+ fi
+ else
+ echo "\$CATALINA_PID was set but the specified file does not exist.
Is Tomcat running? Stop aborted."
+ exit 1
+ fi
+ fi
+
+ eval \"$_RUNJAVA\" $JAVA_OPTS \
+ -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath \"$CLASSPATH\"
\
+ -Dcatalina.base=\"$CATALINA_BASE\" \
+ -Dcatalina.home=\"$CATALINA_HOME\" \
+ -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
+ org.apache.catalina.startup.Bootstrap "$@" stop
+
+ if [ ! -z "$CATALINA_PID" ]; then
+ if [ -f "$CATALINA_PID" ]; then
+ while [ $SLEEP -ge 0 ]; do
+ kill -0 `cat "$CATALINA_PID"` >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ rm -f "$CATALINA_PID" >/dev/null 2>&1
+ if [ $? != 0 ]; then
+ if [ -w "$CATALINA_PID" ]; then
+ cat /dev/null > "$CATALINA_PID"
+ else
+ echo "Tomcat stopped but the PID file could not be removed
or cleared."
+ fi
+ fi
+ break
+ fi
+ if [ $SLEEP -gt 0 ]; then
+ sleep 1
+ fi
+ if [ $SLEEP -eq 0 ]; then
+ if [ $FORCE -eq 0 ]; then
+ echo "Tomcat did not stop in time. PID file was not removed."
+ fi
+ fi
+ SLEEP=`expr $SLEEP - 1 `
+ done
+ fi
+ fi
+
+ if [ $FORCE -eq 1 ]; then
+ if [ -z "$CATALINA_PID" ]; then
+ echo "Kill failed: \$CATALINA_PID not set"
+ else
+ if [ -f "$CATALINA_PID" ]; then
+ PID=`cat "$CATALINA_PID"`
+ echo "Killing Tomcat with the PID: $PID"
+ kill -9 $PID
+ rm -f "$CATALINA_PID" >/dev/null 2>&1
+ if [ $? != 0 ]; then
+ echo "Tomcat was killed but the PID file could not be removed."
+ fi
+ fi
+ fi
+ fi
+
+elif [ "$1" = "configtest" ] ; then
+
+ eval \"$_RUNJAVA\" $JAVA_OPTS \
+ -Djava.endorsed.dirs=\"$JAVA_ENDORSED_DIRS\" -classpath
\"$CLASSPATH\" \
+ -Dcatalina.base=\"$CATALINA_BASE\" \
+ -Dcatalina.home=\"$CATALINA_HOME\" \
+ -Djava.io.tmpdir=\"$CATALINA_TMPDIR\" \
+ org.apache.catalina.startup.Bootstrap configtest
+ result=$?
+ if [ $result -ne 0 ]; then
+ echo "Configuration error detected!"
+ fi
+ exit $result
+
+elif [ "$1" = "version" ] ; then
+
+ "$_RUNJAVA" \
+ -classpath "$CATALINA_HOME/lib/catalina.jar" \
+ org.apache.catalina.util.ServerInfo
+
+else
+
+ echo "Usage: catalina.sh ( commands ... )"
+ echo "commands:"
+ if $os400; then
+ echo " debug Start Catalina in a debugger (not available
on OS400)"
+ echo " debug -security Debug Catalina with a security manager (not
available on OS400)"
+ else
+ echo " debug Start Catalina in a debugger"
+ echo " debug -security Debug Catalina with a security manager"
+ fi
+ echo " jpda start Start Catalina under JPDA debugger"
+ echo " run Start Catalina in the current window"
+ echo " run -security Start in the current window with security
manager"
+ echo " start Start Catalina in a separate window"
+ echo " start -security Start in a separate window with security
manager"
+ echo " stop Stop Catalina, waiting up to 5 seconds for the
process to end"
+ echo " stop n Stop Catalina, waiting up to n seconds for the
process to end"
+ echo " stop -force Stop Catalina, wait up to 5 seconds and then
use kill -KILL if still running"
+ echo " stop n -force Stop Catalina, wait up to n seconds and then
use kill -KILL if still running"
+ echo " configtest Run a basic syntax check on server.xml - check
exit code for result"
+ echo " version What version of tomcat are you running?"
+ echo "Note: Waiting for the process to end and use of the -force option
require that \$CATALINA_PID is defined"
+ exit 1
+
+fi
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/config.xml Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,1429 @@
+<?xml version="1.0"?>
+<!DOCTYPE config [
+<!ENTITY listserverConfig SYSTEM "../conf/james-listmanager.xml">
+<!ENTITY listserverStores SYSTEM "../conf/james-liststores.xml">
+<!ENTITY fetchmailConfig SYSTEM "../conf/james-fetchmail.xml">
+<!ENTITY smtphandlerchainConfig
SYSTEM "../conf/james-smtphandlerchain.xml">
+]>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!-- Configuration file for the ASF James server -->
+
+<!-- This file contains important settings that control the behaviour -->
+<!-- of all of the services and repositories. -->
+
+<!-- README! -->
+
+<!-- This configuration file is designed to run without alteration for
simple tests. -->
+<!-- It assumes you have a DNS server on localhost and assigns a root
password of root. -->
+
+<!-- In case the defaults do not suit you, the items you are most likely
to need to change -->
+<!-- are preceded by a CHECKME! or CONFIRM? comment in the left margin. -->
+
+<!-- For production use you will probably need to make more extensive
changes, see -->
+<!--
http://james.apache.org/server/2.3.0/ -->
+
+<!-- $Revision: 776655 $ Committed on $Date: 2009-05-20 11:43:57 +0100
(Wed, 20 May 2009) $ by: $Author: rdonkin $ -->
+
+<config>
+ <James>
+
+<!-- CHECKME! -->
+ <!-- This is the postmaster email address for this mail server. -->
+ <!-- Set this to the appropriate email address for error reports -->
+ <!-- If this is set to a non-local email address, the mail server -->
+ <!-- will still function, but will generate a warning on startup. -->
+ <postmaster>Postmaster@localhost</postmaster>
+
+ <!-- servernames identifies the DNS namespace served by this
instance of James. -->
+ <!-- These servernames are used for both matcher/mailet processing
and SMTP auth -->
+ <!-- to determine when a mail is intended for local delivery. -->
+ <!-- -->
+ <!-- If autodetect is TRUE, James wil attempt to discover its own
host name AND -->
+ <!-- use any explicitly specified servernames. -->
+ <!-- If autodetect is FALSE, James will use only the specified
servernames. -->
+ <!-- -->
+ <!-- If autodetectIP is not FALSE, James will also allow add the IP
address for each servername. -->
+ <!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3,
address literals. -->
+ <!-- -->
+ <!-- To override autodetected server names simply add explicit
servername elements. -->
+ <!-- In most cases this will be necessary. -->
+ <!-- By default, the servername 'localhost' is specified. This can
be removed, if required. -->
+ <!-- -->
+ <!-- Warning: If you are using fetchmail it is important to include
the -->
+ <!-- fetched domains in the server name list to prevent
looping. -->
+ <servernames autodetect="true" autodetectIP="true">
+<!-- CONFIRM? -->
+ <servername>localhost</servername>
+ </servernames>
+
+ <!-- Set whether user names are case sensitive or case insensitive
-->
+ <!-- Set whether to enable local aliases -->
+ <!-- Set whether to enable forwarding -->
+ <usernames ignoreCase="true" enableAliases="true"
enableForwarding="true"/>
+
+ <!-- The inbox repository is the location for users inboxes -->
+ <!-- Default setting: file based repository - enter path (
use "file:///" for absolute) -->
+ <inboxRepository>
+ <repository destinationURL="file://var/mail/inboxes/"
type="MAIL"/>
+ </inboxRepository>
+
+ <!-- Alternative inbox repository definition for DB use. -->
+ <!-- The format for the destinationURL
is "db://<data-source>/<table>" -->
+ <!-- <data-source> is the datasource name set up in the
database-connections block, below -->
+ <!-- <table> is the name of the table to store user inboxes in -->
+ <!-- The user name is used as <repositoryName> for this repository
config. -->
+ <!--
+ <inboxRepository>
+ <repository destinationURL="db://maildb/inbox/" type="MAIL"/>
+ </inboxRepository>
+ -->
+
+ <!-- Alternative inbox repository definition for DB use. -->
+ <!-- Stores message body in file system, rest in database -->
+ <!--
+ <inboxRepository>
+ <repository destinationURL="dbfile://maildb/inbox/" type="MAIL"/>
+ </inboxRepository>
+ -->
+
+ <!-- Alternative inbox repository definition for mbox use. -->
+ <!-- This method uses UNIX standard mbox files and is meant for
people using mbox files -->
+ <!-- with systems such as mail list archive displayers -->
+ <!-- Note that dot-locking is not currently supported -->
+ <!-- so network (write) accesses may cause mbox corruption -->
+ <!-- the sample mbox URL is an absolute URL; mbox:///var/mail will
put the users mbox files in /var/mail/-->
+ <!--
+ <inboxRepository>
+ <repository destinationURL="mbox:///var/mail/" type="MAIL"/>
+ </inboxRepository>
+ -->
+ </James>
+
+ <!-- This is an example configuration for FetchMail, a JavaMail based
gateway -->
+ <!-- service that pulls messages from other sources, and inserts them
into the -->
+ <!-- spool. They are then processed normally, although FetchMail
generally -->
+ <!-- has to fabricate some of the envelope information. FetchMail
should be -->
+ <!-- considered a mail gateway, rather than a relay, in RFC
terms. -->
+ <!-- Fetchmail is a functionally richer replacement for
FetchPOP. -->
+ <!-- CHECKME: FetchMail is disabled by default, and must be configured
to use. -->
+ <!-- Edit the file referred to by fetchmailConfig to enable and
configure. -->
+ &fetchmailConfig;
+
+ <!-- Set the Java packages from which to load mailets and matchers -->
+ <mailetpackages>
+ <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
+
<mailetpackage>org.apache.james.transport.mailets.smime</mailetpackage>
+
<mailetpackage>org.nhindirect.gateway.smtp.james.mailet</mailetpackage>
+ <mailetpackage>org.nhind.james.mailet</mailetpackage>
+ </mailetpackages>
+ <matcherpackages>
+ <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
+
<matcherpackage>org.apache.james.transport.matchers.smime</matcherpackage>
+
<matcherpackage>org.nhindirect.gateway.smtp.james.matcher</matcherpackage>
+ <matcherpackage>org.nhind.james.matcher</matcherpackage>
+ </matcherpackages>
+
+ <!-- The James Spool Manager block -->
+ <!-- -->
+ <!-- This block is responsible for processing messages on the spool. -->
+ <spoolmanager>
+ <!-- Number of spool threads -->
+ <threads> 10 </threads>
+
+ <!-- The root processor is a required processor - James routes all
mail on the spool -->
+ <!-- through this processor first. -->
+ <!-- -->
+ <!-- This configuration is a sample configuration for the root
processor. -->
+ <processor name="root">
+
+ <!-- This mailet redirects mail for the user 'postmaster' at any
local domain to -->
+ <!-- the postmaster address specified for the server. The
postmaster address -->
+ <!-- is required by rfc822. Do not remove this mailet unless you
are meeting -->
+ <!-- this requirement through other means (e.g. a
XML/JDBCVirtualUserTable mailet) -->
+ <mailet match="All" class="PostmasterAlias"/>
+
+ <!-- Checks that the email Sender is associated with a valid
domain. -->
+ <!-- Useful for detecting and eliminating spam. -->
+ <!-- For this block to function, the spam processor must be
configured. -->
+ <!--
+ <mailet
match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6"
class="ToProcessor">
+ <processor> spam </processor>
+ </mailet>
+ -->
+
+ <!-- Important check to avoid looping -->
+ <mailet match="RelayLimit=30" class="Null"/>
+
+ <!-- Check for viruses -->
+ <!-- -->
+ <!-- Does an antivirus scan check using a ClamAV daemon (CLAMD).
-->
+ <!-- -->
+ <!-- Interacts directly with the daemon using the "stream"
method, -->
+ <!-- which should have the lowest possible overhead. -->
+ <!-- The CLAMD daemon will typically reside on localhost, but
could reside on a -->
+ <!-- different host. -->
+ <!-- It may also consist on a set of multiple daemons, each
residing on a different -->
+ <!-- server and on different IP number. -->
+ <!-- In such case a DNS host name with multiple IP addresses
(round-robin load sharing) -->
+ <!-- is supported by the mailet (but on the same port number). -->
+ <!-- -->
+ <!-- Handles the following init parameters: -->
+ <!-- <debug> -->
+ <!-- <host>: the host name of the server where CLAMD runs. It can
either be -->
+ <!-- a machine name, such as -->
+ <!-- "
java.sun.com", or a textual representation of its -->
+ <!-- IP address. If a literal IP address is supplied, only
the -->
+ <!-- validity of the address format is checked. -->
+ <!-- If the machine name resolves to multiple IP addresses,
round-robin load sharing will -->
+ <!-- be used. -->
+ <!-- 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. -->
+ <!-- The default is "6". -->
+ <!-- <pingIntervalMilli>: 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 stream connection. The default is "8192".
-->
+ <!--
+ <mailet match="All" class="ClamAVScan" onMailetException="ignore">
+ <debug> true </debug>
+ </mailet>
+ -->
+
+ <!-- If infected go to virus processor -->
+ <mailet
match="HasMailAttributeWithValue=org.apache.james.infected, true"
class="ToProcessor">
+ <processor> virus </processor>
+ </mailet>
+
+ <!-- Check attachment extensions for possible viruses -->
+ <!-- The "-z" option requests the check to be non-recursively
applied -->
+ <!-- to the contents of any attached '*.zip' file. -->
+ <!--
+ <mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.cmd
*.pif *.scr *.vbs *.avi *.mp3 *.mpeg *.shs" class="Bounce"
onMatchException="error">
+ <inline>heads</inline>
+ <attachment>none</attachment>
+ <passThrough>false</passThrough>
+ <prefix>[REJECTED]</prefix>
+ <notice>
+The Security Policy of XXX does not allow to forward messages containing
attachments having any of the
extensions .exe, .com, .bat, .cmd, .pif, .scr, .vbs, .avi, .mp3, .mpeg, .shs,
therefore your message has been rejected.
+
+Please don't reply to this e-mail as it has been automatically sent by the
antivirus system.
+
+Regards, Postmaster XXX.YYY
+.....................................
+ </notice>
+ </mailet>
+ -->
+
+ <!-- Whitelist Management -->
+ <!-- Manages for each local user a "white list" of remote
addresses whose messages -->
+ <!-- should never be blocked as spam. -->
+ <!-- -->
+ <!-- If <automaticInsert> is true, it will 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 (<displayFlag>); -->
+ <!-- (ii) insert some new addresses in his own list
(<insertFlag>); -->
+ <!-- (iii) remove some addresses from his own list
(<removeFlag>). -->
+ <!-- In all of the three above 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). -->
+ <!--
+ <mailet match="SMTPAuthSuccessful" class="WhiteListManager"
onMailetException="ignore">
+ <repositoryPath>db://maildb</repositoryPath>
+ <automaticInsert>true</automaticInsert>
+
<whitelistManagerAddress>whitelis...@xxx.yyy</whitelistManagerAddress>
+ <displayFlag>display</displayFlag>
+ <insertFlag>insert</insertFlag>
+ <removeFlag>remove</removeFlag>
+ </mailet>
+ -->
+
+ <!-- "not spam" bayesian analysis feeder. -->
+ <!--
+ <mailet match="RecipientIs=not....@xxx.yyy"
class="BayesianAnalysisFeeder">
+ <repositoryPath> db://maildb </repositoryPath>
+ <feedType>ham</feedType>
+ <maxSize>200000</maxSize>
+ </mailet>
+ -->
+
+ <!-- "spam" bayesian analysis feeder. -->
+ <!--
+ <mailet match="RecipientIs=sp...@xxx.yyy"
class="BayesianAnalysisFeeder">
+ <repositoryPath> db://maildb </repositoryPath>
+ <feedType>spam</feedType>
+ <maxSize>200000</maxSize>
+ </mailet>
+ -->
+
+ <!-- sample SMIME mailets configuration -->
+ <!-- In order to use SMIME capabilities you need to install the
bouncycastle JCE -->
+ <!-- provider in your environment (james/lib) -->
+ <!-- e.g: bcprov-jdk14-129.jar from
http://www.bouncycastle.org/latest_releases.html -->
+ <!--
+ <mailet match="IsSMIMEEncrypted" class="SMIMEDecrypt">
+ <keyStoreType>pkcs12</keyStoreType>
+ <keyStoreFileName>c:/path.pfx</keyStoreFileName>
+ <keyStorePassword>myKeyStorePass</keyStorePassword>
+ <keyAlias>myKeyAlias</keyAlias>
+ <keyAliasPassword>myKeyPass</keyAliasPassword>
+ </mailet>
+
+ <mailet match="IsSMIMESigned" class="SMIMECheckSignature">
+ <keyStoreType>pkcs12</keyStoreType>
+ <keyStoreFileName>c:/path.pfx</keyStoreFileName>
+ <keyStorePassword>myKeyStorePass</keyStorePassword>
+ <strip>false</strip>
+ <onlyTrusted>true</onlyTrusted>
+ </mailet>
+ -->
+
+ <!--
+ <mailet match="All" class="XMLVirtualUserTable">
+ <!- 1:1 mapping ->
+ <mapping>morgoth@middle-earth=sauron@mordor</mapping>
+ <!- 1:n mapping ->
+
<mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
+ <!- DSN mapping ->
+ <mapping>boromir@osgilliath=error:550 Requested action not
taken: no such user here</mapping>
+ <!- regex based mapping ->
+
<mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
+ <!- both standard and regex mapping ->
+
<mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
+ <!- conditional regex mapping example ->
+
<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;
+
regex:(.*)-off@listserver:${1}-unsubscribe@listserver
+ </mapping>
+ </mailet>
+ -->
+
+ <!-- Anti-spam processing -->
+ <!-- The following two entries avoid double anti-spam analysis -->
+ <!-- for forwarded messages. -->
+ <!-- Has spam checking already been done? -->
+ <mailet match="HasMailAttribute=spamChecked" class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+ <!-- Spam checking will not be done twice -->
+ <mailet match="All" class="SetMailAttribute">
+ <spamChecked>true</spamChecked>
+ </mailet>
+
+ <!-- White List:
+ If you use block lists, you will probably want to check
+ for known permitted senders. This is particularly true
+ if you use more aggressive block lists, such as SPEWS,
+ that are prone to block entire subnets without regard
+ for non-spamming senders.
+ -->
+
+ <!-- Messages from authenticated senders never are spam -->
+ <mailet match="SMTPAuthSuccessful" class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+
+ <!-- Messages signed by trusted users never are spam -->
+ <!-- Uncommenting the following entry, messages with valid
signatures will never be considered spam. -->
+ <!-- This can be a valid policy *if* SMIMECheckSignature was
invoked -->
+ <!-- with <onlyTrusted>true</onlyTrusted> set -->
+ <!--
+ <mailet
match="HasMailAttribute=org.apache.james.SMIMECheckSignature"
class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+ -->
+
+ <!-- specific known senders -->
+ <!--
+ <mailet match="SenderIs=goodboy@goodhost"
+ class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+ -->
+
+ <!-- People on this list agree to pay a penalty if they send spam
-->
+ <mailet match="InSpammerBlacklist=
query.bondedsender.org."
+ class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+
+ <!-- E-mail legally required not to be spam (see:
http://www.habeas.com) -->
+ <!--
+ <mailet match="HasHabeasWarrantMark" class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+ -->
+
+ <!-- If the sender is in a recipient's whitelist, it is a valid
sender, -->
+ <!-- and as such the message should not be considered spam for
such recipient. -->
+ <!--
+ <mailet match="IsInWhiteList=db://maildb" class="ToProcessor"
onMatchException="noMatch">
+ <processor> transport </processor>
+ </mailet>
+ -->
+
+ <!-- End of White List -->
+
+ <!-- Check for delivery from a known spam server -->
+ <!-- This set of matchers/mailets redirect all emails from known
-->
+ <!-- black holes, open relays, and spam servers to the spam
processor -->
+ <!-- For this set to function properly, the spam processor must
be configured. -->
+ <mailet match="InSpammerBlacklist=
dnsbl.njabl.org."
+ class="ToProcessor">
+ <processor> spam </processor>
+ <notice>550 Requested action not taken: rejected - see
http://njabl.org/ </notice>
+ </mailet>
+
+ <!-- Sample matching to kill a message (send to Null) -->
+ <!--
+ <mailet match="RecipientIs=badboy@badhost" class="Null"/>
+ -->
+
+ <!-- Anti spam bayesian analysis -->
+ <!--
+ <mailet match="All" class="BayesianAnalysis"
onMailetException="ignore">
+ <repositoryPath>db://maildb</repositoryPath>
+ <maxSize>200000</maxSize>
+ <headerName>X-MessageIsSpamProbability</headerName>
+ <ignoreLocalSender>true</ignoreLocalSender>
+ </mailet>
+
+ <mailet
match="CompareNumericHeaderValue=X-MessageIsSpamProbability > 0.90"
class="SetMailAttribute" onMatchException="noMatch">
+ <isSpam>true</isSpam>
+ </mailet>
+
+ <mailet
match="CompareNumericHeaderValue=X-MessageIsSpamProbability > 0.90"
class="SetMimeHeader" onMatchException="noMatch">
+ <name>X-MessageIsSpam</name>
+ <value>true</value>
+ </mailet>
+
+ <mailet
match="CompareNumericHeaderValue=X-MessageIsSpamProbability > 0.99"
class="ToProcessor" onMatchException="noMatch">
+ <processor> spam </processor>
+ <notice>Spam not accepted</notice>
+ </mailet>
+ -->
+
+ <!-- Send remaining mails to the transport processor for either
local or remote delivery -->
+ <mailet match="All" class="ToProcessor">
+ <processor> transport </processor>
+ </mailet>
+ </processor>
+
+ <!-- The error processor is required. James may internally set
emails to the -->
+ <!-- error state. The error processor is generally invoked when
there is an -->
+ <!-- unexpected error either in the mailet chain or internal to
James. -->
+ <!-- -->
+ <!-- By default configuration all email that generates an error in
placed in -->
+ <!-- an error repository. -->
+ <processor name="error">
+ <!-- If you want to notify the sender their message generated an
error, uncomment this -->
+ <!--
+ <mailet match="All" class="Bounce"/>
+ -->
+ <!-- If you want to notify the postmaster that a message
generated an error, uncomment this -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <!-- Logs any messages to the repository specified -->
+ <mailet match="All" class="ToRepository">
+ <repositoryPath> file://var/mail/error/</repositoryPath>
+ <!-- An alternative database repository example follows. -->
+ <!--
+ <repositoryPath> db://maildb/deadletter/error </repositoryPath>
+ -->
+ </mailet>
+ </processor>
+
+ <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom
processor for local or -->
+ <!-- remote delivery -->
+ <processor name="transport">
+
+ <!-- This is an example configuration including configuration for
a list server. -->
+ <!-- CHECKME: before uncommenting this, edit the configuration
file's contents -->
+ <!--
+ &listserverConfig;
+ -->
+
+ <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
+ <name>X-UserIsAuth</name>
+ <value>true</value>
+ </mailet>
+
+ <mailet
match="HasMailAttribute=org.apache.james.SMIMECheckSignature"
class="SetMimeHeader">
+ <name>X-WasSigned</name>
+ <value>true</value>
+ </mailet>
+
+ <!-- Add a server-side signature -->
+ <!-- In order to use SMIME capabilities you need to install the
bouncycastle JCE -->
+ <!-- provider in your environment (james/lib) -->
+ <!-- e.g: bcprov-jdk14-129.jar from
http://www.bouncycastle.org/latest_releases.html -->
+ <!--
+ <mailet match="All" class="SMIMESign" onMailetException="ignore">
+ <keyStoreType>jks</keyStoreType>
+ <keyStoreFileName>path.keystore</keyStoreFileName>
+ <keyStorePassword>myKeyStorePass</keyStorePassword>
+ <keyAlias>myKeyAlias</keyAlias>
+ <keyAliasPassword>myKeyPass</keyAliasPassword>
+ <signerName>XXX Trusted Server</signerName>
+ <rebuildFrom>true</rebuildFrom>
+ <postmasterSigns>true</postmasterSigns>
+ <debug>true</debug>
+ </mailet>
+ -->
+
+ <!-- Experimental quota Matcher -->
+ <!-- This matcher need to calculate the mailbox size everytime it
is called. This can slow down things if there are many mails in -->
+ <!-- the mailbox. Some users also report big problems with the
matcher if a JDBC based mailrepository is used. -->
+ <!-- Check if over quota -->
+ <!--
+ <mailet match="RecipientIsOverFixedQuota=20M" class="Resend">
+ <sender>postmaster</sender>
+ <replyTo>postmaster</replyTo>
+ <reversePath>null</reversePath>
+ <inline>none</inline>
+ <attachment>message</attachment>
+ <prefix>[OVER QUOTA WARNING]</prefix>
+ <message>
+When receiving the attached message, your mailbox is larger than 20 MB,
which is the maximum allowed quota. The mailbox will not be blocked, but we
ask you to empty it ASAP.
+
+It is likely that you have set, in your mail client account, the
option "leave a copy of messages on server". For any help ask your
administrators.
+
+Regards, Postmaster XXX.YYY
+.....................................
+ </message>
+ </mailet>
+ -->
+
+ <mailet
match="RecipientIsXdAndNotSMIME=
http://localhost:8081/config-service/ConfigurationService"
class="DirectXdMailet">
+
<ConfigURL>
http://localhost:8081/config-service/ConfigurationService</ConfigURL>
+
<EndpointURL>
http://localhost:8081/xd/services/DocumentRepository_Service</EndpointURL>
+ </mailet>
+
+ <mailet match="RecipAndSenderIsNotLocal=
mydomain.com"
class="NHINDSecurityAndTrustMailet">
+ <ConfigURL>
http://localhost:8081/config-service/api</ConfigURL>
+
<MessageMonitoringServiceURL>
http://localhost:8081/msg-monitor</MessageMonitoringServiceURL>
+
<AutoDSNFailueCreation>General,ReliableAndTimely</AutoDSNFailueCreation>
+
<SmptAgentConfigProvider>org.nhindirect.gateway.smtp.provider.RESTSmtpAgentConfigProvider</SmptAgentConfigProvider>
+
<ServiceSecurityManagerProvider>org.nhindirect.gateway.smtp.provider.ConfigBasicAuthServiceSecurityManagerProvider</ServiceSecurityManagerProvider>
+ <ServiceSecurityAuthSubject>direct</ServiceSecurityAuthSubject>
+ <ServiceSecurityAuthSecret>#H|tBro$</ServiceSecurityAuthSecret>
+
<SmptAgentAuditorProvider>org.nhindirect.common.audit.provider.RDBMSAuditorProvider</SmptAgentAuditorProvider>
+ </mailet>
+
+ <!-- This mailet tracks all incoming notification messages. All
messages at this point should not encrypted, so they
+ should be incoming in direction. In addtion this mailet
determines if a notification should be suppressed from being
+ delivered to the edge client. Generally this applies to
duplicate notification checking of messages that were sent with
+ the timely and reliable disposition option, but implementations
can vary by HISP. The default configuration defers to
+ the message monitoring service to dictate if messages should be
supresses. -->
+ <mailet match="IsNotification" class="SuppressAndTrackAggregate">
+
<MessageMonitoringServiceURL>
http://localhost:8081/msg-monitor</MessageMonitoringServiceURL>
+ <ConsumeMDNProcessed>true</ConsumeMDNProcessed>
+ </mailet>
+
+ <mailet
match="RecipientIsXdAndNotSMIME=
http://localhost:8081/config-service/ConfigurationService"
class="DirectXdMailet">
+
<ConfigURL>
http://localhost:8081/config-service/ConfigurationService</ConfigURL>
+
<EndpointURL>
http://localhost:8081/xd/services/DocumentRepository_Service</EndpointURL>
+ </mailet>
+
+ <!-- Is the recipient is for a local account, deliver it locally
-->
+ <mailet match="RecipientIsLocal"
class="TimelyAndReliableLocalDelivery"/>
+
+ <!-- If the host is handled by this server and it did not get -->
+ <!-- locally delivered, this is an invalid recipient -->
+ <mailet match="HostIsLocal" class="ToProcessor">
+ <processor> local-address-error </processor>
+ <notice>550 - Requested action not taken: no such user
here</notice>
+ </mailet>
+
+<!-- CHECKME! -->
+ <!-- This is an anti-relay matcher/mailet combination -->
+ <!-- -->
+ <!-- Emails sent from servers not in the network list are -->
+ <!-- rejected as spam. This is one method of preventing your -->
+ <!-- server from being used as an open relay. Make sure you
understand -->
+ <!-- how to prevent your server from becoming an open relay
before -->
+ <!-- changing this configuration. See also <authorizedAddresses>
in SMTP Server -->
+ <!-- -->
+ <!-- This matcher/mailet combination must come after local
delivery has -->
+ <!-- been performed. Otherwise local users will not be able to
receive -->
+ <!-- email from senders not in this remote address list. -->
+ <!-- -->
+ <!-- If you are using this matcher/mailet you will probably want
to -->
+ <!-- update the configuration to include your own
network/addresses. The -->
+ <!-- matcher can be configured with a comma separated list of IP
addresses -->
+ <!-- wildcarded IP subnets, and wildcarded hostname subnets. -->
+ <!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*,
192.168.0.*" -->
+ <!-- -->
+ <!-- If you are using SMTP authentication then you can (and
generally -->
+ <!-- should) disable this matcher/mailet pair. -->
+ <!--
+ <mailet match="RemoteAddrNotInNetwork=127.0.0.1"
class="ToProcessor">
+ <processor> relay-denied </processor>
+ <notice>550 - Requested action not taken: relaying
denied</notice>
+ </mailet>
+ -->
+
+ <!-- Attempt remote delivery using the specified repository for
the spool, -->
+ <!-- using delay time to retry delivery and the maximum number of
retries -->
+ <mailet
match="RecipientIsNotXd=
http://localhost:8081/config-service/ConfigurationService"
class="RemoteDelivery">
+ <outgoing> file://var/mail/outgoing/ </outgoing>
+ <!-- alternative database repository example below -->
+ <!--
+ <outgoing> db://maildb/spool/outgoing </outgoing>
+ -->
+
+ <!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
+ <!-- 5 day retry period, with 4 attempts in the first
+ hour, two more within the first 6 hours, and then
+ every 6 hours for the rest of the period. -->
+ <delayTime> 5 minutes </delayTime>
+ <delayTime> 10 minutes </delayTime>
+ <delayTime> 45 minutes </delayTime>
+ <delayTime> 2 hours </delayTime>
+ <delayTime> 3 hours </delayTime>
+ <delayTime> 6 hours </delayTime>
+ <maxRetries> 25 </maxRetries>
+
+ <!-- The number of threads that should be trying to deliver
outgoing messages -->
+ <deliveryThreads> 1 </deliveryThreads>
+
+ <!-- If false the message will not be sent to given server if
any recipients fail -->
+ <sendpartial>false</sendpartial>
+
+ <!-- By default we send bounces to the "bounce" processor -->
+ <!-- By removing this configuration James will fallback to
hardcoded bounce -->
+ <!-- notifications -->
+ <bounceProcessor>bounces</bounceProcessor>
+
+ <!-- A single mail server to deliver all outgoing messages. -->
+ <!-- This is useful if this server is a backup or failover
machine, -->
+ <!-- or if you want all messages to be routed through a
particular mail server, -->
+ <!-- regardless of the email addresses specified in the
message -->
+ <!-- -->
+ <!-- The gateway element specifies the gateway SMTP server
name. -->
+ <!-- If your gateway mail server is listening on a port other
than 25, -->
+ <!-- you can set James to connect to it on that port using the
gatewayPort -->
+ <!-- element. -->
+ <!-- Although normally multiple addresses are implemented
through proper -->
+ <!-- DNS configuration, the RemoteDelivery mail does allow
specifying -->
+ <!-- multiple gateway elements, each of which may also have a
port -->
+ <!-- e.g., mygateway:2525 -->
+ <!-- the gatewayPort element is used as a default -->
+ <!--
+ <gateway>
otherserver.mydomain.com </gateway>
+ <gatewayPort>25</gatewayPort>
+ -->
+ <!-- If the gateway requires smtp authentication the following
directives -->
+ <!-- (gatewayusername/gatewayPassword) can be used. -->
+ <!--
+ <gatewayusername>login</gatewayusername>
+ <gatewayPassword>pass</gatewayPassword>
+ -->
+
+ <!-- Set the HELO/EHLO name to use when connectiong to remote
SMTP-Server -->
+ <!--
+ <mail.smtp.localhost>myMailServer</mail.smtp.localhost>
+ -->
+ </mailet>
+
+ </processor>
+
+ <!-- Processor CONFIGURATION SAMPLE: spam is a sample custom
processor for handling -->
+ <!-- spam. -->
+ <!-- You can either log these, bounce these, or just ignore them. -->
+ <processor name="spam">
+ <!-- To destroy all messages, uncomment this matcher/mailet
configuration -->
+ <!--
+ <mailet match="All" class="Null"/>
+ -->
+
+ <!-- To notify the sender their message was marked as spam,
uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="Bounce"/>
+ -->
+
+ <!-- To notify the postmaster that a message was marked as spam,
uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <!-- To log the message to a repository, this matcher/mailet
configuration should be uncommented. -->
+ <!-- This is the default configuration. -->
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>file://var/mail/spam/</repositoryPath>
+
+ <!-- Changing the repositoryPath, as in this commented out
example, will -->
+ <!-- cause the mails to be stored in a database repository.
-->
+ <!-- Please note that only one repositoryPath element can be
present for the mailet -->
+ <!-- configuration. -->
+ <!--
+ <repositoryPath> db://maildb/deadletter/spam </repositoryPath>
+ -->
+ </mailet>
+ </processor>
+
+ <!-- messages containing viruses. -->
+ <processor name="virus">
+
+ <!-- To avoid a loop while bouncing -->
+ <mailet match="All" class="SetMailAttribute">
+ <org.apache.james.infected>true,
bouncing</org.apache.james.infected>
+ </mailet>
+
+ <!-- If the sender is authenticated, notify the infection -->
+ <mailet match="SMTPAuthSuccessful" class="Bounce">
+ <inline>heads</inline>
+ <attachment>none</attachment>
+ <notice> Warning: We were unable to deliver the message below
because it was found infected by virus(es). </notice>
+ </mailet>
+
+ <!-- In any other situation ghost it, -->
+ <!-- as viruses almost always spoof the sender's address -->
+ <mailet match="All" class="Null" />
+ </processor>
+
+ <!-- This processor handles messages that are for local domains,
where the user is unknown -->
+ <processor name="local-address-error">
+ <!-- To avoid bouncing/archiving spam, uncomment this
matcher/mailet configuration -->
+ <!--
+ <mailet match="HasMailAttribute=isSpam" class="Null"
onMatchException="noMatch"/>
+ -->
+
+ <!-- Creates a bounce message using the direct project bounce
message generator -->
+ <mailet match="All" class="DirectBounce"/>
+
+ <!-- To notify the postmaster that a message had an invalid
address, uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+ <!--
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>
file://var/mail/address-error/</repositoryPath>
+ <repositoryPath> db://maildb/deadletter/address-error
</repositoryPath>
+
+ </mailet>
+ -->
+ </processor>
+
+ <!-- This processor handles messages that are for foreign domains,
where relaying is denied -->
+ <!-- As of James v2.2, this processor can be deprecated by using the
<authorizedAddresses> tag
+ in the SMTP Server, and rejecting the message in the protocol
transaction. -->
+ <processor name="relay-denied">
+ <!-- To notify the sender the address was invalid, uncomment this
matcher/mailet configuration -->
+ <!-- The original message is not attached to keep the bounce
processor from deliverying spam -->
+ <!--
+ <mailet match="All" class="Bounce">
+ <attachment>none</attachment>
+ </mailet>
+ -->
+
+ <!-- To notify the postmaster that a relay request was denied,
uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>file://var/mail/relay-denied/</repositoryPath>
+ <!-- An alternative database repository example follows. -->
+ <!--
+ <repositoryPath> db://maildb/deadletter/relay-denied
</repositoryPath>
+ -->
+ </mailet>
+ </processor>
+
+ <!-- This processor handle the bounces from RemoteDelivery: As of
James v2.3, this is the new -->
+ <!-- Default. -->
+ <!-- -->
+ <!-- DSNBounce properly create a DSN compliant bounce -->
+ <processor name="bounces">
+ <mailet match="All" class="DSNBounce">
+ <passThrough>false</passThrough>
+
+ <!-- optional subject prefix prepended to the original message
-->
+ <!--
+ <prefix>[bounce]</prefix>
+ -->
+
+ <!-- message, heads or none, default=message -->
+ <!--
+ <attachment>heads</attachment>
+ -->
+
+ <!-- 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] ... -->
+ <!--
+ <messageString>Here is [machine]. I'm not able to deliver this
message.</messageString>
+ -->
+ </mailet>
+ </processor>
+ </spoolmanager>
+
+ <!-- DNS Server Block -->
+ <!-- -->
+ <!-- Specifies DNS Server information for use by various components
inside -->
+ <!-- James. -->
+ <!-- -->
+ <!-- If autodiscover is true, James will attempt to autodiscover the
DNS servers configured on your underlying system.-->
+ <!-- Currently, this works if the OS has a unix-like
/etc/resolv.conf,-->
+ <!-- or the system is Windows based with ipconfig or winipcfg.-->
+ <!-- -->
+ <!-- If no DNS servers are found and you have not specified any below,
127.0.0.1 will be used-->
+ <!-- If you use autodiscover and add DNS servers manually a combination
of all the dns servers will be used -->
+ <!-- -->
+ <!-- Information includes a list of DNS Servers to be used by James.
These are -->
+ <!-- specified by the server elements, each of which is a child element
of the -->
+ <!-- servers element. Each server element is the IP address of a
single DNS server. -->
+ <!-- The servers element can have multiple server children. -->
+ <dnsserver>
+ <servers>
+ <!--Enter ip address of your DNS server, one IP address per
server -->
+ <!-- element. -->
+ <!--
+ <server>127.0.0.1</server>
+ -->
+ </servers>
+ <!-- Change autodiscover to false if you would like to turn off
autodiscovery -->
+ <!-- and set the DNS servers manually in the <servers> section -->
+ <autodiscover>true</autodiscover>
+ <authoritative>false</authoritative>
+
+ <!-- Maximum number of entries to maintain in the DNS cache -->
+ <maxcachesize>50000</maxcachesize>
+ </dnsserver>
+
+ <!-- The RemoteManager server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <remotemanager enabled="true">
+ <port>4555</port>
+ <!-- Uncomment this if you want to bind to a specific inetaddress
-->
+ <!--
+ <bind> </bind>
+ -->
+ <!-- Uncomment this if you want to use TLS (SSL) on this port -->
+ <!--
+ <useTLS>true</useTLS>
+ -->
+ <handler>
+ <!-- This is the name used by the server to identify itself in
the RemoteManager -->
+ <!-- protocol. If autodetect is TRUE, the server will discover
its -->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
+ <!-- will use the specified value. -->
+ <helloName autodetect="true">myMailServer</helloName>
+ <administrator_accounts>
+<!-- CHECKME! -->
+ <!-- Change the default login/password. -->
+ <account login="root" password="root"/>
+ </administrator_accounts>
+ <connectiontimeout> 60000 </connectiontimeout>
+ <!-- The prompt directive adds a prompt to every output from
RemoteManager -->
+ <!--
+ <prompt>james></prompt>
+ -->
+ </handler>
+ </remotemanager>
+
+ <!-- The POP3 server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <pop3server enabled="true">
+ <!-- port 995 is the well-known/IANA registered port for POP3S ie
over SSL/TLS -->
+ <!-- port 110 is the well-known/IANA registered port for Standard
POP3 -->
+ <port>110</port>
+
+ <!-- Uncomment this if you want to bind to a specific inetaddress -->
+ <!--
+ <bind> </bind>
+ -->
+ <!-- Uncomment this if you want to use TLS (SSL) on this port -->
+ <!--
+ <useTLS>true</useTLS>
+ -->
+
+ <handler>
+ <!-- This is the name used by the server to identify itself in
the POP3 -->
+ <!-- protocol. If autodetect is TRUE, the server will discover
its -->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
+ <!-- will use the specified value. -->
+ <helloName autodetect="true">myMailServer</helloName>
+ <connectiontimeout>120000</connectiontimeout>
+ </handler>
+ </pop3server>
+
+ <!-- The SMTP server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <smtpserver enabled="true">
+ <!-- port 25 is the well-known/IANA registered port for SMTP -->
+ <port>25</port>
+
+ <!-- Uncomment this if you want to bind to a specific inetaddress -->
+ <!-- Please NOTE: you should add this IP also to your
RemoteAddrNotInNetwork -->
+ <!-- in order to avoid relay check for locallly generated bounces -->
+ <!--
+ <bind> </bind>
+ -->
+ <!-- Uncomment this if you want to use TLS (SSL) on this port -->
+ <!--
+ <useTLS>true</useTLS>
+ -->
+
+ <handler>
+ <!-- This is the name used by the server to identify itself in
the SMTP -->
+ <!-- protocol. If autodetect is TRUE, the server will discover
its -->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
+ <!-- will use the specified value. -->
+ <helloName autodetect="true">myMailServer</helloName>
+ <connectiontimeout>360000</connectiontimeout>
+
+ <!-- Uncomment this if you want to require SMTP authentication.
+
+ supported values:
+ true: required but announced only to not authorizedAddresses
+ false: don't use AUTH
+ announce: like true, but always announce AUTH capability to
clients
+
+ The correct behaviour per RFC value would be false or
announce
+ but we still support true for backward compatibility and
because
+ some webmail client fails when AUTH is announced but no
authentication
+ information has been provided
+ -->
+ <authRequired>announce</authRequired>
+
+<!-- CHECKME! -->
+ <!-- Uncomment this if you want to authorize specific
addresses/networks.
+ If you use SMTP AUTH, addresses that match those specified
here will
+ be permitted to relay without SMTP AUTH. If you do not use
SMTP
+ AUTH, and you specify addreses here, then only addresses
that match
+ those specified will be permitted to relay.
+
+ Addresses may be specified as a an IP address or domain
name, with an
+ optional netmask, e.g.,
+
+ 127.*,
127.0.0.0/8,
127.0.0.0/255.0.0.0, and localhost/8
are all the same
+
+ See also the RemoteAddrNotInNetwork matcher in the
transport processor.
+ You would generally use one OR the other approach.
+ -->
+ <!--
+ <authorizedAddresses>
127.0.0.0/8</authorizedAddresses>
+ -->
+
+ <!-- Uncomment this if you want to verify sender addresses,
ensuring that -->
+ <!-- the sender address matches the user who has authenticated.
-->
+ <!-- This prevents a user of your mail server from acting as
someone else -->
+ <!--
+ <verifyIdentity>true</verifyIdentity>
+ -->
+
+ <!-- This sets the maximum allowed message size (in kilobytes)
for this -->
+ <!-- SMTP service. If unspecified, the value defaults to 0,
which means no limit. -->
+ <maxmessagesize>0</maxmessagesize>
+
+ <!-- This sets wether to enforce the use of HELO/EHLO salutation
before a -->
+ <!-- MAIL command is accepted. If unspecified, the value
defaults to true -->
+ <!--
+ <heloEhloEnforcement>true</heloEhloEnforcement>
+ -->
+
+ <!-- SMTP Handler Chain customization -->
+ <!-- Uncomment this and edit james-smtphandlerchain.xml
configuration file to -->
+ <!-- enable the experimental fastfail features. Look at the
james-smtphandlerchain.xml -->
+ <!-- for further informations -->
+ <!--
+ &smtphandlerchainConfig;
+ -->
+
+ </handler>
+ </smtpserver>
+
+ <!-- The NNTP server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <!-- NNTP-specific: if you disable the NNTP Server, you should also
set the nntp-repository's
+ threadCount to 0, otherwise there will be threads active and
polling -->
+ <nntpserver enabled="true">
+ <!-- THE NNTP PROTOCOL IS EXPERIMENTAL AND NOT AS WELL TESTED AS SMTP
AND POP3 IN THIS RELEASE.
+ The James project recommends that you check the James web site for
updates to the NNTP
+ service. -->
+ <!-- port 563 is the well-known/IANA registered port for NNTP over
SSL/TLS -->
+ <!-- port 119 is the well-known/IANA registered port for Standard
NNTP -->
+ <port>119</port>
+
+ <!-- Uncomment this if you want to bind to a specific inetaddress -->
+ <!--
+ <bind> </bind>
+ -->
+ <!-- Uncomment this if you want to use TLS (SSL) on this port -->
+ <!--
+ <useTLS>true</useTLS>
+ -->
+
+ <handler>
+ <!-- This is the name used by the server to identify itself in
the NNTP -->
+ <!-- protocol. If autodetect is TRUE, the server will discover
its -->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/edit-config.xsl Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ASCII" standalone="no"?>
+<xsl:stylesheet version="1.0" xmlns:ns0="urn:hl7-org:v3"
+ xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xd="
http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xsl ns0 xsi xd date"
+ xmlns:date="
http://exslt.org/dates-and-times"
extension-element-prefixes="date">
+
+ <xsl:output method="xml" encoding="ASCII" indent="yes"/>
+
+ <!-- Define input paramaters -->
+ <xsl:param name="postmaster" select="'
nhin-d+p...@nologs.org'"/>
+ <xsl:param name="servername" select="'
james.nologs.org'"/>
+ <xsl:param name="mailetpackage"
select="'org.nhindirect.gateway.smtp.james.mailet'"/>
+ <xsl:param name="matcherpackage"
select="'org.nhindirect.gateway.smtp.james.matcher'"/>
+ <xsl:param name="mailet-config-scope" select="'All'"/>
+ <xsl:param name="mailet-config-url"
+
select="'file:///home/mbamberg/james-2.3.2/apps/james/SAR-INF/STConfig.xml'"/>
+ <xsl:param name="mailet-config-class"
select="'NHINDSecurityAndTrustMailet'"/>
+ <xsl:param name="mailet-match-remove"
select="'RemoteAddrNotInNetwork=127.0.0.1'"/>
+
+ <!-- Edit the config.xml file for Apache James -->
+ <xsl:template match="/">
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:template>
+
+ <xsl:template match="node()|@*">
+ <xsl:choose>
+ <!-- Edit the postmaster -->
+ <xsl:when
+ test="name(parent::node()/parent::node())='config' and
name(parent::node())='James' and name()='postmaster'">
+ <xsl:element name="postmaster">
+ <xsl:value-of select="$postmaster"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Add an additional servername -->
+ <xsl:when
+
test="name(parent::node()/parent::node()/parent::node())='config' and
name(parent::node()/parent::node())='James' and
name(parent::node())='servernames' and name()='servername'">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ <xsl:element name="servername">
+ <xsl:value-of select="$servername"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Copy fetchmailConfig reference -->
+
+ <!-- For now, just embed fethmailConfig -->
+ <!--
+ <xsl:when test="name(parent::node())='config' and
name()='fetchmail'">
+ <xsl:text
disable-output-escaping="yes">&fetchmailConfig;</xsl:text>
+ </xsl:when>
+ -->
+
+ <!-- Add mailetpackage -->
+ <xsl:when test="name(parent::node())='config' and
name()='mailetpackages'">
+ <xsl:element name="mailetpackages">
+ <xsl:apply-templates select="./mailetpackage"/>
+ <xsl:element name="mailetpackage">
+ <xsl:value-of select="$mailetpackage"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Add matcherpackage -->
+ <xsl:when test="name(parent::node())='config' and
name()='matcherpackages'">
+ <xsl:element name="matcherpackages">
+ <xsl:apply-templates select="./matcherpackage"/>
+ <xsl:element name="matcherpackage">
+ <xsl:value-of select="$matcherpackage"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Replace RemoteAddrNotInNetwork with new mailet scope,
class and url -->
+ <xsl:when
+ test="name(parent::node()/parent::node())='spoolmanager'
and name(parent::node())='processor' and name()='mailet'">
+ <xsl:choose>
+ <xsl:when
+ test="@match = 'RemoteAddrNotInNetwork=127.0.0.1'
and @class = 'ToProcessor'">
+ <xsl:element name="mailet">
+ <xsl:attribute name="match">
+ <xsl:value-of
select="$mailet-config-scope"/>
+ </xsl:attribute>
+ <xsl:attribute name="class">
+ <xsl:value-of
select="$mailet-config-class"/>
+ </xsl:attribute>
+ <xsl:element name="ConfigURL">
+ <xsl:value-of select="$mailet-config-url"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="node() | @*" />
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+
+ <!-- Replace authorized addresses -->
+ <xsl:when
+ test="name(parent::node()/parent::node())='smtpserver' and
name(parent::node())='handler' and name()='authorizedAddresses'">
+ <xsl:element name="authRequired">
+ <xsl:value-of select="'announce'"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Otherwise just copy things -->
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/edit-tomcat.xsl Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ASCII" standalone="no"?>
+<xsl:stylesheet version="1.0" xmlns:ns0="urn:hl7-org:v3"
+ xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xd="
http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xsl ns0 xsi xd date"
+ xmlns:date="
http://exslt.org/dates-and-times"
extension-element-prefixes="date">
+
+ <xsl:output method="xml" encoding="ASCII" indent="yes"/>
+
+ <!-- Define input parameters -->
+ <xsl:param name="port" select="'8081'"/>
+
+ <!-- Edit the config.xml file for Apache James -->
+ <xsl:template match="/">
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:template>
+
+ <xsl:template match="node()|@*">
+ <xsl:choose>
+ <xsl:when
+ test="name()='Connector' and ./@port = '8080'">
+ <xsl:element name="Connector">
+ <xsl:attribute name="port">
+ <xsl:value-of select="$port" />
+ </xsl:attribute>
+ <xsl:attribute name="protocol">
+ <xsl:value-of select="'HTTP/1.1'" />
+ </xsl:attribute>
+ <xsl:attribute name="connectionTimeout">
+ <xsl:value-of select="'20000'" />
+ </xsl:attribute>
+ <xsl:attribute name="redirectPort">
+ <xsl:value-of select="'8443'" />
+ </xsl:attribute>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Otherwise just copy things -->
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/cakeystore.jks Thu Feb 12
19:40:52 2015 UTC
Binary file, no diff available.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/domainlist.conf Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<!--
+ This template file can be used as example for James Server configuration
+ DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+-->
+
+<!-- See
http://james.apache.org/server/3/config.html for usage -->
+
+<!-- Domainnames identifies the DNS namespace served by this instance of
James. -->
+<!-- These domainnames are used for both matcher/mailet processing and
SMTP auth -->
+<!-- to determine when a mail is intended for local delivery. -->
+<!-- -->
+<!-- If autodetect is TRUE, James wil attempt to discover its own host
name AND -->
+<!-- use any explicitly specified servernames. -->
+<!-- If autodetect is FALSE, James will use only the specified
domainnames. -->
+<!-- -->
+<!-- If autodetectIP is not FALSE, James will also allow add the IP
address for each servername. -->
+<!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3, address
literals. -->
+<!-- -->
+<!-- To override autodetected domainames names simply add explicit
domainname elements. -->
+<!-- In most cases this will be necessary. -->
+<!-- By default, the domainname 'localhost' is specified. This can be
removed, if required. -->
+<!-- -->
+<!-- Warning: If you are using fetchmail it is important to include the -->
+<!-- fetched domains in the server name list to prevent looping. -->
+
+<!-- JPA implementation for DomainList -->
+<!--
+<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
+ <autodetect>true</autodetect>
+ <autodetectIP>true</autodetectIP>
+ <defaultDomain>localhost/defaultDomain>
+</domainlist>
+-->
+
+<!-- XML based implementation for DomainList -->
+<domainlist class="org.apache.james.domainlist.xml.XMLDomainList">
+ <domainnames>
+ <domainname>localhost</domainname>
+ </domainnames>
+ <autodetect>true</autodetect>
+ <autodetectIP>true</autodetectIP>
+ <defaultDomain>localhost</defaultDomain>
+</domainlist>
+
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/imapserver.conf Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<!--
+ This template file can be used as example for James Server configuration
+ DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+-->
+
+<!-- See
http://james.apache.org/server/3/config.html for usage -->
+
+<imapservers>
+
+ <!-- IMAP server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <imapserver enabled="true">
+
+ <jmxName>imapserver</jmxName>
+
+ <!-- Configure this if you want to bind to a specific inetaddress -->
+ <!-- port 143 is the well-known/IANA registered port for IMAP -->
+ <!-- port 993 is the well-known/IANA registered port for IMAPS ie
over SSL/TLS -->
+ <!-- Please NOTE: you should add this IP also to your
RemoteAddrNotInNetwork -->
+ <!-- in order to avoid relay check for locally generated bounces -->
+ <bind>
0.0.0.0:143</bind>
+
+ <connectionBacklog>200</connectionBacklog>
+
+ <!-- Set to true to use TLS for the Socket.
+ To use this you need to copy sunjce_provider.jar to
/path/james/lib directory.
+ -->
+ <tls socketTLS="false" startTLS="true">
+ <!-- To create a new keystore execute:
+ keytool -genkey -alias james -keyalg RSA -keystore
/path/to/james/conf/keystore
+ -->
+ <keystore>file://conf/cakeystore.jks</keystore>
+ <secret>1kingpuff</secret>
+
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+ </tls>
+
+ <handler>
+ <!-- This is the name used by the server to identify itself in the
SMTP -->
+ <!-- protocol. If autodetect is TRUE, the server will discover
its -->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
+ <!-- will use the specified value. -->
+ <!--
+ <helloName autodetect="true">myMailServer</helloName>
+ -->
+
+ <!-- Connection timeout is 30 minutes and can not be changed - See
rfc2060 5.4 for details -->
+
+ <!-- Set the maximum simultaneous incoming connections for this
service -->
+ <connectionLimit>0</connectionLimit>
+
+ <!-- Set the maximum simultaneous incoming connections per IP for
this service -->
+ <connectionLimitPerIP>0</connectionLimitPerIP>
+
+ </handler>
+
+ </imapserver>
+
+</imapservers>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/log4j.properties Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,137 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# See
http://james.apache.org/server/3/config.html for usage
+
+log4j.rootLogger=DEBUG
+
+log4j.appender.CONS=org.apache.log4j.ConsoleAppender
+log4j.appender.CONS.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONS.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c
| %m%n
+
+log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FILE.File=../log/james-server.log
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c
| %m%n
+
+log4j.appender.MAILBOXMANAGER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.MAILBOXMANAGER.File=../log/mailboxmanager.log
+log4j.appender.MAILBOXMANAGER.DatePattern='.'yyyy-MM-dd
+log4j.appender.MAILBOXMANAGER.layout=org.apache.log4j.PatternLayout
+log4j.appender.MAILBOXMANAGER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c
| %m%n
+
+log4j.appender.IMAPSERVER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.IMAPSERVER.File=../log/imapserver.log
+log4j.appender.IMAPSERVER.DatePattern='.'yyyy-MM-dd
+log4j.appender.IMAPSERVER.layout=org.apache.log4j.PatternLayout
+log4j.appender.IMAPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.MAILETCONTAINER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.MAILETCONTAINER.File=../log/mailetcontainer.log
+log4j.appender.MAILETCONTAINER.DatePattern='.'yyyy-MM-dd
+log4j.appender.MAILETCONTAINER.layout=org.apache.log4j.PatternLayout
+log4j.appender.MAILETCONTAINER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c
| %m%n
+
+log4j.appender.DNSSERVICE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DNSSERVICE.File=../log/dnsservice.log
+log4j.appender.DNSSERVICE.DatePattern='.'yyyy-MM-dd
+log4j.appender.DNSSERVICE.layout=org.apache.log4j.PatternLayout
+log4j.appender.DNSSERVICE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.POP3SERVER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.POP3SERVER.File=../log/pop3server.log
+log4j.appender.POP3SERVER.DatePattern='.'yyyy-MM-dd
+log4j.appender.POP3SERVER.layout=org.apache.log4j.PatternLayout
+log4j.appender.POP3SERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.SMTPSERVER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.SMTPSERVER.File=../log/smtpserver.log
+log4j.appender.SMTPSERVER.DatePattern='.'yyyy-MM-dd
+log4j.appender.SMTPSERVER.layout=org.apache.log4j.PatternLayout
+log4j.appender.SMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.LMTPSERVER=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.LMTPSERVER.File=../log/lmtpserver.log
+log4j.appender.LMTPSERVER.DatePattern='.'yyyy-MM-dd
+log4j.appender.LMTPSERVER.layout=org.apache.log4j.PatternLayout
+log4j.appender.LMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.MAILREPOSITORYSTORE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.MAILREPOSITORYSTORE.File=../log/mailrepositorystore.log
+log4j.appender.MAILREPOSITORYSTORE.DatePattern='.'yyyy-MM-dd
+log4j.appender.MAILREPOSITORYSTORE.layout=org.apache.log4j.PatternLayout
+log4j.appender.MAILREPOSITORYSTORE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c
| %m%n
+
+log4j.appender.USERSREPOSITORY=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.USERSREPOSITORY.File=../log/usersrepository.log
+log4j.appender.USERSREPOSITORY.DatePattern='.'yyyy-MM-dd
+log4j.appender.USERSREPOSITORY.layout=org.apache.log4j.PatternLayout
+log4j.appender.USERSREPOSITORY.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c
| %m%n
+
+log4j.appender.FETCHMAIL=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FETCHMAIL.File=../log/fetchmail.log
+log4j.appender.FETCHMAIL.DatePattern='.'yyyy-MM-dd
+log4j.appender.FETCHMAIL.layout=org.apache.log4j.PatternLayout
+log4j.appender.FETCHMAIL.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.DOMAINLIST=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DOMAINLIST.File=../log/domainlist.log
+log4j.appender.DOMAINLIST.DatePattern='.'yyyy-MM-dd
+log4j.appender.DOMAINLIST.layout=org.apache.log4j.PatternLayout
+log4j.appender.DOMAINLIST.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c | %m%n
+
+log4j.appender.VIRTUALUSERTABLE=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.VIRTUALUSERTABLE.File=../log/virtualusertable.log
+log4j.appender.VIRTUALUSERTABLE.DatePattern='.'yyyy-MM-dd
+log4j.appender.VIRTUALUSERTABLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.VIRTUALUSERTABLE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c
| %m%n
+
+log4j.appender.MAILQUEUEFACTORY=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.MAILQUEUEFACTORY.File=../log/mailqueuefactory.log
+log4j.appender.MAILQUEUEFACTORY.DatePattern='.'yyyy-MM-dd
+log4j.appender.MAILQUEUEFACTORY.layout=org.apache.log4j.PatternLayout
+log4j.appender.MAILQUEUEFACTORY.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS}
| %c
| %m%n
+
+log4j.logger.org.apache.jackrabbit=ERROR, CONS, FILE
+
+log4j.logger.org.apache.xbean.spring=WARN, CONS, FILE
+log4j.logger.org.apache.activemq=WARN, CONS, FILE
+
+log4j.logger.org.apache.camel=WARN, CONS, FILE
+log4j.logger.org.springframework=WARN, CONS, FILE
+log4j.logger.org.apache.james=INFO, CONS, FILE
+
+log4j.logger.james=WARN, CONS, FILE
+log4j.logger=DEBUG, CONS, FILE
+
+log4j.logger.james.mailboxmanager=INFO, MAILBOXMANAGER
+log4j.logger.james.imapserver=INFO, IMAPSERVER
+log4j.logger.james.mailetcontainer=INFO, MAILETCONTAINER
+log4j.logger.james.mailetcontext=INFO, MAILETCONTAINER
+log4j.logger.james.mailspooler=INFO, MAILETCONTAINER
+log4j.logger.james.mailprocessor=INFO, MAILETCONTAINER
+log4j.logger.james.dnsservice=INFO, DNSSERVICE
+log4j.logger.james.pop3server=INFO, POP3SERVER
+log4j.logger.james.smtpserver=INFO, SMTPSERVER
+log4j.logger.james.lmtpserver=INFO, LMTPSERVER
+log4j.logger.james.mailrepositorystore=INFO, MAILREPOSITORYSTORE
+log4j.logger.james.usersrepository=INFO, USERSREPOSITORY
+log4j.logger.james.fetchmail=INFO, FETCHMAIL
+log4j.logger.james.domainlist=INFO, DOMAINLIST
+log4j.logger.james.virtualusertable=INFO, VIRTUALUSERTABLE
+log4j.logger.james.mailqueuefactory=INFO, MAILQUEUEFACTORY
+log4j.logger.org.nhindirect=INFO, MAILETCONTAINER
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/mailetcontainer.conf Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,700 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<!--
+ This template file can be used as example for James Server configuration
+ DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+-->
+
+<!-- See
http://james.apache.org/server/3/config.html for usage -->
+
+<!-- This block is responsible for processing messages on the spool. -->
+
+<mailetcontainer enableJmx="true">
+
+ <!-- MailAddress used for PostMaster -->
+ <context>
+ <postmaster>postmaster@localhost</postmaster>
+ </context>
+
+ <!-- Number of spool threads -->
+ <spooler>
+ <threads>20</threads>
+ </spooler>
+
+ <processors>
+
+ <!-- The root processor is a required processor - James routes all
mail on the spool -->
+ <!-- through this processor first. -->
+ <!-- -->
+ <!-- This configuration is a sample configuration for the root
processor. -->
+ <processor state="root" enableJmx="true">
+
+ <!-- This mailet redirects mail for the user 'postmaster' at any
local domain to -->
+ <!-- the postmaster address specified for the server. The
postmaster address -->
+ <!-- is required by rfc822. Do not remove this mailet unless you
are meeting -->
+ <!-- this requirement through other means (e.g. a
XML/JDBCRecipientRewriteTable defined in recipientrewritetable-store.xml)
-->
+ <mailet match="All" class="PostmasterAlias"/>
+
+ <!-- Checks that the email Sender is associated with a valid
domain. -->
+ <!-- Useful for detecting and eliminating spam. -->
+ <!-- For this block to function, the spam processor must be
configured. -->
+ <!--
+ <mailet
match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6"
class="ToProcessor">
+ <processor>spam</processor>
+ </mailet>
+ -->
+
+ <!-- Important check to avoid looping -->
+ <mailet match="RelayLimit=30" class="Null"/>
+
+ <!-- Check for viruses -->
+ <!-- -->
+ <!-- Does an antivirus scan check using a ClamAV daemon (CLAMD). -->
+ <!-- -->
+ <!-- Interacts directly with the daemon using the "stream" method,
-->
+ <!-- which should have the lowest possible overhead. -->
+ <!-- The CLAMD daemon will typically reside on localhost, but could
reside on a -->
+ <!-- different host. -->
+ <!-- It may also consist on a set of multiple daemons, each
residing on a different -->
+ <!-- server and on different IP number. -->
+ <!-- In such case a DNS host name with multiple IP addresses
(round-robin load sharing) -->
+ <!-- is supported by the mailet (but on the same port number). -->
+ <!-- -->
+ <!-- Handles the following init parameters: -->
+ <!--<debug>-->
+ <!--<host>: the host name of the server where CLAMD runs. It can
either be -->
+ <!-- a machine name, such as -->
+ <!-- "
java.sun.com", or a textual representation of its -->
+ <!-- IP address. If a literal IP address is supplied, only the
-->
+ <!-- validity of the address format is checked. -->
+ <!-- If the machine name resolves to multiple IP addresses,
round-robin load sharing will -->
+ <!-- be used. -->
+ <!-- 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. -->
+ <!-- The default is "6". -->
+ <!--<pingIntervalMilli>: 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 stream connection. The default is "8192".
-->
+ <!--
+ <mailet match="All" class="ClamAVScan" onMailetException="ignore">
+ <debug>true</debug>
+ </mailet>
+ -->
+
+ <!-- If infected go to virus processor -->
+ <mailet match="HasMailAttributeWithValue=org.apache.james.infected,
true" class="ToProcessor">
+ <processor>virus</processor>
+ </mailet>
+
+ <!-- Check attachment extensions for possible viruses -->
+ <!-- The "-z" option requests the check to be non-recursively
applied -->
+ <!-- to the contents of any attached '*.zip' file. -->
+ <!--
+ <mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.cmd
*.pif *.scr *.vbs *.avi *.mp3 *.mpeg *.shs" class="Bounce"
onMatchException="error">
+ <inline>heads</inline>
+ <attachment>none</attachment>
+ <passThrough>false</passThrough>
+ <prefix>[REJECTED]</prefix>
+ <notice>
+The Security Policy of XXX does not allow to forward messages containing
attachments having any of the
extensions .exe, .com, .bat, .cmd, .pif, .scr, .vbs, .avi, .mp3, .mpeg, .shs,
therefore your message has been rejected.
+
+Please don't reply to this e-mail as it has been automatically sent by the
antivirus system.
+
+Regards, Postmaster XXX.YYY
+.....................................
+ </notice>
+ </mailet>
+ -->
+
+ <!-- Whitelist Management -->
+ <!-- Manages for each local user a "white list" of remote addresses
whose messages -->
+ <!-- should never be blocked as spam. -->
+ <!-- -->
+ <!-- If<automaticInsert>is true, it will 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 (<displayFlag>); -->
+ <!-- (ii) insert some new addresses in his own list (<insertFlag>);
-->
+ <!-- (iii) remove some addresses from his own list (<removeFlag>).
-->
+ <!-- In all of the three above 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). -->
+ <!--
+ <mailet match="SMTPAuthSuccessful" class="WhiteListManager"
onMailetException="ignore">
+ <repositoryPath>db://maildb</repositoryPath>
+ <automaticInsert>true</automaticInsert>
+
<whitelistManagerAddress>whitelis...@xxx.yyy</whitelistManagerAddress>
+ <displayFlag>display</displayFlag>
+ <insertFlag>insert</insertFlag>
+ <removeFlag>remove</removeFlag>
+ </mailet>
+ -->
+
+ <!-- "not spam" bayesian analysis feeder. -->
+ <!--
+ <mailet match="RecipientIs=not....@xxx.yyy"
class="BayesianAnalysisFeeder">
+ <repositoryPath>db://maildb</repositoryPath>
+ <feedType>ham</feedType>
+ <maxSize>200000</maxSize>
+ </mailet>
+ -->
+
+ <!-- "spam" bayesian analysis feeder. -->
+ <!--
+ <mailet match="RecipientIs=sp...@xxx.yyy"
class="BayesianAnalysisFeeder">
+ <repositoryPath>db://maildb</repositoryPath>
+ <feedType>spam</feedType>
+ <maxSize>200000</maxSize>
+ </mailet>
+ -->
+
+ <!-- sample SMIME mailets configuration -->
+ <!--
+ <mailet match="IsSMIMEEncrypted" class="SMIMEDecrypt">
+ <keyStoreType>pkcs12</keyStoreType>
+ <keyStoreFileName>c:/path.pfx</keyStoreFileName>
+ <keyStorePassword>myKeyStorePass</keyStorePassword>
+ <keyAlias>myKeyAlias</keyAlias>
+ <keyAliasPassword>myKeyPass</keyAliasPassword>
+ </mailet>
+
+ <mailet match="IsSMIMESigned" class="SMIMECheckSignature">
+ <keyStoreType>pkcs12</keyStoreType>
+ <keyStoreFileName>c:/path.pfx</keyStoreFileName>
+ <keyStorePassword>myKeyStorePass</keyStorePassword>
+ <strip>false</strip>
+ <onlyTrusted>true</onlyTrusted>
+ </mailet>
+ -->
+
+ <!--
+
+ XMLRecipientRewriteTable is deprecated - Use the definitions in
recipientrewritetable-store.xml
+
+ <mailet match="All" class="XMLRecipientRewriteTable">
+ <!- 1:1 mapping ->
+ <mapping>morgoth@middle-earth=sauron@mordor</mapping>
+ <!- 1:n mapping ->
+
<mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
+ <!- DSN mapping ->
+ <mapping>boromir@osgilliath=error:550 Requested action not
taken: no such user here</mapping>
+ <!- regex based mapping ->
+
<mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
+ <!- both standard and regex mapping ->
+
<mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
+ <!- conditional regex mapping example ->
+
<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;
+
regex:(.*)-off@listserver:${1}-unsubscribe@listserver
+ </mapping>
+ </mailet>
+
+ -->
+
+ <!-- Anti-spam processing -->
+ <!-- The following two entries avoid double anti-spam analysis -->
+ <!-- for forwarded messages. -->
+ <!-- Has spam checking already been done? -->
+ <mailet match="HasMailAttribute=spamChecked" class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+ <!-- Spam checking will not be done twice -->
+ <mailet match="All" class="SetMailAttribute">
+ <spamChecked>true</spamChecked>
+ </mailet>
+
+ <!-- White List:
+ If you use block lists, you will probably want to check
+ for known permitted senders. This is particularly true
+ if you use more aggressive block lists, such as SPEWS,
+ that are prone to block entire subnets without regard
+ for non-spamming senders.
+ -->
+
+ <!-- Messages from authenticated senders never are spam -->
+ <mailet match="SMTPAuthSuccessful" class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+
+ <!-- Messages signed by trusted users never are spam -->
+ <!-- Uncommenting the following entry, messages with valid
signatures will never be considered spam. -->
+ <!-- This can be a valid policy *if* SMIMECheckSignature was
invoked -->
+ <!-- with<onlyTrusted>true</onlyTrusted>set -->
+ <!--
+ <mailet
match="HasMailAttribute=org.apache.james.SMIMECheckSignature"
class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+ -->
+
+ <!-- specific known senders -->
+ <!--
+ <mailet match="SenderIs=goodboy@goodhost"
+ class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+ -->
+
+ <!-- People on this list agree to pay a penalty if they send spam
-->
+ <mailet match="InSpammerBlacklist=
query.bondedsender.org."
+ class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+
+ <!-- E-mail legally required not to be spam (see:
http://www.habeas.com) -->
+ <!--
+ <mailet match="HasHabeasWarrantMark" class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+ -->
+
+ <!-- If the sender is in a recipient's whitelist, it is a valid
sender, -->
+ <!-- and as such the message should not be considered spam for such
recipient. -->
+ <!--
+ <mailet match="IsInWhiteList=db://maildb" class="ToProcessor"
onMatchException="noMatch">
+ <processor>transport</processor>
+ </mailet>
+ -->
+
+ <!-- End of White List -->
+
+ <!-- Check for delivery from a known spam server -->
+ <!-- This set of matchers/mailets redirect all emails from known -->
+ <!-- black holes, open relays, and spam servers to the spam
processor -->
+ <!-- For this set to function properly, the spam processor must be
configured. -->
+ <mailet match="InSpammerBlacklist=
dnsbl.njabl.org."
+ class="ToProcessor">
+ <processor>spam</processor>
+ <notice>550 Requested action not taken: rejected - see
http://njabl.org/</notice>
+ </mailet>
+
+ <!-- Sample matching to kill a message (send to Null) -->
+ <!--
+ <mailet match="RecipientIs=badboy@badhost" class="Null"/>
+ -->
+
+ <!-- Anti spam bayesian analysis -->
+ <!--
+ <mailet match="All" class="BayesianAnalysis"
onMailetException="ignore">
+ <repositoryPath>db://maildb</repositoryPath>
+ <maxSize>200000</maxSize>
+ <headerName>X-MessageIsSpamProbability</headerName>
+ <ignoreLocalSender>true</ignoreLocalSender>
+ </mailet>
+
+ <mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability
>0.90" class="SetMailAttribute" onMatchException="noMatch">
+ <isSpam>true</isSpam>
+ </mailet>
+
+ <mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability
>0.90" class="SetMimeHeader" onMatchException="noMatch">
+ <name>X-MessageIsSpam</name>
+ <value>true</value>
+ </mailet>
+
+ <mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability
>0.99" class="ToProcessor" onMatchException="noMatch">
+ <processor>spam</processor>
+ <notice>Spam not accepted</notice>
+ </mailet>
+ -->
+
+ <!-- Send remaining mails to the transport processor for either
local or remote delivery -->
+ <mailet match="All" class="ToProcessor">
+ <processor>transport</processor>
+ </mailet>
+ </processor>
+
+ <!-- The error processor is required. James may internally set emails
to the -->
+ <!-- error state. The error processor is generally invoked when there
is an -->
+ <!-- unexpected error either in the mailet chain or internal to James.
-->
+ <!-- -->
+ <!-- By default configuration all email that generates an error in
placed in -->
+ <!-- an error repository. -->
+ <processor state="error" enableJmx="true">
+ <!-- If you want to notify the sender their message generated an
error, uncomment this -->
+ <!--
+ <mailet match="All" class="Bounce"/>
+ -->
+ <!-- If you want to notify the postmaster that a message generated
an error, uncomment this -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <!-- Logs any messages to the repository specified -->
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>file://var/mail/error/</repositoryPath>
+ <!-- An alternative database repository example follows. -->
+ <!--
+ <repositoryPath>db://maildb/deadletter/error</repositoryPath>
+ -->
+ </mailet>
+ </processor>
+
+ <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom
processor for local or -->
+ <!-- remote delivery -->
+ <processor state="transport" enableJmx="true">
+
+ <!-- This is an example configuration including configuration for a
list server. -->
+ <!-- CHECKME: before uncommenting this, edit the configuration
file's contents -->
+ <!--
+ &listserverConfig;
+ -->
+
+ <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
+ <name>X-UserIsAuth</name>
+ <value>true</value>
+ </mailet>
+
+ <mailet
match="HasMailAttribute=org.apache.james.SMIMECheckSignature"
class="SetMimeHeader">
+ <name>X-WasSigned</name>
+ <value>true</value>
+ </mailet>
+
+ <!-- Add a server-side signature -->
+ <!--
+ <mailet match="All" class="SMIMESign" onMailetException="ignore">
+ <keyStoreType>jks</keyStoreType>
+ <keyStoreFileName>path.keystore</keyStoreFileName>
+ <keyStorePassword>myKeyStorePass</keyStorePassword>
+ <keyAlias>myKeyAlias</keyAlias>
+ <keyAliasPassword>myKeyPass</keyAliasPassword>
+ <signerName>XXX Trusted Server</signerName>
+ <rebuildFrom>true</rebuildFrom>
+ <postmasterSigns>true</postmasterSigns>
+ <debug>true</debug>
+ </mailet>
+ -->
+
+ <!-- Experimental quota Matcher -->
+ <!-- This matcher need to calculate the mailbox size everytime it
is called. This can slow down things if there are many mails in -->
+ <!-- the mailbox. Some users also report big problems with the
matcher if a JDBC based mailrepository is used. -->
+ <!-- Check if over quota -->
+ <!--
+ <mailet match="RecipientIsOverFixedQuota=20M" class="Resend">
+ <sender>postmaster</sender>
+ <replyTo>postmaster</replyTo>
+ <reversePath>null</reversePath>
+ <inline>none</inline>
+ <attachment>message</attachment>
+ <prefix>[OVER QUOTA WARNING]</prefix>
+ <message>
+When receiving the attached message, your mailbox is larger than 20 MB,
which is the maximum allowed quota. The mailbox will not be blocked, but we
ask you to empty it ASAP.
+
+It is likely that you have set, in your mail client account, the
option "leave a copy of messages on server". For any help ask your
administrators.
+
+Regards, Postmaster XXX.YYY
+.....................................
+ </message>
+ </mailet>
+ -->
+
+
+ <mailet
match="org.nhind.james.matcher.RecipientIsXdAndNotSMIME=
http://localhost:8081/config-service/ConfigurationService"
class="org.nhind.james.mailet.DirectXdMailet">
+
<ConfigURL>
http://localhost:8081/config-service/ConfigurationService</ConfigURL>
+
<EndpointURL>
http://localhost:8081/xd/services/DocumentRepository_Service</EndpointURL>
+ </mailet>
+
+ <mailet
match="org.nhindirect.gateway.smtp.james.matcher.RecipAndSenderIsNotLocal=
mydomain.com"
class="org.nhindirect.gateway.smtp.james.mailet.NHINDSecurityAndTrustMailet">
+ <ConfigURL>
http://localhost:8081/config-service/api</ConfigURL>
+
<MessageMonitoringServiceURL>
http://localhost:8081/msg-monitor</MessageMonitoringServiceURL>
+
<AutoDSNFailueCreation>General,ReliableAndTimely</AutoDSNFailueCreation>
+
<SmptAgentConfigProvider>org.nhindirect.gateway.smtp.provider.RESTSmtpAgentConfigProvider</SmptAgentConfigProvider>
+
<ServiceSecurityManagerProvider>org.nhindirect.gateway.smtp.provider.ConfigBasicAuthServiceSecurityManagerProvider</ServiceSecurityManagerProvider>
+ <ServiceSecurityAuthSubject>direct</ServiceSecurityAuthSubject>
+ <ServiceSecurityAuthSecret>#H|tBro$</ServiceSecurityAuthSecret>
+
<SmptAgentAuditorProvider>org.nhindirect.common.audit.provider.RDBMSAuditorProvider</SmptAgentAuditorProvider>
+ </mailet>
+
+ <!-- This mailet tracks all incoming notification messages. All
messages at this point should not encrypted, so they
+ should be incoming in direction. In addtion this mailet
determines if a notification should be suppressed from being
+ delivered to the edge client. Generally this applies to
duplicate notification checking of messages that were sent with
+ the timely and reliable disposition option, but implementations
can vary by HISP. The default configuration defers to
+ the message monitoring service to dictate if messages should be
supresses. -->
+ <mailet
match="org.nhindirect.gateway.smtp.james.matcher.IsNotification"
class="org.nhindirect.gateway.smtp.james.mailet.SuppressAndTrackAggregate">
+
<MessageMonitoringServiceURL>
http://localhost:8081/msg-monitor</MessageMonitoringServiceURL>
+ <ConsumeMDNProcessed>true</ConsumeMDNProcessed>
+ </mailet>
+
+ <mailet
match="org.nhind.james.matcher.RecipientIsXdAndNotSMIME=
http://localhost:8081/config-service/ConfigurationService"
class="org.nhind.james.mailet.DirectXdMailet">
+
<ConfigURL>
http://localhost:8081/config-service/ConfigurationService</ConfigURL>
+
<EndpointURL>
http://localhost:8081/xd/services/DocumentRepository_Service</EndpointURL>
+ </mailet>
+
+ <!-- Is the recipient is for a local account, deliver it locally
-->
+ <mailet match="RecipientIsLocal"
class="org.nhindirect.gateway.smtp.james.mailet.TimelyAndReliableLocalDelivery"/>
+
+ <!-- If the host is handled by this server and it did not get -->
+ <!-- locally delivered, this is an invalid recipient -->
+ <mailet match="HostIsLocal" class="ToProcessor">
+ <processor>local-address-error</processor>
+ <notice>550 - Requested action not taken: no such user
here</notice>
+ </mailet>
+
+<!-- CHECKME! -->
+ <!-- This is an anti-relay matcher/mailet combination -->
+ <!-- -->
+ <!-- Emails sent from servers not in the network list are -->
+ <!-- rejected as spam. This is one method of preventing your -->
+ <!-- server from being used as an open relay. Make sure you
understand -->
+ <!-- how to prevent your server from becoming an open relay before
-->
+ <!-- changing this configuration. See also<authorizedAddresses>in
SMTP Server -->
+ <!-- -->
+ <!-- This matcher/mailet combination must come after local delivery
has -->
+ <!-- been performed. Otherwise local users will not be able to
receive -->
+ <!-- email from senders not in this remote address list. -->
+ <!-- -->
+ <!-- If you are using this matcher/mailet you will probably want to
-->
+ <!-- update the configuration to include your own
network/addresses. The -->
+ <!-- matcher can be configured with a comma separated list of IP
addresses -->
+ <!-- wildcarded IP subnets, and wildcarded hostname subnets. -->
+ <!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*"
-->
+ <!-- -->
+ <!-- If you are using SMTP authentication then you can (and
generally -->
+ <!-- should) disable this matcher/mailet pair. -->
+ <!--
+ <mailet match="RemoteAddrNotInNetwork=127.0.0.1"
class="ToProcessor">
+ <processor>relay-denied</processor>
+ <notice>550 - Requested action not taken: relaying
denied</notice>
+ </mailet>
+ -->
+ <!-- Attempt remote delivery using the specified repository for the
spool, -->
+ <!-- using delay time to retry delivery and the maximum number of
retries -->
+ <mailet match="All" class="RemoteDelivery">
+ <outgoingQueue>outgoing</outgoingQueue>
+
+ <!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
+ <!-- 5 day retry period, with 4 attempts in the first
+ hour, two more within the first 6 hours, and then
+ every 6 hours for the rest of the period. -->
+ <delayTime>5 minutes</delayTime>
+ <delayTime>10 minutes</delayTime>
+ <delayTime>45 minutes</delayTime>
+ <delayTime>2 hours</delayTime>
+ <delayTime>3 hours</delayTime>
+ <delayTime>6 hours</delayTime>
+ <maxRetries>25</maxRetries>
+
+ <!-- The max reties which will used if no A or MX record for the
domain was found. -->
+ <!-- If 0 it will fail on first time -->
+ <maxDnsProblemRetries>0</maxDnsProblemRetries>
+
+ <!-- The number of threads that should be trying to deliver
outgoing messages -->
+ <deliveryThreads>10</deliveryThreads>
+
+ <!-- If false the message will not be sent to given server if
any recipients fail -->
+ <sendpartial>true</sendpartial>
+
+ <!-- By default we send bounces to the "bounce" processor -->
+ <!-- By removing this configuration James will fallback to
hardcoded bounce -->
+ <!-- notifications -->
+ <bounceProcessor>bounces</bounceProcessor>
+
+ <!-- A single mail server to deliver all outgoing messages. -->
+ <!-- This is useful if this server is a backup or failover
machine, -->
+ <!-- or if you want all messages to be routed through a
particular mail server, -->
+ <!-- regardless of the email addresses specified in the message
-->
+ <!-- -->
+ <!-- The gateway element specifies the gateway SMTP server name.
-->
+ <!-- If your gateway mail server is listening on a port other
than 25, -->
+ <!-- you can set James to connect to it on that port using the
gatewayPort -->
+ <!-- element. -->
+ <!-- Although normally multiple addresses are implemented
through proper -->
+ <!-- DNS configuration, the RemoteDelivery mail does allow
specifying -->
+ <!-- multiple gateway elements, each of which may also have a
port -->
+ <!-- e.g., mygateway:2525 -->
+ <!-- the gatewayPort element is used as a default -->
+ <!--
+ <gateway>
otherserver.mydomain.com </gateway>
+ <gatewayPort>25</gatewayPort>
+ -->
+ <!-- If the gateway requires smtp authentication the following
directives -->
+ <!-- (gatewayUsername/gatewayPassword) can be used. -->
+ <!--
+ <gatewayUsername>login</gatewayUsername>
+ <gatewayPassword>pass</gatewayPassword>
+ -->
+
+ <!-- Set the HELO/EHLO name to use when connectiong to remote
SMTP-Server -->
+ <!--
+ <mail.smtp.localhost>myMailServer</mail.smtp.localhost>
+ -->
+ </mailet>
+
+ </processor>
+
+ <!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor
for handling -->
+ <!-- spam. -->
+ <!-- You can either log these, bounce these, or just ignore them. -->
+ <processor state="spam" enableJmx="true">
+
+ <!-- To place the spam messages in the user junk folder, uncomment
this matcher/mailet configuration -->
+ <!--
+ <mailet match="RecipientIsLocal" class="ToRecipientFolder">
+ <folder>Junk</folder>
+ <consume>false</consume>
+ </mailet>
+ -->
+
+ <!-- To destroy all messages, uncomment this matcher/mailet
configuration -->
+ <!--
+ <mailet match="All" class="Null"/>
+ -->
+
+ <!-- To notify the sender their message was marked as spam,
uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="Bounce"/>
+ -->
+
+ <!-- To notify the postmaster that a message was marked as spam,
uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <!-- To log the message to a repository, this matcher/mailet
configuration should be uncommented. -->
+ <!-- This is the default configuration. -->
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>file://var/mail/spam/</repositoryPath>
+
+ <!-- Changing the repositoryPath, as in this commented out
example, will -->
+ <!-- cause the mails to be stored in a database repository. -->
+ <!-- Please note that only one repositoryPath element can be
present for the mailet -->
+ <!-- configuration. -->
+ <!--
+ <repositoryPath>db://maildb/deadletter/spam</repositoryPath>
+ -->
+ </mailet>
+ </processor>
+
+ <!-- messages containing viruses. -->
+ <processor state="virus" enableJmx="true">
+
+ <!-- To avoid a loop while bouncing -->
+ <mailet match="All" class="SetMailAttribute">
+ <org.apache.james.infected>true,
bouncing</org.apache.james.infected>
+ </mailet>
+
+ <!-- If the sender is authenticated, notify the infection -->
+ <mailet match="SMTPAuthSuccessful" class="Bounce">
+ <inline>heads</inline>
+ <attachment>none</attachment>
+ <notice>Warning: We were unable to deliver the message below
because it was found infected by virus(es).</notice>
+ </mailet>
+
+ <!-- In any other situation ghost it, -->
+ <!-- as viruses almost always spoof the sender's address -->
+ <mailet match="All" class="Null" />
+ </processor>
+
+ <!-- This processor handles messages that are for local domains, where
the user is unknown -->
+ <processor state="local-address-error" enableJmx="true">
+ <!-- To avoid bouncing/archiving spam, uncomment this
matcher/mailet configuration -->
+ <!--
+ <mailet match="HasMailAttribute=isSpam" class="Null"
onMatchException="noMatch"/>
+ -->
+
+ <!-- Creates a bounce message using the direct project bounce
message generator -->
+ <mailet match="All"
class="org.nhindirect.gateway.smtp.james.mailet.DirectBounce"/>
+
+ <!-- To notify the sender the address was invalid, uncomment this
matcher/mailet configuration -->
+ <!-- The original message is not attached to keep the bounce
processor from deliverying spam -->
+ <!--
+ <mailet match="All" class="Bounce">
+ <attachment>none</attachment>
+ </mailet>
+ -->
+
+ <!-- To notify the postmaster that a message had an invalid
address, uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <!--
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>
file://var/mail/address-error/</repositoryPath>
+ <repositoryPath> db://maildb/deadletter/address-error
</repositoryPath>
+ </mailet>
+ -->
+ </processor>
+
+ <!-- This processor handles messages that are for foreign domains,
where relaying is denied -->
+ <!-- As of James v2.2, this processor can be deprecated by using
the<authorizedAddresses>tag
+ in the SMTP Server, and rejecting the message in the protocol
transaction. -->
+ <processor state="relay-denied" enableJmx="true">
+ <!-- To notify the sender the address was invalid, uncomment this
matcher/mailet configuration -->
+ <!-- The original message is not attached to keep the bounce
processor from deliverying spam -->
+ <!--
+ <mailet match="All" class="Bounce">
+ <attachment>none</attachment>
+ </mailet>
+ -->
+
+ <!-- To notify the postmaster that a relay request was denied,
uncomment this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
+
+ <mailet match="All" class="ToRepository">
+ <repositoryPath>file://var/mail/relay-denied/</repositoryPath>
+ <!-- An alternative database repository example follows. -->
+ <!--
+
<repositoryPath>db://maildb/deadletter/relay-denied</repositoryPath>
+ -->
+ </mailet>
+ </processor>
+
+ <!-- This processor handle the bounces from RemoteDelivery: As of
James v2.3, this is the new -->
+ <!-- Default. -->
+ <!-- -->
+ <!-- DSNBounce properly create a DSN compliant bounce -->
+ <processor state="bounces" enableJmx="true">
+ <mailet match="All" class="DSNBounce">
+ <passThrough>false</passThrough>
+
+ <!-- optional subject prefix prepended to the original message
-->
+ <!--
+ <prefix>[bounce]</prefix>
+ -->
+
+ <!-- message, heads or none, default=message -->
+ <!--
+ <attachment>heads</attachment>
+ -->
+
+ <!-- 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] ...
-->
+ <!--
+ <messageString>Here is [machine]. I'm not able to deliver this
message.</messageString>
+ -->
+ </mailet>
+ </processor>
+
+ </processors>
+
+</mailetcontainer>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/persistence_james.xml Thu Feb
12 19:40:52 2015 UTC
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<persistence xmlns="
http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+ version="2.0">
+
+ <persistence-unit name="James" transaction-type="RESOURCE_LOCAL">
+ <!-- Mailbox stuff-->
+ <class>org.apache.james.mailbox.jpa.mail.model.JPAMailbox</class>
+ <class>org.apache.james.mailbox.jpa.mail.model.JPAUserFlag</class>
+
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage</class>
+
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage</class>
+
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage</class>
+ <class>org.apache.james.mailbox.jpa.mail.model.JPAProperty</class>
+
<class>org.apache.james.mailbox.jpa.user.model.JPASubscription</class>
+ <class>org.apache.james.domainlist.jpa.model.JPADomain</class>
+ <class>org.apache.james.user.jpa.model.JPAUser</class>
+ <class>org.apache.james.rrt.jpa.model.JPARecipientRewrite</class>
+
+ <properties>
+ <property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)"/>
+ <property name="openjpa.jdbc.MappingDefaults"
value="ForeignKeyDeleteAction=cascade, JoinForeignKeyDeleteAction=cascade"/>
+ <property name="openjpa.jdbc.SchemaFactory"
value="native(ForeignKeys=true)"/>
+ <property name="openjpa.jdbc.QuerySQLCache" value="false"/>
+ </properties>
+
+ </persistence-unit>
+
+</persistence>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/pop3server.conf Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<!--
+ This template file can be used as example for James Server configuration
+ DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+-->
+
+<!-- See
http://james.apache.org/server/3/config.html for usage -->
+
+<pop3servers>
+
+ <!-- The POP3 server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <pop3server enabled="true">
+
+ <jmxName>pop3server</jmxName>
+
+ <!-- Configure this to bind to a specific inetaddress -->
+ <!-- port 995 is the well-known/IANA rsegistered port for POP3S ie
over SSL/TLS -->
+ <!-- port 110 is the well-known/IANA registered port for Standard POP3
-->
+ <bind>
0.0.0.0:110</bind>
+ <connectionBacklog>200</connectionBacklog>
+
+ <!-- Set to true to support STARTTLS or SSL for the Socket.
+ To use this you need to copy sunjce_provider.jar to
/path/james/lib directory.
+ -->
+ <tls socketTLS="false" startTLS="true">
+ <!-- To create a new keystore execute:
+ keytool -genkey -alias james -keyalg RSA -keystore
/path/to/james/conf/keystore
+ -->
+ <keystore>file://conf/cakeystore.jks</keystore>
+ <secret>1kingpuff</secret>
+
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+ </tls>
+
+ <!-- This is the name used by the server to identify itself in the
POP3 -->
+ <!-- protocol. If autodetect is TRUE, the server will discover its
-->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
+ <!-- will use the specified value. -->
+ <!--
+ <helloName autodetect="true">myMailServer</helloName>
+ -->
+ <!-- connection timeout in secconds -->
+ <connectiontimeout>1200</connectiontimeout>
+
+ <!-- Set the maximum simultaneous incoming connections for this
service -->
+ <connectionLimit>0</connectionLimit>
+
+ <!-- Set the maximum simultaneous incoming connections per IP for
this service -->
+ <connectionLimitPerIP>0</connectionLimitPerIP>
+
+ <handlerchain>
+ <!-- This loads the core CommandHandlers. Only remove this if
you really -->
+ <!-- know what you are doing -->
+ <handler
class="org.apache.james.pop3server.core.CoreCmdHandlerLoader"/>
+ </handlerchain>
+
+ </pop3server>
+
+</pop3servers>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/set-domain-domainlist.xsl Thu
Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ASCII" standalone="no"?>
+<xsl:stylesheet version="1.0" xmlns:ns0="urn:hl7-org:v3"
+ xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xd="
http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xsl ns0 xsi xd date"
+ xmlns:date="
http://exslt.org/dates-and-times"
extension-element-prefixes="date">
+
+ <xsl:output method="xml" encoding="ASCII" indent="yes"/>
+
+ <!-- Define input parameters -->
+ <xsl:param name="domain" select="'xxx'"/>
+
+ <!-- Edit the config.xml file for Apache James -->
+ <xsl:template match="/">
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:template>
+
+ <xsl:template match="node()|@*">
+ <xsl:choose>
+
+
+ <!-- Edit the domain name -->
+ <xsl:when
+ test="name()='domainname'">
+ <xsl:element name="domainname">
+ <xsl:value-of select="$domain"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Edit the default domain name -->
+ <xsl:when
+ test="name()='defaultDomain'">
+ <xsl:element name="defaultDomain">
+ <xsl:value-of select="$domain"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Otherwise just copy things -->
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/set-domain-mailetcontainer.xsl
Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ASCII" standalone="no"?>
+<xsl:stylesheet version="1.0" xmlns:ns0="urn:hl7-org:v3"
+ xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xd="
http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xsl ns0 xsi xd date"
+ xmlns:date="
http://exslt.org/dates-and-times"
extension-element-prefixes="date">
+
+ <xsl:output method="xml" encoding="ASCII" indent="yes"/>
+
+ <!-- Define input parameters -->
+ <xsl:param name="domain" select="'xxx'"/>
+
+ <!-- Edit the config.xml file for Apache James -->
+ <xsl:template match="/">
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:template>
+
+ <xsl:template match="node()|@*">
+ <xsl:choose>
+
+ <!-- Edit the postmaster -->
+ <xsl:when
+ test="name()='postmaster'">
+ <xsl:element name="postmaster">
+ <xsl:text>postmaster@</xsl:text>
+ <xsl:value-of select="$domain"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Edit the RecipAndSenderIsNotLocal=
mydomain.com attribute
of the mailet configuration -->
+ <xsl:when test="name()='mailet' and
starts-with(./@match,'org.nhindirect.gateway.smtp.james.matcher.RecipAndSenderIsNotLocal=')">
+ <xsl:element name="mailet">
+ <xsl:attribute name="match">
+
<xsl:text>org.nhindirect.gateway.smtp.james.matcher.RecipAndSenderIsNotLocal=</xsl:text>
+ <xsl:value-of select="$domain"/>
+ </xsl:attribute>
+ <xsl:attribute
name="class">org.nhindirect.gateway.smtp.james.mailet.NHINDSecurityAndTrustMailet</xsl:attribute>
+ <xsl:for-each select="ConfigURL">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="MessageMonitoringServiceURL">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="AutoDSNFailueCreation">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ConsumeMDNProcessed">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentConfigProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityManagerProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSubject">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSecret">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentAuditorProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Otherwise just copy things -->
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/set-domain.xml Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,50 @@
+<project name="set-domain" default="default" basedir=".">
+ <description>
+ Set the domain for Direct
+ </description>
+
+ <!-- set global properties for this build -->
+ <property environment="env" />
+ <property name="direct.home.dir" value="${env.DIRECT_HOME}" />
+ <property name="james.dir"
value="${direct.home.dir}/apache-james-3.0-beta4" />
+ <property name="james.bin.dir" value="${james.dir}/bin" />
+ <property name="set.domain-domainlist.stylesheet"
value="${james.bin.dir}/set-domain-domainlist.xsl" />
+ <property name="james.domainlist"
value="${james.dir}/conf/domainlist.conf" />
+ <property name="james.domainlist-new"
value="${james.dir}/conf/domainlist-new.conf" />
+ <property name="set.domain-mailetcontainer.stylesheet"
value="${james.bin.dir}/set-domain-mailetcontainer.xsl" />
+ <property name="james.mailetcontainer"
value="${james.dir}/conf/mailetcontainer.conf" />
+ <property name="james.mailetcontainer-new"
value="${james.dir}/conf/mailetcontainer-new.conf" />
+
+ <!-- Fail if we can't find DIRECT_HOME -->
+ <target name="fail-if-direct-home-missing" unless="env.DIRECT_HOME">
+ <fail message="DIRECT_HOME is not defined in the environment"></fail>
+ </target>
+
+ <!-- Fail if we can't find DIRECT_DOMAIN -->
+ <target name="fail-if-direct-domain-missing" unless="env.DIRECT_DOMAIN">
+ <fail message="DIRECT_DOMAIN is not defined in the environment"></fail>
+ </target>
+
+ <!-- Initialization -->
+ <target name="init"
depends="fail-if-direct-home-missing,fail-if-direct-domain-missing">
+ <tstamp></tstamp>
+ </target>
+
+ <!-- Set the domain -->
+ <target name="default" depends="init">
+ <!-- Edit the domain list file -->
+ <xslt style="${set.domain-domainlist.stylesheet}"
in="${james.domainlist}" out="${james.domainlist-new}">
+ <param name="domain" expression="${env.DIRECT_DOMAIN}"></param>
+ </xslt>
+ <copy file="${james.domainlist-new}" tofile="${james.domainlist}"
overwrite="true"></copy>
+ <delete file="${james.domainlist-new}" failonerror="false"></delete>
+
+ <!-- Edit the mailet container file -->
+ <xslt style="${set.domain-mailetcontainer.stylesheet}"
in="${james.mailetcontainer}" out="${james.mailetcontainer-new}">
+ <param name="domain" expression="${env.DIRECT_DOMAIN}"></param>
+ </xslt>
+ <copy file="${james.mailetcontainer-new}"
tofile="${james.mailetcontainer}" overwrite="true"></copy>
+ <delete file="${james.mailetcontainer-new}" failonerror="false"></delete>
+ </target>
+
+</project>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/setdomain.bat Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,4 @@
+set DIRECT_DOMAIN=%1
+ant -q -f %DIRECT_HOME%/apache-james-3.0-beta4/bin/set-domain.xml
+echo "Domain set to %1"
+echo "Postmaster set to postmaster@%1"
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/setdomain.sh Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,5 @@
+#!/bin/sh -x
+export DIRECT_DOMAIN=$1
+ant -q -f $DIRECT_HOME/apache-james-3.0-beta4/bin/set-domain.xml
+echo "Domain set to $1"
+echo "Postmaster set to postmaster@$1"
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/smtpserver.conf Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,323 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+<!--
+ This template file can be used as example for James Server configuration
+ DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+-->
+
+<!-- See
http://james.apache.org/server/3/config.html for usage -->
+
+<smtpservers>
+
+ <!-- The SMTP server is enabled by default -->
+ <!-- Disabling blocks will stop them from listening, -->
+ <!-- but does not free as many resources as removing them would -->
+ <smtpserver enabled="true">
+
+ <jmxName>smtpserver</jmxName>
+
+ <!-- Configure this to bind to a specific inetaddress -->
+ <!-- Please NOTE: you should add this IP also to your
RemoteAddrNotInNetwork -->
+ <!-- in order to avoid relay check for locallly generated bounces -->
+ <!--
+ Port 25 is the well-known/IANA registered port for SMTP.
+ Port 465 is the well-known/IANA registered port for SMTP over
TLS.
+ -->
+ <bind>
0.0.0.0:25</bind>
+
+ <connectionBacklog>200</connectionBacklog>
+
+ <!-- Set to true to support STARTTLS or TLS for the Socket.
+ To use this you need to copy sunjce_provider.jar to
/path/james/lib directory.
+ -->
+ <tls socketTLS="false" startTLS="true">
+ <!-- To create a new keystore execute:
+ keytool -genkey -alias james -keyalg RSA -keystore
/path/to/james/conf/keystore
+ -->
+ <keystore>file://conf/cakeystore.jks</keystore>
+ <secret>1kingpuff</secret>
+
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+ <!-- The algorithm is optional and only needs to be specified when
using something other
+ than the Sun JCE provider - You could use IbmX509 with IBM Java
runtime. -->
+ <algorithm>SunX509</algorithm>
+ </tls>
+
+ <!-- This is the name used by the server to identify itself in the
SMTP -->
+ <!-- protocol. If autodetect is TRUE, the server will discover
its -->
+ <!-- own host name and use that in the protocol. If discovery
fails, -->
+ <!-- the value of 'localhost' is used. If autodetect is FALSE,
James -->
+ <!-- will use the specified value. -->
+ <!--
+ <helloName autodetect="true">myMailServer</helloName>
+ -->
+
+ <!-- connection timeout in secconds -->
+ <connectiontimeout>360</connectiontimeout>
+
+ <!-- Set the maximum simultaneous incoming connections for this
service -->
+ <connectionLimit>0</connectionLimit>
+
+ <!-- Set the maximum simultaneous incoming connections per IP for
this service -->
+ <connectionLimitPerIP>0</connectionLimitPerIP>
+
+ <!-- Uncomment this if you want to require SMTP authentication.
+
+ supported values:
+ true: required but announced only to not authorizedAddresses
+ false: don't use AUTH
+ announce: like true, but always announce AUTH capability to
clients
+
+ The correct behaviour per RFC value would be false or
announce
+ but we still support true for backward compatibility and
because
+ some webmail client fails when AUTH is announced but no
authentication
+ information has been provided
+ -->
+
+ <authRequired>announce</authRequired>
+
+
+<!-- CHECKME! -->
+ <!-- Uncomment this if you want to authorize specific
addresses/networks.
+ If you use SMTP AUTH, addresses that match those specified
here will
+ be permitted to relay without SMTP AUTH. If you do not use
SMTP
+ AUTH, and you specify addreses here, then only addresses
that match
+ those specified will be permitted to relay.
+
+ Addresses may be specified as a an IP address or domain
name, with an
+ optional netmask, e.g.,
+
+ 127.*,
127.0.0.0/8,
127.0.0.0/255.0.0.0, and localhost/8
are all the same
+
+ See also the RemoteAddrNotInNetwork matcher in the
transport processor.
+ You would generally use one OR the other approach.
+ -->
+ <authorizedAddresses>
127.0.0.0/8</authorizedAddresses>
+
+ <!-- Uncomment this if you want to verify sender addresses,
ensuring that -->
+ <!-- the sender address matches the user who has authenticated.
-->
+ <!-- This prevents a user of your mail server from acting as
someone else -->
+ <!-- If unspecified, default value is true -->
+ <!--
+ <verifyIdentity>true</verifyIdentity>
+ -->
+
+ <!-- This sets the maximum allowed message size (in kilobytes)
for this -->
+ <!-- SMTP service. If unspecified, the value defaults to 0, which
means no limit. -->
+ <maxmessagesize>0</maxmessagesize>
+
+ <!-- This sets wether to enforce the use of HELO/EHLO salutation
before a -->
+ <!-- MAIL command is accepted. If unspecified, the value defaults
to true -->
+ <!--
+ <heloEhloEnforcement>true</heloEhloEnforcement>
+ -->
+
+ <!-- WARNING: This is Non-RFC compliant (default value: true) -->
+ <!-- See:
http://wiki.apache.org/james/StandardsComplianceStatement -->
+ <!-- TODO: CHANGE TO OFFICIAL URL LATER -->
+ <addressBracketsEnforcement>true</addressBracketsEnforcement>
+
+ <!-- This sets the SMTPGreeting which will be used when connect to
the smtpserver -->
+ <!-- If none is specified a default is generated -->
+ <!--
+ <smtpGreeting>JAMES SMTP Server</smtpGreeting>
+ -->
+
+ <!-- The configuration handler chain -->
+ <handlerchain>
+
+ <!-- This connect handler can be used to enable POP3 before
SMTP support -->
+ <!-- Plz note that only the ip get stored to indentify an
authenticated client -->
+ <!-- The expireTime is the time after which an ipAddress is
handled as expired -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.POP3BeforeSMTPHandler">
+ <expireTime>1 hour</expireTime>
+ </handler>
+ -->
+
+ <!-- This command handler check against RBL-Lists -->
+ <!-- If getDetail is set to true it try to retrieve
information from TXT Record -->
+ <!-- why the ip was blocked. Default to false -->
+ <!-- STOP - before you uncomment out the DNS RBL handler,
+ please take a moment to review each block list. We
+ have included some that various JAMES committers use,
+ but you must decide which, if any, are appropriate
+ for your environment. The mail servers hosting
+ @
apache.org mailing lists, for example, use a
+ slightly different list than we have included below.
+ And it is likely that most JAMES committes also have
+ slightly different sets of lists. The SpamAssassin
+ user's list would be one good place to discuss the
+ measured quality of various block lists.
+
+ NOTA BENE: the domain names, below, are terminated
+ with '.' to ensure that they are absolute names in
+ DNS lookups. Under some circumstances, names that
+ are not explicitly absolute could be treated as
+ relative names, leading to incorrect results. This
+ has been observed on *nix and MS-Windows platforms
+ by users of multiple mail servers, and is not JAMES
+ specific. If you are unsure what this means for you,
+ please speak with your local system/network admins.
+ -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.DNSRBLHandler">
+ <getDetail>false</getDetail>
+ <rblservers>
+ <whitelist>
query.bondedsender.org.</whitelist>
+ <blacklist>
sbl-xbl.spamhaus.org.</blacklist>
+ <blacklist>
dul.dnsbl.sorbs.net.</blacklist>
+ <blacklist>
list.dsbl.org.</blacklist>
+ </rblservers>
+ </handler>
+ -->
+
+ <!-- This command handler can be used to reject emails with
not match the SPF record of the sender domain -->
+ <!-- If checkAuthNetworks is set to true sender domain will be
checked also for clients that -->
+ <!-- are allowed to relay. Default is false. -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.SPFHandler">
+ <blockSoftFail>false</blockSoftFail>
+ <blockPermError>true</blockPermError>
+ </handler>
+ -->
+
+ <!-- checks for resolvable HELO/EHLO before accept the
HELO/EHLO -->
+ <!-- If checkAuthNetworks is set to true sender domain will be
checked also for clients that -->
+ <!-- are allowed to relay. Default is false. -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.ResolvableEhloHeloHandler"/>
+ -->
+
+ <!-- Checks HELO/EHLO is equal the reverse of the connecting
client before accept it -->
+ <!-- If checkAuthNetworks is set to true sender domain will be
checked also for clients that -->
+ <!-- are allowed to relay. Default is false. -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.ReverseEqualsEhloHeloHandler"/>
+ -->
+
+ <!-- If activated mail is only accepted if the sender contains
-->
+ <!-- a resolvable domain having a valid MX Record or A Record
associated! -->
+ <!-- If checkAuthNetworks is set to true sender domain will be
checked also for clients that -->
+ <!-- are allowed to relay. Default is false. -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.ValidSenderDomainHandler"/>
+ -->
+
+ <!-- With ValidRcptHandler, all email will get rejected which
has no valid user -->
+ <!-- You need to add the recipient to the validRecipient list
if you want -->
+ <!-- to accept email for a recipient which not exist on the
server -->
+ <!-- If you want James to act as a spamtrap or honeypot, you
may comment ValidRcptHandler -->
+ <!-- and implement the needed processors in spoolmanager.xml
-->
+ <handler
class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
+
+ <!-- If activated you can limit the maximal recipients -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.MaxRcptHandler">
+ <maxRcpt>10</maxRcpt>
+ </handler>
+ -->
+
+ <!-- If uncomment this block you can enable greylisting. For
more infos-->
+ <!-- how greylisting work see:
http://projects.puremagic.com/greylisting/whitepaper.html -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.JDBCGreylistHandler">
+ <repositoryPath>db://maildb</repositoryPath>
+ <sqlFile>file://conf/sqlResources.xml</sqlFile>
+ <tempBlockTime>1 hour</tempBlockTime>
+ <unseenLifeTime>4 hours</unseenLifeTime>
+ <autoWhiteListLifeTime>36 days</autoWhiteListLifeTime>
+ <whitelistedNetworks>
127.0.0.0/8</whitelistedNetworks>
+ </handler>
+ -->
+
+ <!-- Tarpitting is a method to insert a small sleep after each
rcpt. For more -->
+ <!-- infos read this:
http://www.palomine.net/qmail/tarpit.html . -->
+ <!-- Default is set to 0 (disabled). -->
+ <!-- You can also configure the time to sleep in milliseconds
-->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.TarpitHandler">
+ <tarpitRcptCount>5</tarpitRcptCount>
+ <tarpitSleepTime>5000</tarpitSleepTime>
+ </handler>
+ -->
+
+ <!-- This handler ignore duplicated recipients per session. So
the email will get only send on time even -->
+ <!-- if the recipient is specified more then once -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.protocol.core.fastfail.SuppressDuplicateRcptHandler"/>
+ -->
+
+ <!-- Load the core command handlers -->
+ <handler
class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
+
+ <!-- This handler can add a hint to the mail which tells the
MailQueue which email should get processed first -->
+ <!-- Normally the MailQueue will just handles Mails in FIFO
manner -->
+ <!-- Valid priority values are 1,5,9 where 9 is the highest-->
+ <!--
+ <handler
class="org.apache.james.smtpserver.MailPriortyHandler">
+ <priorityEntries>
+ <priorityEntry>
+ <domain>yourdomain1</domain>
+ <priority>1</priority>
+ </priorityEntry>
+ <priorityEntry>
+ <domain>yourdomain2</domain>
+ <priority>9</priority>
+ </priorityEntry>
+ <priorityEntries>
+ </handler>
+ -->
+
+ <!-- This MessageHandler could be used to check message
against spamd before -->
+ <!-- accept the email. So its possible to reject a message on
smtplevel if a -->
+ <!-- configured hits amount is reached. -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.SpamAssassinHandler">
+ <spamdHost>127.0.0.1</spamdHost>
+ <spamdPort>783</spamdPort>
+ <spamdRejectionHits>10</spamdRejectionHits>
+ </handler>
+ -->
+
+ <!-- This MessageHandler could be used to extract domain out
of the message and check -->
+ <!-- this domains against uriRbllists. See
http://www.surbl.org for more informations. -->
+ <!-- The message get rejected if a domain matched . -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.fastfail.URIRBLHandler">
+ <action>reject</action>
+ <getDetail>true</getDetail>
+ <uriRblServers>
+ <server>
multi.surbl.org</server>
+ </uriRblServers>
+ </handler>
+ -->
+ <!--
+ <handler
class="org.apache.james.smtpserver.SetMimeHeaderHandler">
+ <headername>SPF-test</headername>
+ <headervalue>passed</headervalue>
+ </handler>
+ -->
+ </handlerchain>
+
+ </smtpserver>
+
+</smtpservers>
+
+
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/spring-server.xml Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<beans xmlns="
http://www.springframework.org/schema/beans"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="
http://camel.apache.org/schema/spring"
+ xmlns:amq="
http://activemq.apache.org/schema/core"
+ xsi:schemaLocation="
+
http://www.springframework.org/schema/beans
classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
+
http://camel.apache.org/schema/spring classpath:camel-spring.xsd
+
http://activemq.apache.org/schema/core classpath:activemq.xsd">
+
+ <!--
+
===========================================================================
+ Spring Wiring for James Server: Annotation, Bean Post-Processors...
+
===========================================================================
+ -->
+
+ <!--
+ Enable Java Annotations processing.
+ -->
+ <bean
class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor">
+ <property name="order" value="3" />
+ </bean>
+
+ <!--
+ Enable support for Persistence Annotations processing.
+ -->
+ <bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
+
+ <!--
+ Spring "Bean-Post-Processor" for LogEnabled interface.
+ -->
+ <bean
class="org.apache.james.container.spring.lifecycle.LogEnabledBeanPostProcessor">
+ <property name="logProvider" ref="logprovider" />
+ <property name="order" value="0" />
+ </bean>
+ <bean id="logprovider"
class="org.apache.james.container.spring.lifecycle.LogProviderImpl">
+ </bean>
+
+ <!--
+ Configuration "Bean-Factory-Post-Processor"
+ responsible to register beans from James specific configuration
files
+ -->
+ <bean
class="org.apache.james.container.spring.bean.factorypostprocessor.ConfigurationBeanFactoryPostProcessor">
+ <property name="beans">
+ <map>
+ <!-- User Repository-->
+ <entry>
+ <key>
+ <value>usersrepository</value>
+ </key>
+ <!-- no alias needed -->
+ <value></value>
+ </entry>
+ <!-- Recipient Rewrite Table-->
+ <entry>
+ <key>
+ <value>recipientrewritetable</value>
+ </key>
+ <!-- no alias needed -->
+ <value></value>
+ </entry>
+ <!-- Domain List -->
+ <entry>
+ <key>
+ <value>domainlist</value>
+ </key>
+ <!-- no alias needed -->
+ <value></value>
+ </entry>
+ <entry>
+ <key>
+ <value>usersrepository23</value>
+ </key>
+<!-- no alias needed -->
+ <value></value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!--
+ Spring "Bean-Post-Processor" for Configurable interface.
+ -->
+ <bean
class="org.apache.james.container.spring.lifecycle.ConfigurableBeanPostProcessor">
+ <property name="configurationProvider" ref="configurationprovider"
/>
+ <property name="order" value="1" />
+ </bean>
+ <bean id="configurationprovider"
class="org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl">
+ <property name="configurationMappings">
+ <map>
+ <entry key="mailprocessor"
value="mailetcontainer.processors"/>
+ <entry key="mailspooler" value="mailetcontainer.spooler"/>
+ <entry key="mailetcontext"
value="mailetcontainer.context"/>
+ </map>
+ </property>
+ </bean>
+
+ <!--
+ Mail Repository Store "Bean-Factory"
+ -->
+ <bean id="mailrepositorystore"
class="org.apache.james.container.spring.bean.factory.mailrepositorystore.MailRepositoryStoreBeanFactory"
/>
+
+ <!--
+
===========================================================================
+ Queues
+
===========================================================================
+ -->
+
+ <!--
+ Mail Queue Factory
+ -->
+ <bean id="mailqueuefactory"
class="org.apache.james.queue.activemq.ActiveMQMailQueueFactory"
depends-on="broker"/>
+
+ <!--
+ ActiveMQ: Broker, Connections, BlobTransferPolicy...
+ -->
+ <amq:broker useJmx="true" persistent="true" brokerName="james"
dataDirectory="filesystem=file://var/store/activemq/brokers"
useShutdownHook="false" schedulerSupport="false" id="broker">
+ <amq:destinationPolicy>
+ <amq:policyMap>
+ <amq:policyEntries>
+ <!-- Support priority handling of messages -->
+ <!--
http://activemq.apache.org/how-can-i-support-priority-queues.html -->
+ <amq:policyEntry queue=">" prioritizedMessages="true"/>
+ </amq:policyEntries>
+ </amq:policyMap>
+ </amq:destinationPolicy>
+ <amq:managementContext>
+ <amq:managementContext createConnector="false"/>
+ </amq:managementContext>
+ <amq:persistenceAdapter>
+ <amq:amqPersistenceAdapter/>
+ </amq:persistenceAdapter>
+ <amq:plugins>
+ <amq:statisticsBrokerPlugin/>
+ </amq:plugins>
+ <amq:transportConnectors>
+ <amq:transportConnector uri="tcp://localhost:0" />
+ </amq:transportConnectors>
+ </amq:broker>
+ <amq:connectionFactory id="amqConnectionFactory"
brokerURL="vm://james?create=false">
+ <amq:prefetchPolicy>
+ <!-- Disable prefetch so slow consuming can not block other
threads -->
+ <!-- See JAMES-1253 -->
+ <amq:prefetchPolicy queuePrefetch="0" topicPrefetch="0"/>
+ </amq:prefetchPolicy>
+ <property name="blobTransferPolicy" ref="blobTransferPolicy"/>
+ </amq:connectionFactory>
+ <bean id="blobTransferPolicy"
class="org.apache.james.queue.activemq.FileSystemBlobTransferPolicy">
+ <property name="defaultUploadUrl"
value="file://var/store/activemq/blob-transfer"/>
+ </bean>
+ <bean id="jmsConnectionFactory"
class="org.springframework.jms.connection.CachingConnectionFactory">
+ <property name="targetConnectionFactory"
ref="amqConnectionFactory"/>
+ <property name="sessionCacheSize" value="10"/>
+ <property name="cacheConsumers" value="false"/>
+ <property name="cacheProducers" value="true"/>
+ </bean>
+ <bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
+ <property name="connectionFactory" ref="jmsConnectionFactory"/>
+ </bean>
+
+ <!--
+
===========================================================================
+ Mailet Container
+
===========================================================================
+ -->
+
+ <!--
+ Mailet Container Beans.
+ -->
+ <bean id="mailprocessor" name="processorRoute"
class="org.apache.james.mailetcontainer.impl.camel.CamelCompositeProcessor"/>
+
+ <!--
+ !!! mailetcontext bean must be defined after mailProcessor
+ otherwise LogEnabled injection via LogEnabledBeanPostProcessor
will not occur before
+ it is used - Seems like a Spring bug...
+ -->
+ <bean id="mailetcontext"
class="org.apache.james.mailetcontainer.impl.JamesMailetContext"/>
+ <bean id="mailspooler"
class="org.apache.james.mailetcontainer.impl.JamesMailSpooler"/>
+
+ <!--
+ Mailet and Matcher "Bean-Factory".
+ -->
+ <bean id="mailetloader"
class="org.apache.james.container.spring.bean.factory.mailetcontainer.MailetLoaderBeanFactory"
/>
+ <bean id="matcherloader"
class="org.apache.james.container.spring.bean.factory.mailetcontainer.MatcherLoaderBeanFactory"
/>
+
+ <!--
+ Camel Context
+ -->
+ <camel:camelContext id="jamesCamelContext" trace="false" >
+ <camel:jmxAgent id="agent" disabled="false"
createConnector="false" serviceUrlPath="/jmxrmi/jamescamel"/>
+ <camel:template id="producerTemplate"/>
+ </camel:camelContext>
+
+ <!--
+
===========================================================================
+ File System
+
===========================================================================
+ -->
+
+ <bean
class="org.apache.james.container.spring.bean.factorypostprocessor.FileSystemBeanFactoryPostProcessor">
+ <property name="fileSystem" ref="filesystem" />
+ </bean>
+ <bean id="filesystem"
class="org.apache.james.container.spring.filesystem.FileSystemImpl" />
+
+ <!--
+
===========================================================================
+ DNS Service
+
===========================================================================
+ -->
+
+ <bean id="dnsservice"
class="org.apache.james.dnsservice.dnsjava.DNSJavaService" />
+
+ <!--
+
===========================================================================
+ FetchMail
+
===========================================================================
+ -->
+
+ <bean id="fetchmail" class="org.apache.james.fetchmail.FetchScheduler"
/>
+
+
+ <!--
+
===========================================================================
+ Mail Protocol Servers
+
===========================================================================
+ -->
+ <bean id="protocolhandlerloader"
class="org.apache.james.container.spring.bean.factory.protocols.ProtocolHandlerLoaderBeanFactory"
/>
+
+ <!--
+ SMTP Server
+ -->
+ <bean id="smtpserver"
class="org.apache.james.smtpserver.netty.SMTPServerFactory"/>
+
+ <!--
+ LMTP Server
+ -->
+ <bean id="lmtpserver"
class="org.apache.james.lmtpserver.netty.LMTPServerFactory"/>
+
+ <!--
+ POP3 Server
+ -->
+ <bean id="pop3server"
class="org.apache.james.pop3server.netty.POP3ServerFactory"/>
+
+ <!--
+ IMAP Server
+ -->
+ <bean id="imapserver"
class="org.apache.james.imapserver.netty.IMAPServerFactory">
+ <property name="imapDecoder" ref="imapDecoder"/>
+ <property name="imapEncoder" ref="imapEncoder"/>
+ </bean>
+ <!-- The imapProcessor configuration will be reviewed when IMAP will
be integrated into Protocols project -->
+ <!-- Temporary configuration - see IMAP-357 -->
+ <bean id="imapProcessor"
class="org.apache.james.imap.processor.main.DefaultImapProcessorFactory"
factory-method="createXListSupportingProcessor">
+ <constructor-arg index="0" ref="mailboxmanager"/>
+ <constructor-arg index="1" ref="subscriptionManager"/>
+ <!-- The mailboxTyper -->
+ <constructor-arg index="2" value="#{null}"/>
+ <!-- The idleKeepAlive -->
+ <constructor-arg index="3" value="120"/>
+ <!-- The list of disabled capabilities -->
+ <constructor-arg index="4">
+ <set>
+ <value>ACL</value>
+ </set>
+ </constructor-arg>
+ </bean>
+ <bean id="imapDecoder" factory-bean="imapDecoderFactory"
factory-method="buildImapDecoder"/>
+ <bean id="imapDecoderFactory"
class="org.apache.james.imap.main.DefaultImapDecoderFactory"/>
+ <bean id="imapEncoder" factory-bean="imapEncoderFactory"
factory-method="buildImapEncoder"/>
+ <bean id="imapEncoderFactory"
class="org.apache.james.imap.encode.main.DefaultImapEncoderFactory"/>
+
+ <!--
+
===========================================================================
+ Mailbox
+
===========================================================================
+ -->
+
+ <!--
+ Mailbox Managers
+ -->
+ <bean
class="org.apache.james.container.spring.bean.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor"/>
+
+ <bean id="locker"
class="org.apache.james.mailbox.store.JVMMailboxPathLocker"/>
+ <import
resource="classpath:META-INF/org/apache/james/spring-mailbox.xml" />
+
+ <!--
+ Mailbox Copier
+ -->
+ <bean id="mailboxcopier"
class="org.apache.james.mailbox.copier.MailboxCopierImpl"/>
+
+ <!--
+ Mailbox Importer
+ -->
+ <bean id="james23importer"
class="org.apache.james.container.spring.tool.James23Importer"/>
+
+ <!--
+
===========================================================================
+ Database DataSource
+
===========================================================================
+ -->
+
+ <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ <property name ="location"
value="classpath:james-database.properties"/>
+ </bean>
+ <bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
+ <property name="driverClassName"
value="${database.driverClassName}" />
+ <property name="url" value="${database.url}" />
+ <property name="username" value="${database.username}" />
+ <property name="password" value="${database.password}" />
+ <!--The value for maxActive should always be larger than the
number of spooler threads. The-->
+ <!--reason is that a spooler thread normally requires 1 connection
to process a mail, however-->
+ <!--sometimes OpenJPA requires 1 connection to finish the
processing on top of that. If-->
+ <!-- maxActive <= num spooler threads,-->
+ <!--it can happen that the spooler threads grab all maxActive
connections but then cannot-->
+ <!--finish processing because each of them blocks waiting for
OpenJPA which itself is waiting-->
+ <!--for a connection. See
https://issues.apache.org/jira/browse/JAMES-1317.-->
+ <property name="maxActive" value="21"/>
+ <!-- This lets a mail fail to be processed rather than the server
freezing. -->
+ <property name="maxWait" value="30000"/>
+ <!-- This keeps the number of connections in the pool low on
average -->
+ <property name="timeBetweenEvictionRunsMillis" value="300000"/>
+ <property name="minEvictableIdleTimeMillis" value="300000"/>
+ <property name="removeAbandoned" value="true"/>
+ <property name="logAbandoned" value="true"/>
+ <property name="removeAbandonedTimeout" value="300"/>
+ </bean>
+ <bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+ <property name="dataSource" ref="datasource"/>
+ <property name="jpaVendorAdapter" ref="vendorAdapter"/>
+ <property name="persistenceXmlLocation"
value="classpath:META-INF/persistence_james.xml"/>
+ </bean>
+ <bean id="vendorAdapter"
class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
+ <property name="database" value="${vendorAdapter.database}"/>
+ <!-- set this to true for debugging purposes -->
+ <property name="showSql" value="false"/>
+ </bean>
+
+ <!--
+
===========================================================================
+ JMX
+
===========================================================================
+ -->
+
+ <!--
+ JMX Server
+ -->
+ <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="ignoreUnresolvablePlaceholders" value="true"/>
+ <property name="location" value="classpath:jmx.properties"/>
+ </bean>
+ <bean id="mbeanserver"
class="org.springframework.jmx.support.MBeanServerFactoryBean" >
+ <property name="locateExistingServerIfPossible" value="true"/>
+ <property name="registerWithFactory" value="true"/>
+ </bean>
+ <bean id="serverConnector"
class="org.springframework.jmx.support.ConnectorServerFactoryBean"
depends-on="registry">
+ <property name="objectName" value="connector:name=rmi" />
+ <property name="serviceUrl"
value="service:jmx:rmi://${jmx.address}/jndi/rmi://${jmx.address}:${jmx.port}/jmxrmi"
/>
+ </bean>
+ <bean id="registry"
class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
+ <property name="port" value="${jmx.port}" />
+ <property name="serverSocketFactory"
ref="restrictedRmiSocketFactory"/>
+ <property name="clientSocketFactory"
ref="restrictedRmiSocketFactory"/>
+ </bean>
+ <bean id="restrictedRmiSocketFactory"
class="org.apache.james.util.RestrictingRMISocketFactory">
+ <constructor-arg value="${jmx.address}"/>
+ </bean>
+
+ <!--
+ JMX Export
+ -->
+ <bean id="exporter"
class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
+ <property name="beans">
+ <map>
+ <entry key="org.apache.james:type=component,name=domainlist"
value-ref="domainlistmanagement"/>
+ <entry key="org.apache.james:type=component,name=dnsservice"
value-ref="dnsservice"/>
+ <entry
key="org.apache.james:type=component,name=recipientrewritetable"
value-ref="recipientrewritetablemanagement"/>
+ <entry
key="org.apache.james:type=component,name=usersrepository"
value-ref="usersrepositorymanagement"/>
+ <entry key="org.apache.james:type=component,name=fetchmail"
value-ref="fetchmail"/>
+ <entry
key="org.apache.james:type=component,name=mailboxmanagement"
value-ref="mailboxmanagermanagement"/>
+ <entry
key="org.apache.james:type=component,component=mailetcontainer,name=mailspooler"
value-ref="mailspooler"/>
+ <entry key="org.apache.james:type=component,name=mailboxcopier"
value-ref="mailboxcopiermanagement"/>
+ <entry
key="org.apache.james:type=component,name=james23importer"
value-ref="james23importermanagement"/>
+ <entry key="org.apache.james:type=container,name=logprovider"
value-ref="logprovider"/>
+ </map>
+ </property>
+ <property name="assembler">
+ <bean
class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
+ <property name="managedInterfaces"
value="org.apache.james.fetchmail.FetchSchedulerMBean,org.apache.james.domainlist.api.DomainListManagementMBean,org.apache.james.dnsservice.api.DNSServiceMBean,org.apache.james.rrt.api.RecipientRewriteTableManagementMBean,org.apache.james.user.api.UsersRepositoryManagementMBean,org.apache.james.adapter.mailbox.MailboxManagerManagementMBean,org.apache.james.container.spring.mailbox.MailboxCopierManagementMBean,org.apache.james.mailetcontainer.api.jmx.MailSpoolerMBean,org.apache.james.container.spring.lifecycle.LogProviderManagementMBean"/>
+ </bean>
+ </property>
+ </bean>
+ <bean id="usersrepositorymanagement"
class="org.apache.james.user.lib.UsersRepositoryManagement" />
+ <bean id="recipientrewritetablemanagement"
class="org.apache.james.rrt.lib.RecipientRewriteTableManagement" />
+ <bean id="domainlistmanagement"
class="org.apache.james.domainlist.lib.DomainListManagement" />
+ <bean id="mailboxmanagermanagement"
class="org.apache.james.adapter.mailbox.MailboxManagerManagement" />
+ <bean id="mailboxcopiermanagement"
class="org.apache.james.container.spring.mailbox.MailboxCopierManagement" />
+ <bean id="james23importermanagement"
class="org.apache.james.container.spring.tool.James23ImporterManagement" />
+
+</beans>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/james3/wrapper.conf Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,123 @@
+#********************************************************************
+# Wrapper Properties
+#********************************************************************
+# Java Application
+wrapper.java.command=java
+wrapper.working.dir=.
+
+# Java Main class. This class must implement the WrapperListener interface
+# or guarantee that the WrapperManager class is initialized. Helper
+# classes are provided to do this for you. See the Integration section
+# of the documentation for details.
+wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
+set.default.REPO_DIR=../lib
+set.default.APP_BASE=.
+
+# Java Classpath (include wrapper.jar) Add class path elements as
+# needed starting from 1
+wrapper.java.classpath.1=../conf/lib/*
+wrapper.java.classpath.2=../conf
+# The mail jar needs to be first in the class path before the geronimo
mail implementation. Forcing it
+# by explicitly listing it first
+wrapper.java.classpath.3=%REPO_DIR%/mail-1.4.4.jar
+wrapper.java.classpath.4=%REPO_DIR%/*
+
+
+
+# Java Library Path (location of Wrapper.DLL or libwrapper.so)
+wrapper.java.library.path.1=lib
+
+# Java Additional Parameters
+#wrapper.java.additional.1=
+wrapper.java.additional.14=-Djames.message.usememorycopy=false
+wrapper.java.additional.13=-Dmail.mime.address.strict=false
+wrapper.java.additional.12=-Dmail.mime.decodeparameters=true
+wrapper.java.additional.11=-Dmail.mime.encodeparameters=true
+wrapper.java.additional.10=-Dmail.mime.base64.ignoreerrors=true
+wrapper.java.additional.9=-Dmail.mime.multipart.allowempty=true
+wrapper.java.additional.8=-Dmail.mime.uudecode.ignoremissingbeginend=true
+wrapper.java.additional.7=-Dmail.mime.uudecode.ignoreerrors=true
+wrapper.java.additional.6=-Dmail.mime.ignoreunknownencoding=true
+wrapper.java.additional.5=-Dmail.mime.multipart.ignoremissingboundaryparameter=true
+wrapper.java.additional.4=-Dmail.mime.multipart.ignoremissingendboundary=true
+wrapper.java.additional.3=-Dcom.sun.management.jmxremote.authenticate=false
+wrapper.java.additional.2=-Dcom.sun.management.jmxremote
+wrapper.java.additional.1=-XX:+HeapDumpOnOutOfMemoryError
+
+# Initial Java Heap Size (in MB)
+#wrapper.java.initmemory=3
+wrapper.java.initmemory=128
+
+# Maximum Java Heap Size (in MB)
+#wrapper.java.maxmemory=64
+wrapper.java.maxmemory=512
+
+# Application parameters. Add parameters as needed starting from 1
+wrapper.app.parameter.1=org.apache.james.app.spring.JamesAppSpringMain
+wrapper.app.parameter.2=start
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console. (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output. (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile=log/wrapper.log
+
+# Format of output for the log file. (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output. (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+# the log is rolled. Size is specified in bytes. The default value
+# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
+# 'm' (mb) suffix. For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=0
+
+# Maximum number of rolled log files which will be allowed before old
+# files are deleted. The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=0
+
+# Log Level for sys/event log output. (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+#********************************************************************
+# Wrapper Windows Properties
+#********************************************************************
+# Title to use when running as a console
+wrapper.console.title=Apache James Server App
+
+#********************************************************************
+# Wrapper Windows NT/2000/XP Service Properties
+#********************************************************************
+# WARNING - Do not modify any of these properties when an application
+# using this configuration file has been installed as a service.
+# Please uninstall the service before modifying this section. The
+# service can then be reinstalled.
+
+# Name of the service
+
wrapper.ntservice.name=james
+
+# Display name of the service
+wrapper.ntservice.displayname=Apache James Server App
+
+# Description of the service
+wrapper.ntservice.description=An advanced email server
+
+# Service dependencies. Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed. AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
+
+configuration.directory.in.classpath.first=../conf
+wrapper.java.library.path=../lib
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/phoenix.sh Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,267 @@
+#! /bin/sh
+#
+#
-----------------------------------------------------------------------------
+# Phoenix start script.
+#
+# Author: Alexis Agahi <
al...@users.sourceforge.net>
+# Peter Donald <peter at
apache.org>
+#
+# Environment Variable Prequisites
+#
+# PHOENIX_OPTS (Optional) Java runtime options used when the
command is
+# executed.
+#
+# PHOENIX_TMPDIR (Optional) Directory path location of temporary
directory
+# the JVM should use (java.io.tmpdir). Defaults to
+# $PHOENIX_BASE/temp.
+#
+# JAVA_HOME Must point at your Java Development Kit
installation.
+#
+# PHOENIX_JVM_OPTS (Optional) Java runtime options used when the
command is
+# executed.
+#
+# PHOENIX_KILLDELAY (Optional) When shutting the server this script
sends s
+# SIGTERM signal then delays for a time before
forcefully
+# shutting down the process if it is still alive. This
+# variable controls the delay and defaults to 5
(seconds)
+#
+#
-----------------------------------------------------------------------------
+
+usage()
+{
+ echo "Usage: $0 {start|stop|run|restart|check}"
+ exit 1
+}
+
+[ $# -gt 0 ] || usage
+
+##################################################
+# Get the action & configs
+##################################################
+
+ACTION=$1
+shift
+ARGS="$*"
+
+
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+esac
+
+# resolve links - $0 may be a softlink (including relative links)
+PRGDIR=`dirname "$0"`
+THIS_PROG=`cd "$PRGDIR" ; pwd`/`basename "$0"`
+
+while [ -h "$THIS_PROG" ]; do
+ ls=`ls -ld "$THIS_PROG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '^/.*' > /dev/null; then
+ THIS_PROG="$link"
+ else
+ THIS_PROG=`dirname "$THIS_PROG"`/"$link"
+ fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$THIS_PROG"`
+PHOENIX_HOME=`cd "$PRGDIR/.." ; pwd`
+
+#setup time between signals to kill phoenix
+if [ -z "$PHOENIX_KILLDELAY" ] ; then
+ PHOENIX_KILLDELAY=5
+fi
+
+
+unset THIS_PROG
+
+if [ -r "$PHOENIX_HOME"/bin/setenv.sh ]; then
+ . "$PHOENIX_HOME"/bin/setenv.sh
+fi
+
+# Checking for JAVA_HOME is required on *nix due
+# to some distributions stupidly including kaffe in /usr/bin
+if [ "$JAVA_HOME" = "" ] ; then
+ echo "ERROR: JAVA_HOME not found in your environment."
+ echo
+ echo "Please, set the JAVA_HOME variable in your environment to match
the"
+ echo "location of the Java Virtual Machine you want to use."
+ exit 1
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+ [ -n "$PHOENIX_HOME" ] && PHOENIX_HOME=`cygpath --unix "$PHOENIX_HOME"`
+fi
+
+if [ -z "$PHOENIX_TMPDIR" ] ; then
+ # Define the java.io.tmpdir to use for Phoenix
+ PHOENIX_TMPDIR="$PHOENIX_HOME"/temp
+ mkdir -p "$PHOENIX_TMPDIR"
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ PHOENIX_HOME=`cygpath --path --windows "$PHOENIX_HOME"`
+ PHOENIX_TMPDIR=`cygpath --path --windows "$PHOENIX_TMPDIR"`
+fi
+
+# ----- Execute The Requested Command
-----------------------------------------
+
+echo "Using PHOENIX_HOME: $PHOENIX_HOME"
+echo "Using PHOENIX_TMPDIR: $PHOENIX_TMPDIR"
+echo "Using JAVA_HOME: $JAVA_HOME"
+
+# Uncomment to get enable remote debugging
+# DEBUG="-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y"
+#
+# Command to overide JVM ext dir
+#
+# This is needed as some JVM vendors do foolish things
+# like placing jaxp/jaas/xml-parser jars in ext dir
+# thus breaking Phoenix
+#
+JVM_EXT_DIRS="$PHOENIX_HOME/lib:$PHOENIX_HOME/tools/lib"
+if $cygwin; then
+ JVM_EXT_DIRS=`cygpath --path --windows "$JVM_EXT_DIRS"`
+fi
+JVM_OPTS="-Djava.ext.dirs=$JVM_EXT_DIRS"
+
+if [ "$PHOENIX_SECURE" != "false" ] ; then
+ # Make phoenix run with security manager enabled
+ JVM_OPTS="$JVM_OPTS -Djava.security.manager"
+fi
+
+# Make sure we don't run with a never expiring cache for InetAddress
+# In Phoenix Main this is read and applied as Security.setProperty
+PHOENIX_JVM_OPTS="$PHOENIX_JVM_OPTS -Dnetworkaddress.cache.ttl=300"
+
+# change to the bin directory
+cd $PHOENIX_HOME/bin
+
+# Get the run cmd
+RUN_CMD="$JAVA_HOME/bin/java $JVM_OPTS \
+ $DEBUG \
+ -classpath "$PHOENIX_HOME/lib:$PHOENIX_HOME/bin/phoenix-loader.jar" \
+
-Djava.security.policy=jar:file:$PHOENIX_HOME/bin/phoenix-loader.jar!/META-INF/java.policy
\
+ $PHOENIX_JVM_OPTS \
+ -Dphoenix.home="$PHOENIX_HOME" \
+ -Djava.io.tmpdir="$PHOENIX_TMPDIR" \
+ org.apache.avalon.phoenix.launcher.Main"
+
+# -jar "$PHOENIX_HOME/bin/phoenix-loader.jar" $*"
+
+
+#####################################################
+# Find a PID for the pid file
+#####################################################
+if [ -z "$PHOENIX_PID" ]
+then
+ PHOENIX_PID="$PHOENIX_TMPDIR/phoenix.pid"
+fi
+
+#####################################################
+# Find a location for the phoenix console
+#####################################################
+PHOENIX_CONSOLE="$PHOENIX_TMPDIR/phoenix.console"
+if [ -z "$PHOENIX_CONSOLE" ]
+then
+ if [ -w /dev/console ]
+ then
+ PHOENIX_CONSOLE=/dev/console
+ else
+ PHOENIX_CONSOLE=/dev/tty
+ fi
+fi
+
+
+#####################################################
+# Action!
+#####################################################
+
+case "$ACTION" in
+ start)
+ echo "Starting Phoenix: "
+
+ if [ -f $PHOENIX_PID ]
+ then
+ if ps -p `cat $PHOENIX_PID ` >/dev/null 2>/dev/null
+ then
+ echo "Already Running!!"
+ exit 1
+ fi
+ fi
+
+ echo "STARTED Phoenix `date`" >> $PHOENIX_CONSOLE
+
+ nohup sh -c "exec $RUN_CMD >>$PHOENIX_CONSOLE 2>&1" >/dev/null &
+ echo $! > $PHOENIX_PID
+ echo "Phoenix running pid="`cat $PHOENIX_PID`
+ ;;
+
+ stop)
+ PID=`cat $PHOENIX_PID 2>/dev/null`
+ echo "Shutting down Phoenix: $PID"
+ kill $PID 2>/dev/null
+ sleep $PHOENIX_KILLDELAY
+ kill -9 $PID 2>/dev/null
+ rm -f $PHOENIX_PID
+ echo "STOPPED `date`" >>$PHOENIX_CONSOLE
+ ;;
+
+ restart)
+ $0 stop $*
+ sleep 5
+ $0 start $*
+ ;;
+
+ supervise)
+ #
+ # Under control of daemontools supervise monitor which
+ # handles restarts and shutdowns via the svc program.
+ #
+ exec $RUN_CMD
+ ;;
+
+ run|demo)
+ echo "Running Phoenix: "
+
+ if [ -f $PHOENIX_PID ]
+ then
+ echo "Already Running!!"
+ exit 1
+ fi
+
+ exec $RUN_CMD
+ ;;
+
+ check)
+ echo "Checking arguments to Phoenix: "
+ echo "PHOENIX_HOME: $PHOENIX_HOME"
+ echo "PHOENIX_TMPDIR: $PHOENIX_TMPDIR"
+ echo "PHOENIX_JVM_OPTS: $PHOENIX_JVM_OPTS"
+ echo "JAVA_HOME: $JAVA_HOME"
+ echo "JVM_OPTS: $JVM_OPTS"
+ echo "CLASSPATH: $CLASSPATH"
+ echo "RUN_CMD: $RUN_CMD"
+ echo
+
+ if [ -f $PHOENIX_PID ]
+ then
+ echo "Phoenix running pid="`cat $PHOENIX_PID`
+ exit 0
+ fi
+ exit 1
+ ;;
+
+*)
+ usage
+ ;;
+esac
+
+exit 0
+
+
+
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/run.bat Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,99 @@
+@echo off
+rem
+rem Phoenix start script.
+rem
+rem Author: Peter Donald [
don...@apache.org]
+rem
+rem Environment Variable Prequisites
+rem
+rem PHOENIX_OPTS (Optional) Java runtime options used when the
command is
+rem executed.
+rem
+rem PHOENIX_TMPDIR (Optional) Directory path location of temporary
directory
+rem the JVM should use (java.io.tmpdir). Defaults to
+rem $PHOENIX_BASE/temp.
+rem
+rem JAVA_HOME Must point at your Java Development Kit
installation.
+rem
+rem PHOENIX_JVM_OPTS (Optional) Java runtime options used when the
command is
+rem executed.
+rem
+rem
-----------------------------------------------------------------------------
+
+rem
+rem Determine if JAVA_HOME is set and if so then use it
+rem
+if not "%JAVA_HOME%"=="" goto found_java
+
+set PHOENIX_JAVACMD=java
+goto file_locate
+
+:found_java
+set PHOENIX_JAVACMD=%JAVA_HOME%\bin\java
+
+:file_locate
+
+rem
+rem Locate where phoenix is in filesystem
+rem
+if not "%OS%"=="Windows_NT" goto start
+
+rem %~dp0 is name of current script under NT
+set PHOENIX_HOME=%~dp0*
+
+rem : operator works similar to make : operator
+set PHOENIX_HOME=%PHOENIX_HOME:\bin\*=%
+
+:start
+
+if not "%PHOENIX_HOME%" == "" goto phoenix_home
+
+echo.
+echo Error: PHOENIX_HOME environment variable is not set.
+echo This needs to be set manually for Win9x as its command
+echo prompt scripting does not allow it to be set automatically.
+echo.
+goto end
+
+:phoenix_home
+
+if not "%PHOENIX_TMPDIR%"=="" goto afterTmpDir
+set PHOENIX_TMPDIR=%PHOENIX_HOME%\temp
+if not exist "%PHOENIX_TMPDIR%" mkdir "%PHOENIX_TMPDIR%"
+
+:afterTmpDir
+
+echo Using PHOENIX_HOME: %PHOENIX_HOME%
+echo Using PHOENIX_TMPDIR: %PHOENIX_TMPDIR%
+echo Using JAVA_HOME: %JAVA_HOME%
+
+set PHOENIX_SM=
+
+if "%PHOENIX_SECURE%" == "false" goto postSecure
+
+rem Make Phoenix run with security Manager enabled
+set PHOENIX_SM="-Djava.security.manager"
+
+:postSecure
+
+rem Make sure we don't run with a never expiring cache for InetAddress
+rem In Phoenix Main this is read and applied as Security.setProperty
+set PHOENIX_JVM_OPTS=%PHOENIX_JVM_OPTS% -Dnetworkaddress.cache.ttl=300
+
+rem
+rem -Djava.ext.dirs= is needed as some JVM vendors do foolish things
+rem like placing jaxp/jaas/xml-parser jars in ext dir
+rem thus breaking Phoenix
+rem
+
+rem uncomment to get enable remote debugging
+rem set DEBUG=-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
+
+rem change to the bin directory
+cd %PHOENIX_HOME%\bin
+
+rem Kicking the tires and lighting the fires!!!
+"%PHOENIX_JAVACMD%" %DEBUG%
-classpath "%PHOENIX_HOME%/lib;%PHOENIX_HOME%/bin/phoenix-loader.jar" "-Djava.ext.dirs=%PHOENIX_HOME%\lib;%PHOENIX_HOME%\tools\lib" "-Dphoenix.home=%PHOENIX_HOME%" "-Djava.security.policy=jar:file:%PHOENIX_HOME%/bin/phoenix-loader.jar!/META-INF/java.policy" %PHOENIX_JVM_OPTS% %PHOENIX_SM%
org.apache.avalon.phoenix.launcher.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+:end
+
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/set-domain.xml Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,40 @@
+<project name="set-domain" default="default" basedir=".">
+ <description>
+ Set the domain for Direct
+ </description>
+
+ <!-- set global properties for this build -->
+ <property environment="env" />
+ <property name="direct.home.dir" value="${env.DIRECT_HOME}" />
+ <property name="james.dir" value="${direct.home.dir}/james-2.3.2" />
+ <property name="james.bin.dir" value="${james.dir}/bin" />
+ <property name="set.domain.stylesheet"
value="${james.bin.dir}/set-domain.xsl" />
+ <property name="james.config"
value="${james.dir}/apps/james/SAR-INF/config.xml" />
+ <property name="james.config.save"
value="${james.dir}/apps/james/SAR-INF/config.xml.save" />
+ <property name="
james.config.new"
value="${james.dir}/apps/james/SAR-INF/
config.xml.new" />
+
+ <!-- Fail if we can't find DIRECT_HOME -->
+ <target name="fail-if-direct-home-missing" unless="env.DIRECT_HOME">
+ <fail message="DIRECT_HOME is not defined in the environment"></fail>
+ </target>
+
+ <!-- Fail if we can't find DIRECT_DOMAIN -->
+ <target name="fail-if-direct-domain-missing" unless="env.DIRECT_DOMAIN">
+ <fail message="DIRECT_DOMAIN is not defined in the environment"></fail>
+ </target>
+
+ <!-- Initialization -->
+ <target name="init"
depends="fail-if-direct-home-missing,fail-if-direct-domain-missing">
+ <tstamp></tstamp>
+ </target>
+
+ <!-- Set the domain -->
+ <target name="default" depends="init">
+ <xslt style="${set.domain.stylesheet}" in="${james.config}"
out="${
james.config.new}">
+ <param name="domain" expression="${env.DIRECT_DOMAIN}"></param>
+ </xslt>
+ <copy file="${james.config}" tofile="${james.config.save}"
overwrite="true"></copy>
+ <copy file="${
james.config.new}" tofile="${james.config}"
overwrite="true"></copy>
+ </target>
+
+</project>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/set-domain.xsl Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ASCII" standalone="no"?>
+<xsl:stylesheet version="1.0" xmlns:ns0="urn:hl7-org:v3"
+ xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xd="
http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xsl ns0 xsi xd date"
+ xmlns:date="
http://exslt.org/dates-and-times"
extension-element-prefixes="date">
+
+ <xsl:output method="xml" encoding="ASCII" indent="yes"/>
+
+ <!-- Define input parameters -->
+ <xsl:param name="domain" select="'xxx'"/>
+
+ <!-- Edit the config.xml file for Apache James -->
+ <xsl:template match="/">
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:template>
+
+ <xsl:template match="node()|@*">
+ <xsl:choose>
+ <!-- Edit the postmaster -->
+ <xsl:when
+ test="name(parent::node()/parent::node())='config' and
name(parent::node())='James' and name()='postmaster'">
+ <xsl:element name="postmaster">
+ <xsl:text>Postmaster@</xsl:text>
+ <xsl:value-of select="$domain"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Edit the servername -->
+ <xsl:when
+
test="name(parent::node()/parent::node()/parent::node())='config' and
name(parent::node()/parent::node())='James' and
name(parent::node())='servernames' and name()='servername'">
+ <xsl:element name="servername">
+ <xsl:value-of select="$domain"/>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Edit the RecipAndSenderIsNotLocal=
mydomain.com attribute
of the mailet configuration -->
+ <xsl:when test="name()='mailet' and
starts-with(./@match,'RecipAndSenderIsNotLocal=')">
+ <xsl:element name="mailet">
+ <xsl:attribute name="match">
+ <xsl:text>RecipAndSenderIsNotLocal=</xsl:text>
+ <xsl:value-of select="$domain"/>
+ </xsl:attribute>
+ <xsl:attribute
name="class">NHINDSecurityAndTrustMailet</xsl:attribute>
+ <xsl:for-each select="ConfigURL">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="MessageMonitoringServiceURL">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="AutoDSNFailueCreation">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ConsumeMDNProcessed">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentConfigProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityManagerProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSubject">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="ServiceSecurityAuthSecret">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ <xsl:for-each select="SmptAgentAuditorProvider">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:when>
+
+ <!-- Otherwise just copy things -->
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+</xsl:stylesheet>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/setdomain.bat Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,4 @@
+set DIRECT_DOMAIN=%1
+ant -q -f %DIRECT_HOME%/james-2.3.2/bin/set-domain.xml
+echo "Domain set to %1"
+echo "Postmaster set to postmaster@%1"
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/scripts/setdomain.sh Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,5 @@
+#!/bin/sh -x
+export DIRECT_DOMAIN=$1
+ant -q -f $DIRECT_HOME/james-2.3.2/bin/set-domain.xml
+echo "Domain set to $1"
+echo "Postmaster set to postmaster@$1"
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/site/resources/css/site.css Thu Feb 12
19:40:52 2015 UTC
@@ -0,0 +1,17 @@
+.source {
+ background-color: #fff;
+ color: #000;
+ border-right: 1px solid #888;
+ border-left: 1px solid #888;
+ border-top: 1px solid #888;
+ border-bottom: 1px solid #888;
+ margin-right: 7px;
+ margin-left: 7px;
+ margin-top: 1em;
+ overflow: auto;
+ }
+
+.source pre {
+ margin-right: 7px;
+ margin-left: 7px;
+ }
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/site/resources/images/logo.png Thu Feb 12
19:40:52 2015 UTC
Binary file, no diff available.
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/site/site.xml Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <bannerLeft>
+ <name>The Direct Project: Stock Deployment Assembly</name>
+ <src>images/logo.png</src>
+ <href>
http://nhindirect.org/</href>
+ </bannerLeft>
+ <version position="left" />
+ <publishDate position="right" format="E M-dd-yyyy HH:mm" />
+ <body>
+ <menu name="Documents">
+ <item name="Release Notes" href="releaseNotes.html" />
+ <item name="Users Guide" href="users-guide/"/>
+ </menu>
+ <menu name="External Links">
+ <item name="The Direct Project Wiki" href="
http://nhindirect.org"
/>
+ </menu>
+ ${reports}
+ </body>
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-classic-skin</artifactId>
+ <version>1.0</version>
+ </skin>
+</project>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/site/xdoc/index.xml Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document xmlns="
http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
http://maven.apache.org/XDOC/2.0
http://maven.apache.org/xsd/xdoc-2.0.xsd">
+ <properties>
+ <title>The Direct Project: Stock Deployment Assembly</title>
+ <author>Greg Meyer</author>
+ </properties>
+ <head>
+ <title>The Direct Project: Stock Deployment Assembly</title>
+ </head>
+ <body>
+ <section name="Overview">
+ <p>
+ The stock deployment is an Java assembly based on the Java
Reference Implementation
+ <a
href="
http://wiki.directproject.org/Bare+Metal+Project">Bare Metal</a>
project. It consists of
+ pre-assembled and partly configured instances of core
reference implementation components. Instructions
+ for installing and configuring the stock assembly are
available in the
+ <a href="users-guide/index.html">users guide</a>.
+ </p>
+ <p>
+ The Java Reference Implementation and Bare Metal projects
are not intended to be full blown, production ready
+ HISP. Instead it is a starting point from which a
production HISP can be derived and deployed.
+ </p>
+ </section>
+ </body>
+</document>
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/certGen.bat Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,1 @@
+java -classpath .;.\lib\*
org.nhindirect.stagent.cert.tools.certgen.DirectProjectCertGenerator
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/certGen.sh Thu Feb 12 19:40:52 2015 UTC
@@ -0,0 +1,1 @@
+java -classpath .:./lib/*
org.nhindirect.stagent.cert.tools.certgen.DirectProjectCertGenerator
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/createPKCS12.sh Thu Feb 12 19:40:52 2015
UTC
@@ -0,0 +1,1 @@
+java -classpath .:./lib/* org.nhindirect.stagent.cert.tools.CreatePKCS12
$1 $2 $3 $4 $5 $6 $7 $8 $9 $10
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/dnsCertDumper.bat Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,2 @@
+echo off
+java -classpath .;.\lib\*
org.nhindirect.stagent.cert.tools.DNSCertDumper %*
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/dnsCertDumper.sh Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,1 @@
+java -classpath .:./lib/* org.nhindirect.stagent.cert.tools.DNSCertDumper
$1 $2 $3 $4 $5 $6
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/ldapCertDumper.bat Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,2 @@
+echo off
+java -classpath .;.\lib\*
org.nhindirect.stagent.cert.tools.LDAPCertDumper %*
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/ldapCertDumper.sh Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,1 @@
+java -classpath .:./lib/* org.nhindirect.stagent.cert.tools.LDAPCertDumper
$1 $2 $3 $4 $5 $6
=======================================
--- /dev/null
+++ /java/tags/stock-4.0/src/tools/policyBuilder.bat Thu Feb 12 19:40:52
2015 UTC
@@ -0,0 +1,1 @@
+java -classpath .;.\lib\*
org.nhindirect.policy.tools.policybuild.SimpleTextPolicyBuilder
=======================================
***Additional files exist in this changeset.***