darrell 2002/11/10 20:44:41
Modified: proposals/imap build-test.xml build.xml
proposals/imap/conf james-assembly.xml james-config.xml
james-server.xml
proposals/imap/java/org/apache/james/imapserver
BaseCommand.java CommandFetch.java FileMailbox.java
SimpleMessageAttributes.java
proposals/imap/java/org/apache/james/imapserver/commands
CommandTemplate.java
Added: proposals/imap/java/org/apache/james/imapserver
BaseConnectionHandler.java
Removed: proposals/imap build-imap.xml
Log:
IMAP Proposal updates.
* Synchronized build.xml, james-comfig.xml, james-server.xml and james-assembly.xml
with latest versions from main tree.
* Removed build-imap.xml, which duplicated build.xml, and was hopelessly out
of date.
* Build now compiles directly from main and proposal source trees,
rather than first copying source to build/src and then compiling.
* Added BaseConnectionHandler, recently removed from main tree, into IMAP
proposal, as it was still used. Need to look at AbstractJamesService, which
seems to replace this functionality.
* IMAP proposal now compiles and builds, and starts successfully. Next I'll have
to try running the tests to see what's actually working.
Revision Changes Path
1.3 +1 -1 jakarta-james/proposals/imap/build-test.xml
Index: build-test.xml
===================================================================
RCS file: /home/cvs/jakarta-james/proposals/imap/build-test.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build-test.xml 23 Jan 2002 21:53:31 -0000 1.2
+++ build-test.xml 11 Nov 2002 04:44:40 -0000 1.3
@@ -16,7 +16,7 @@
==============================================================================
-->
-<project default="main" basedir="../..">
+<project default="main" name="IMAP tests" basedir="../..">
<!--
Give user a chance to override without editing this file
1.7 +60 -36 jakarta-james/proposals/imap/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-james/proposals/imap/build.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- build.xml 27 Sep 2002 08:49:11 -0000 1.6
+++ build.xml 11 Nov 2002 04:44:40 -0000 1.7
@@ -18,7 +18,7 @@
==============================================================================
-->
-<project default="main" basedir="./../..">
+<project default="main" name="IMAP proposal" basedir="./../..">
<!--
Give user a chance to override without editing this file
(and without typing -D each time he compiles it)
@@ -42,7 +42,7 @@
<property name="build.compiler.fulldepend" value="true"/>
<property name="debug" value="on"/>
<property name="optimize" value="on"/>
- <property name="deprecation" value="on"/>
+ <property name="deprecation" value="off"/>
<!--
===================================================================
@@ -101,8 +101,8 @@
===================================================================
-->
<property name="lib.dir" value="lib"/>
- <property name="phoenix" value="phoenix-bin"/>
- <property name="phoenix.lib.dir" value="${phoenix}/lib"/>
+ <property name="phoenix.dir" value="phoenix-bin"/>
+ <property name="phoenix.lib.dir" value="${phoenix.dir}/lib"/>
<!--
===================================================================
@@ -158,7 +158,7 @@
<available property="jdbc3.present" classname="java.sql.Savepoint"/>
<mkdir dir="${dist.dir}"/>
<copy todir="${dist.dir}">
- <fileset dir="${phoenix}">
+ <fileset dir="${phoenix.dir}">
<exclude name="CVS/**"/>
</fileset>
<fileset dir=".">
@@ -167,15 +167,18 @@
<include name="README"/>
</fileset>
</copy>
- <fixcrlf srcdir="${java.dir}" includes="**/*.java" eol="lf"/>
- <fixcrlf srcdir="${conf.dir}" includes="**/*.xml" eol="lf"/>
- <fixcrlf srcdir="${java.proposal.dir}" includes="**/*.java" eol="lf"/>
- <fixcrlf srcdir="${conf.proposal.dir}" includes="**/*.xml" eol="lf"/>
+ <fixcrlf srcdir="${java.proposal.dir}" includes="**/*.java" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${java.proposal.dir}" includes="**/*.minfo" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${java.proposal.dir}" includes="**/*.xinfo" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${java.proposal.dir}" includes="**/*.html" eol="lf"
tab="remove" tablength="4" />
+ <fixcrlf srcdir="${conf.proposal.dir}" includes="**/*.xml" eol="lf"
tab="remove" tablength="4" />
<fixcrlf srcdir="${dist.dir}/bin" includes="run.sh" eol="lf"/>
<fixcrlf srcdir="${dist.dir}/bin" includes="run.bat" eol="crlf"/>
+ <fixcrlf srcdir="${phoenix.dir}/bin" includes="phoenix.sh" eol="lf"/>
<chmod perm="+x">
<fileset dir="${dist.dir}/bin">
<include name="run.sh"/>
+ <include name="phoenix.sh"/>
</fileset>
</chmod>
<fixcrlf srcdir="." includes="build.sh" eol="lf"/>
@@ -189,19 +192,8 @@
<mkdir dir="${build.src}"/>
<copy todir="${build.src}">
<fileset dir="${java.dir}">
- <include name="**/*.java"/>
- <include name="**/*.html"/>
- <include name="**/*.properties"/>
- <include name="**/*.xinfo"/>
- <include name="**/*.mxinfo"/>
- </fileset>
- </copy>
- <copy todir="${build.src}">
- <fileset dir="${java.proposal.dir}">
- <include name="**/*.java"/>
- <include name="**/*.properties"/>
- <include name="**/*.xinfo"/>
- <include name="**/*.mxinfo"/>
+ <include name="${constants.file}"/>
+ <include name="${poolconn.file}"/>
</fileset>
</copy>
<replace file="${build.src}/${constants.file}" token="@@VERSION@@"
value="${version}"/>
@@ -226,28 +218,58 @@
===================================================================
-->
<target name="compile" depends="prepare,prepare-jdbc3">
- <echo message="compiling James"/>
+ <!-- First compile the main James tree, leaving out any files that
+ overlap with the IMAP proposal. -->
+ <echo message="compiling James"/>
<available property="jndi.present" classname="javax.naming.InitialContext"/>
<mkdir dir="${build.classes}"/>
<javac destdir="${build.classes}" debug="${debug}" optimize="${optimize}"
deprecation="${deprecation}">
<classpath refid="project.class.path"/>
<src path="${build.src}"/>
+ <src path="${java.dir}"/>
+ <exclude name="${constants.file}"/>
+ <exclude name="${poolconn.file}"/>
<exclude
name="org/apache/james/userrepository/UsersLDAPRepository.java" unless="jndi.present"/>
+
+ <!-- These file(s) are in both the proposal and the main trunk. -->
+ <exclude name="org/apache/james/James.java"/>
</javac>
- <copy todir="${build.classes}">
- <fileset dir="${build.src}">
- <include name="**/*.properties"/>
- <include name="**/*.xinfo"/>
- <include name="**/*.mxinfo"/>
+
+ <!-- Copy .xinfo and .properties files from the core source, once again,
+ exclude overlapping files. -->
+ <copy todir="${build.classes}">
+ <fileset dir="${java.dir}">
+ <include name="**/*.properties"/>
+ <include name="**/*.xinfo"/>
+ <include name="**/*.mxinfo"/>
+ </fileset>
+ </copy>
+
+ <!-- Now build the proposal source over those classes -->
+ <javac destdir="${build.classes}"
+ debug="${debug}"
+ optimize="${optimize}"
+ deprecation="${deprecation}">
+ <classpath refid="project.class.path" />
+
+ <!-- The proposal source -->
+ <src path="${java.proposal.dir}"/>
+ </javac>
+
+ <!-- Copy .xinfo and .properties files from the proposal source -->
+ <copy todir="${build.classes}" overwrite="on">
+ <fileset dir="${java.proposal.dir}">
+ <include name="**/*.properties"/>
+ <include name="**/*.xinfo"/>
</fileset>
- </copy>
+ </copy>
</target>
<!--
===================================================================
Javadocs, and mailet javadocs
===================================================================
-->
- <target name="javadocs" depends="compile">
+ <target name="javadocs">
<echo message="Making James javadocs"/>
<delete dir="${build.javadocs}"/>
@@ -325,7 +347,6 @@
-->
<target name="website" depends="xdocs,javadocs">
<echo message="preparing website in ${www.dir}"/>
- <mkdir dir="${www.dir}"/>
<delete>
<fileset dir="${www.dir}">
<exclude name="CVS/**"/>
@@ -334,6 +355,7 @@
<exclude name="mailet/**"/>
</fileset>
</delete>
+ <mkdir dir="${www.dir}"/>
<copy todir="${www.dir}" filtering="no">
<fileset dir="${build.docs}"/>
</copy>
@@ -369,10 +391,8 @@
<!-- Make james.jar-->
<jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}"
manifest="${src.dir}/Manifest.mf">
<include name="org/apache/james/**"/>
- <exclude name="org/apache/mailet/**"/>
+ <include name="org/apache/mailet/**"/>
</jar>
- <!-- Make mailet.jar-->
- <jar jarfile="${build.lib}/mailet.jar" basedir="${build.classes}"
manifest="${src.dir}/Manifest.mf" includes="org/apache/mailet/**"/>
<!-- Make sar file-->
<sar sarfile="${build.lib}/${name}.sar"
config="${conf.proposal.dir}/james-config.xml"
environment="${conf.proposal.dir}/james-server.xml"
assembly="${conf.proposal.dir}/james-assembly.xml">
<lib dir="${build.lib}/">
@@ -383,7 +403,7 @@
<include name="jakarta-oro-2.0.1.jar"/>
<include name="mm.mysql-2.0.14.jar"/>
<include name="mm.mysql.LICENCE"/>
- <include name="avalon-framework-20020713.jar"/>
+ <include name="avalon-framework-4.1.3.jar"/>
<include name="cornerstone.jar"/>
<include name="excalibur-datasource-1.0.jar"/>
<include name="activation.jar"/>
@@ -405,6 +425,10 @@
<!--installs sar into ./dist/ ready to test-->
<copy file="${build.lib}/${name}.sar" todir="${dist.dir}/apps"/>
+
+ <!-- Make mailet.jar-->
+ <jar jarfile="${build.lib}/mailet.jar" basedir="${build.classes}"
manifest="${src.dir}/Manifest.mf" includes="org/apache/mailet/**"/>
+ <!-- copy file="${build.lib}/mailet.jar" todir="${dist.dir}/lib"/ -->
</target>
<!--
===================================================================
1.5 +8 -0 jakarta-james/proposals/imap/conf/james-assembly.xml
Index: james-assembly.xml
===================================================================
RCS file: /home/cvs/jakarta-james/proposals/imap/conf/james-assembly.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- james-assembly.xml 14 Oct 2002 07:03:49 -0000 1.4
+++ james-assembly.xml 11 Nov 2002 04:44:40 -0000 1.5
@@ -57,6 +57,8 @@
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"/>
<provide name="James" role="org.apache.james.services.MailServer"/>
+ <provide name="thread-manager"
+ role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- WARNING - The IMAP server is only experimental, ie pre-alpha -->
@@ -91,6 +93,8 @@
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"/>
<provide name="James" role="org.apache.james.services.MailServer"/>
+ <provide name="thread-manager"
+ role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- SMTP Server -->
@@ -103,6 +107,8 @@
<provide name="connections"
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"/>
<provide name="James" role="org.apache.james.services.MailServer"/>
+ <provide name="thread-manager"
+ role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- NNTP Server -->
@@ -114,6 +120,8 @@
role="org.apache.avalon.cornerstone.services.connection.ConnectionManager"/>
<provide name="nntp-repository"
role="org.apache.james.nntpserver.repository.NNTPRepository"/>
+ <provide name="thread-manager"
+ role="org.apache.avalon.cornerstone.services.threads.ThreadManager" />
</block>
<!-- NNTP Repository -->
1.5 +385 -241 jakarta-james/proposals/imap/conf/james-config.xml
Index: james-config.xml
===================================================================
RCS file: /home/cvs/jakarta-james/proposals/imap/conf/james-config.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- james-config.xml 14 Oct 2002 07:03:49 -0000 1.4
+++ james-config.xml 11 Nov 2002 04:44:40 -0000 1.5
@@ -1,48 +1,61 @@
<?xml version="1.0"?>
-<!-- Configuration file for Apache Jakarta James Mail and news server -->
+<!-- Configuration file for the Apache Jakarta James server -->
-<!-- This file contains important settings that control the behaviour
- of all of the services and repositories.
+<!-- This file contains important settings that control the behaviour -->
+<!-- of all of the services and repositories. -->
- README!
+<!-- 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.
+<!-- 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.
+<!-- 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://jakarta.apache.org/james/configuration_v2_0.html
+<!-- For production use you will probably need to make more extensive changes, see
-->
+<!-- http://jakarta.apache.org/james/configuration_v2_1.html -->
-$Revision$ Committed on $Date$ by: $Author$-->
+<!-- $Revision$ Committed on $Date$ by: $Author$ -->
<config>
<James>
-<!-- CHECKME! Set this to the right email address for error reports -->
- <postmaster> Postmaster@localhost </postmaster>
-
-<!-- CONFIRM? -->
- <!-- servernames identifies the DNS namespace served by this instance of
James.
- If autodetect is TRUE, James wil attempt to discover its own name AND
use any 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.
- By default, the servername 'localhost' is specified. This can be
removed, if required. -->
+<!-- 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 fetchpop it is important to include the -->
+ <!-- fetched domains in the server name list to prevent looping. -->
<servernames autodetect="true" autodetectIP="true">
- <!--<servername>To override autodetected server names uncomment this.
</servername> -->
+<!-- CONFIRM? -->
<servername>localhost</servername>
- <!-- IMPORTANT if you are using fetchpop it is important to include the -->
- <!-- fetched domains here to prevent looping -->
</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"/>
<!-- Set the type of permanent mailfolders to be used. -->
- <!-- If IMAP service is to be provided, the storage type
+ <!-- If IMAP service is to be provided, the storage type -->
<!-- must be 'IMAP'; if only POP3 service is being provided -->
<!-- then use must be 'basic' (default) . At some stage POP3-->
<!-- will, hopefully, be able to use IMAP storage as well. -->
@@ -55,43 +68,46 @@
<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>
+ <!-- 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>-->
+ </inboxRepository>
+ -->
</James>
-
+
<!-- Fetch pop block, fetches mail from POP3 servers and inserts it into the
incoming spool -->
- <!-- IMPORTANT it is important to prevent mail from looping by setting the -->
+ <!-- Warning: It is important to prevent mail from looping by setting the -->
<!-- fetched domains in the <servernames> section of the <James> block -->
- <!-- above. fetchpop is disabled by default. -->
-
+ <!-- above. This block is disabled by default. -->
<fetchpop enabled="false">
- <!-- you can have as many fetch tasks as you want to -->
- <!-- but each must have a unique name to identify itself by -->
+ <!-- You can have as many fetch tasks as you want, but each must have a -->
+ <!-- unique name by which it identified -->
<fetch name="mydomain.com">
- <!-- host name or IP address -->
+ <!-- Host name or IP address -->
<host>mail.mydomain.com</host>
- <!-- acount login username -->
+ <!-- Account login username -->
<user>username</user>
- <!-- account login password -->
+ <!-- Account login password -->
<password>pass</password>
- <!-- Interval to check this account in milliseconds, 600000 is every
ten minutes -->
+ <!-- How frequently this account is checked - in milliseconds. 600000
is every ten minutes -->
<interval>600000</interval>
</fetch>
</fetchpop>
-
-
+
+
<!-- The James Spool Manager block -->
+ <!-- -->
+ <!-- This block is responsible for processing messages on the spool. -->
<spoolmanager>
- <!-- number of spool threads -->
+ <!-- Number of spool threads -->
<threads> 10 </threads>
- <!-- Set the packages from which to load mailets and matches -->
+ <!-- Set the Java packages from which to load mailets and matchers -->
<mailetpackages>
<mailetpackage>org.apache.james.transport.mailets</mailetpackage>
</mailetpackages>
@@ -99,18 +115,28 @@
<matcherpackage>org.apache.james.transport.matchers</matcherpackage>
</matcherpackages>
- <!-- Processor CONFIGURATION SAMPLE: root is the first processor all mail
enters-->
+ <!-- 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">
- <!-- Checks that the MAIL FROM command was for a valid domain. Important
for spam prevention. -->
- <!--<mailet match="SenderInFakeDomain" class="ToProcessor">
+ <!-- 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" class="ToProcessor">
<processor> spam </processor>
- </mailet> -->
+ </mailet>
+ -->
- <!-- Important check to avoid race conditions -->
+ <!-- Important check to avoid looping -->
<mailet match="RelayLimit=30" class="Null"/>
<!-- 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=blackholes.mail-abuse.org"
class="ToProcessor">
<processor> spam </processor>
<notice> Rejected - see http://www.mail-abuse.org/rbl/ </notice>
@@ -125,7 +151,9 @@
</mailet>
<!-- Sample matching to kill a message (send to Null) -->
+ <!--
<mailet match="RecipientIs=badboy@badhost" class="Null"/>
+ -->
<!-- Send remaining mails to the transport processor for either local or
remote delivery -->
<mailet match="All" class="ToProcessor">
@@ -133,59 +161,80 @@
</mailet>
</processor>
- <!-- Processor CONFIGURATION SAMPLE: error is the processor mails with
failure conditions enter -->
+ <!-- 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">
<!-- Logs any messages to the repository specified -->
<mailet match="All" class="ToRepository">
<repositoryPath> file://var/mail/error/</repositoryPath>
- <!-- alternative database repository example below -->
- <!-- <repositoryPath> db://maildb/deadletter/error </repositoryPath> -->
+ <!-- An alternative database repository example follows. -->
+ <!--
+ <repositoryPath> db://maildb/deadletter/error </repositoryPath>
+ -->
<passThrough> true </passThrough>
</mailet>
- <!-- If you want to notify the sender their message generated an error,
uncomment this -->
- <!--<mailet match="All" class="NotifySender"/>-->
+ <!-- If you want to notify the sender their message generated an error,
uncomment this -->
+ <!--
+ <mailet match="All" class="NotifySender"/>
+ -->
<!-- If you want to notify the postmaster that a message generated an
error, uncomment this -->
- <!--<mailet match="All" class="NotifyPostmaster"/>-->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
</processor>
- <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor
for local or remote delivery -->
+ <!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor
for local or -->
+ <!-- remote delivery -->
<processor name="transport">
<!-- Is the recipient is for a local account, deliver it locally -->
<mailet match="RecipientIsLocal" class="LocalDelivery"/>
- <!-- If the host is handled by this server and it did not get locally
delivered, this is an invalid recipient -->
+ <!-- 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>error</processor>
</mailet>
- <!-- CHECKME! Anti-relay mailet: Add your network address here,
- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*"-->
-
- <!-- This matcher-mailet pair can prevent relaying...
- if you change this, you risk making your mail server an open relay point
for spam.
-
- NOTE 1: the order of matcher-mailets is important: it must come
after
- valid local recipients have been dealt with but before any attempt
is
- made to delivery the mail remotely.
-
- NOTE 2: Add your own network, if you want to relay mail outwards
-
- NOTE 3: If you use SMTP AUTH, you may want to comment this out
- so users who are on the road can still use the server -->
-
+<!-- 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. -->
+ <!-- -->
+ <!-- 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> spam </processor>
</mailet>
- <!-- Attempt remote delivery using the specified repository for the spool,
- using delay time to retry delivery and the maximum number of retries
-->
+ <!-- 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">
<outgoing> file://var/mail/outgoing/ </outgoing>
- <!-- alternative database repository example below -->
- <!-- <outgoing> db://maildb/spool/outgoing </outgoing> -->
+ <!-- alternative database repository example below -->
+ <!--
+ <outgoing> db://maildb/spool/outgoing </outgoing>
+ -->
<!-- Number of milliseconds between delivery attempts -->
<delayTime> 21600000 </delayTime>
@@ -196,66 +245,97 @@
<!-- The number of threads that should be trying to deliver outgoing
messages -->
<deliveryThreads> 1 </deliveryThreads>
- <!-- A single mail server to deliver all outgoing messages.
- This is useful if this is a backup or failover machine,
- or if you otherwise want all messages to be sent only to particular
mail server,
- regardless of the email addresses specified in the message -->
- <!--<gateway> otherserver.mydomain.com </gateway>-->
-
- <!-- If your gateway mail server is listening on a port other than 25,
- you can set James to connect to it on that port -->
- <!--<gatewayPort> 25 </gatewayPort>-->
+ <!-- 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. -->
+ <!--
+ <gateway> otherserver.mydomain.com </gateway>
+ <gatewayPort>25</gatewayPort>
+ -->
</mailet>
</processor>
- <!-- Processor CONFIGURATION SAMPLE: spam is where messages detected as
relaying or other problems will get sent.
- You can either log these, bounce these, or just ignore them. -->
+ <!-- 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">
- <!-- If you wanted, you could just destroy messages, uncomment this
matcher/mailet-->
- <!--<mailet match="All" class="Null"/>-->
+ <!-- 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="NotifySender"/>
+ -->
+
+ <!-- To notify the postmaster that a message was marked as spam, uncomment
this matcher/mailet configuration -->
+ <!--
+ <mailet match="All" class="NotifyPostmaster"/>
+ -->
- <!-- If you want to notify the sender their message was marked as spam,
uncomment this-->
- <!--<mailet match="All" class="NotifySender"/>-->
-
- <!-- If you want to notify the postmaster that a message was marked as
spam, uncomment this-->
- <!--<mailet match="All" class="NotifyPostmaster"/>-->
-
- <!-- Out of the box, this will log the message to a repository -->
+ <!-- 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>
- <!-- alternative database repository example below -->
- <!-- <repositoryPath> db://maildb/deadletter/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>
</spoolmanager>
-<!-- CONFIRM? Enter ip address of your DNS server, one per element -->
+ <!-- DNS Server Block -->
+ <!-- -->
+ <!-- Specifies DNS Server information for use by various components inside -->
+ <!-- James. -->
+ <!-- -->
+ <!-- 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>
+<!-- CONFIRM? -->
+ <!--Enter ip address of your DNS server, one IP address per server -->
+ <!-- element. The default configuration assumes a DNS server on the
localhost. -->
<server>127.0.0.1</server>
- <!--<server> put extra dns server address here </server>-->
</servers>
<authoritative>false</authoritative>
</dnsserver>
<remotemanager>
<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>-->
+ <!-- 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>
- <!-- helloName is the single host name this instance of James will
- use to identify itself for example, in SMTP and POP3 greetings. If
- autodetect is TRUE, James will attempt to discover its own name OR
- use 'localhost'. If autodetect is FALSE, James will use the value
- given OR 'localhost' -->
+ <!-- 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 password! -->
-<!-- FILL ME!!!!!! You must provide a password for your administrator accounts
(cannot be blank) -->
+<!-- CHECKME! -->
+ <!-- Change the default login/password. -->
<account login="root" password="root"/>
</administrator_accounts>
<connectiontimeout> 60000 </connectiontimeout>
@@ -264,22 +344,27 @@
<!-- WARNING - The IMAP server is only experimental, ie pre-alpha -->
<imapserver>
- <port>143</port>
- <!-- <port>995</port> -->
- <!-- need to check what if any IMAP over SSL uses -->
- <!-- <bind> </bind> uncomment this if you want to bind to a specific
- inetaddress-->
- <!-- <useTLS>TRUE</useTLS> uncomment this if you want to use TLS (SSL)
- on this port -->
- <handler>
- <!-- helloName is the single host name this instance of James will
- use to identify itself for example, in SMTP and POP3 greetings. If
- autodetect is TRUE, James will attempt to discover its own name OR
- use 'localhost'. If autodetect is FALSE, James will use the value
- given OR 'localhost' -->
- <helloName autodetect="TRUE">myMailServer</helloName>
- <connectiontimeout>1800000</connectiontimeout>
- </handler>
+ <port>143</port>
+ <!-- <port>995</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>
+ <!-- helloName is the single host name this instance of James will -->
+ <!-- use to identify itself for example, in SMTP and POP3 greetings. -->
+ <!-- If autodetect is TRUE, James will attempt to discover its own name -->
+ <!-- OR use 'localhost'. -->
+ <!-- If autodetect is FALSE, James will use the value provided -->
+ <!-- OR use 'localhost'-->
+ <helloName autodetect="TRUE">myMailServer</helloName>
+ <connectiontimeout>1800000</connectiontimeout>
+ </handler>
</imapserver>
<imaphost>
@@ -305,17 +390,21 @@
<!-- port 100 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>-->
+ <!-- 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>
- <!-- helloName is the single host name this instance of James will
- use to identify itself for example, in SMTP and POP3 greetings. If
- autodetect is TRUE, James will attempt to discover its own name OR
- use 'localhost'. If autodetect is FALSE, James will use the value
- given OR 'localhost' -->
+ <!-- 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>
@@ -325,56 +414,68 @@
<!-- 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 -->
- <!--<bind> </bind>-->
- <!-- uncomment this if you want to use TLS (SSL) on this port -->
- <!--<useTLS>true</useTLS>-->
+ <!-- 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>
- <!--helloName is the single host name this instance of James will
- use to identify itself for example, in SMTP and POP3 greetings. If
- autodetect is TRUE, James will attempt to discover its own name OR
- use 'localhost'. If autodetect is FALSE, James will use the value
- given OR 'localhost' -->
+ <!-- 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
- SMTP AUTH support. This is useful if you have users who need to use
- the email server on the road, while not having your server act as an
- open relay! -->
- <!--<authRequired>true</authRequired>-->
- <!-- uncomment this if you want
- to verify that the MAIL FROM: address is the same user that
- authenticated. This prevents a user of your mail server from acting
- as somebody else -->
- <!--<verifyIdentity>true</verifyIdentity>-->
- <!-- This sets the maximum allowed message size for the smtphandler
- in KBytes. The value defaults to 0, which means no limit. -->
+
+ <!-- Uncomment this if you want to require SMTP authentication. -->
+ <!--
+ <authRequired>true</authRequired>
+ -->
+
+ <!-- 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>
</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 -->
<nntpserver enabled="true">
- <!-- 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 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>-->
+ <!-- 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>
- <!-- helloName is the single host name this instance of James will
- use to identify itself for example, in SMTP and POP3 greetings. If
- autodetect is TRUE, James will attempt to discover its own name OR
- use 'localhost'. If autodetect is FALSE, James will use the value
- given OR 'localhost' -->
+ <!-- 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 -->
+ <!-- will use the specified value. -->
<helloName autodetect="true">myMailServer</helloName>
<connectiontimeout>120000</connectiontimeout>
<!-- Set the authRequired value to true to enable authenticated NNTP -->
@@ -383,15 +484,15 @@
</nntpserver>
<nntp-repository>
- <!-- make this true to disallow posting to all newsgroups-->
+ <!-- If this is set to true, posting will be disallowed. -->
<readOnly>false</readOnly>
- <rootPath>file:///var/nntp/groups</rootPath>
- <tempPath>file:///var/nntp/temp</tempPath>
- <articleIDPath>file:///var/nntp/articleid</articleIDPath>
+ <rootPath>file://var/nntp/groups</rootPath>
+ <tempPath>file://var/nntp/temp</tempPath>
+ <articleIDPath>file://var/nntp/articleid</articleIDPath>
<articleIDDomainSuffix>news.james.apache.org</articleIDDomainSuffix>
- <!-- these additional news groups would be created and exposed-->
+ <!-- The news groups hosted in this NNTP repository. -->
<newsgroups>
<newsgroup>org.apache.james.dev</newsgroup>
<newsgroup>org.apache.james.user</newsgroup>
@@ -401,18 +502,21 @@
<spool>
<configuration>
- <spoolPath>file:///var/nntp/spool</spoolPath>
- <!-- number of threads that process spooler related tasks -->
+ <spoolPath>file://var/nntp/spool</spoolPath>
+ <!-- The number of threads that process spooler related tasks. -->
<threadCount>1</threadCount>
- <!-- the spool thread(s) should idle for some time, if it has nothing
to do -->
+ <!-- The spool thread(s) should idle for some time, if it has nothing
to do -->
<threadIdleTime>1000</threadIdleTime>
</configuration>
</spool>
-
</nntp-repository>
- <!-- The High Level Storage block -->
+
+ <!-- The Mailstore block -->
<mailstore>
<repositories>
+
+ <!-- File based repositories. These repositories store all message data
-->
+ <!-- in the file system. -->
<repository class="org.apache.james.mailrepository.AvalonMailRepository">
<protocols>
<protocol>file</protocol>
@@ -429,7 +533,9 @@
<type>SPOOL</type>
</types>
</repository>
- <!-- These repositories store the entire message in the database -->
+
+ <!-- JDBC based repositories. These repositories store all message data
-->
+ <!-- in the database. -->
<repository class="org.apache.james.mailrepository.JDBCMailRepository">
<protocols>
<protocol>db</protocol>
@@ -441,6 +547,7 @@
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</config>
</repository>
+
<repository class="org.apache.james.mailrepository.JDBCSpoolRepository">
<protocols>
<protocol>db</protocol>
@@ -452,6 +559,7 @@
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</config>
</repository>
+
<!-- These repositories store message delivery and headers in the DB, and
the body to the filesystem -->
<repository class="org.apache.james.mailrepository.JDBCMailRepository">
<protocols>
@@ -465,6 +573,7 @@
<filestore>file://var/dbmail</filestore>
</config>
</repository>
+
<repository class="org.apache.james.mailrepository.JDBCSpoolRepository">
<protocols>
<protocol>dbfile</protocol>
@@ -480,33 +589,38 @@
</repositories>
<!-- Spool repository configuration -->
- <!-- The spool repository is the single location where incoming mails are
temporarily stored before being processed.
- (ex. file://c:/james/spool/) -->
- <!-- Default setting: file based repository - enter path ( :/// for absolute)
-->
+ <!-- The spool repository is the location where incoming mails are
temporarily stored -->
+ <!-- before being processed. -->
<spoolRepository>
<repository destinationURL="file://var/mail/spool/" type="SPOOL"/>
</spoolRepository>
<!-- Alternative spool repository definition for JDBC use -->
- <!--<spoolRepository>
+ <!--
+ <spoolRepository>
<repository destinationURL="db://maildb/spool/spool" type="SPOOL"/>
- </spoolRepository>-->
+ </spoolRepository>
+ -->
</mailstore>
<!-- The User Storage block -->
<users-store>
- <!-- Configure User Repositories here.
- User repositories are required for the following purposes:
- - holding information about Users of the James mail server
- - holding lists of users for the listserv mailet
- Currently, two different storage options are available:
- - file-based storage using Java serialization
- - database-backed storage
- (Use of database or file-system is defined on a "per-repository" basis)
- Note: Two user repositories are required for default configuration:
- LocalUsers - the users for whom you are providing POP3, NNTP, or AUTH service
- list-james - the users of the james@localhost mailiinglist-->
+ <!-- Configure User Repositories here. -->
+ <!-- -->
+ <!-- User repositories are required for the following purposes: -->
+ <!-- - storing James user information, including forwards, aliases, -->
+ <!-- and authentication data. -->
+ <!-- - holding lists of users for the listserv mailet -->
+ <!-- Currently, two different storage options are available: -->
+ <!-- - file-based storage using Java serialization -->
+ <!-- - database-backed storage -->
+ <!-- (Use of database or file-system is defined on a "per-repository" basis)
-->
+ <!-- -->
+ <!-- Note: One user repository is required for James: -->
+ <!-- LocalUsers - the users for whom you are providing POP3, NNTP, or SMTP
service -->
+ <!-- -->
+ <!-- Other repositories may be used by matchers or mailets. -->
<!-- Default: File-based user repositories Use these configurations to store
user info in the filesystem -->
<!-- The LocalUsers repository, for storing James' User info. -->
@@ -514,61 +628,67 @@
<destination URL="file://var/users/"/>
</repository>
- <!-- The list used by the default ListServ mailet -->
- <repository name="list-james"
class="org.apache.james.userrepository.UsersFileRepository">
- <destination URL="file://var/lists/list-james/"/>
- </repository>
-
- <!-- Database backed user repositories
- Use these configurations to store user info in a database.
- Note: the <data-source> element must refer to a connection configured
- in the <database-connections> configuration section. -->
+ <!-- Database backed user repositories -->
+ <!-- -->
+ <!-- Use these configurations to store user info in a database. -->
+ <!-- Note: The <data-source> element must refer to a connection configured -->
+ <!-- in the <database-connections> configuration section. -->
<!-- The LocalUsers repository, for storing James' User info. -->
- <!--<repository name="LocalUsers"
class="org.apache.james.userrepository.JamesUsersJdbcRepository"
destinationURL="db://maildb/users">
+ <!--
+ <repository name="LocalUsers"
class="org.apache.james.userrepository.JamesUsersJdbcRepository"
destinationURL="db://maildb/users">
<sqlFile>file://conf/sqlResources.xml</sqlFile>
- </repository>-->
+ </repository>
+ -->
- <!-- The list used by the default ListServ mailet -->
- <!--<repository name="list-james"
class="org.apache.james.userrepository.ListUsersJdbcRepository"
destinationURL="db://maildb/lists/list-james">
- <sqlFile>file://conf/sqlResources.xml</sqlFile>
- </repository>-->
</users-store>
<!-- The database-connections block -->
<database-connections>
- <!-- Configure database connections here. These connections are referred to
by name elsewhere in the config file -->
- <!-- CHECKME! To allow James to use a database, configure the database
connection here -->
+ <!-- These connections are referred to by name elsewhere in the config file
-->
+<!-- CHECKME! -->
+ <!-- To allow James to use a database you must configure the database
connection here. -->
+ <!-- If you are not using a database, you can leave this section unchanged.
-->
+ <!-- These connections are referred to by name in URLs elsewhere in the
config file. -->
<data-sources>
- <!-- James is distributed with a built in relevant copy of the mm.mysql
JDBC -->
- <!-- driver no additional driver is needed for mysql. Read the mm.mysql
LGPL -->
- <!-- licence at apps\james\SAR-INF\lib\mm.mysql.LICENCE
-->
+ <!-- James is distributed with a built in relevant copy of the mm.mysql
JDBC -->
+ <!-- driver. No additional driver is needed for mysql. Read the mm.mysql
LGPL -->
+ <!-- license at apps\james\SAR-INF\lib\mm.mysql.LICENCE
-->
<!-- JDBC driver .jar libraries for other RDBMS can be placed in
~james/lib/ -->
<!-- Example, connecting to a MySQL database called "mail" on localhost-->
- <!--<data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
+ <!-- -->
+ <!-- The max value is the maximum number of concurrent connections James
will -->
+ <!-- open to this database-->
+ <!-- If you see "SQLException: Giving up... no connections available." in
your -->
+ <!-- log files or bounced mail you should increase this value -->
+ <!--
+ <data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>org.gjt.mm.mysql.Driver</driver>
<dburl>jdbc:mysql://127.0.0.1/mail</dburl>
<user>username</user>
- <password>password</password> -->
- <!-- Maximum concurrent connections james may open to this
database-->
- <!-- If you see "SQLException: Giving up... no connections
available." in your
- log files or bounced mail increase this value
- <max>10</max>
- </data-source>-->
-
- <!--<data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
+ <password>password</password>
+ <max>20</max>
+ </data-source>
+ -->
+
+ <!-- Example, connecting to a Microsoft MSSQL database called "mail" on
localhost-->
+ <!-- -->
+ <!-- The max value is the maximum number of concurrent connections James
will -->
+ <!-- open to this database-->
+ <!-- If you see "SQLException: Giving up... no connections available." in
your -->
+ <!-- log files or bounced mail you should increase this value -->
+ <!--
+ <data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>com.inet.tds.TdsDriver</driver>
<dburl>jdbc:inetdae7:127.0.0.1?database=James</dburl>
<user>sa_james</user>
- <password>blahblah</password> -->
- <!-- Maximum concurrent connections james may open to this
database-->
- <!-- If you see "SQLException: Giving up... no connections
available." in your
- log files or bounced mail increase this value
- <max>10</max>
- </data-source>-->
+ <password>blahblah</password>
+ <max>20</max>
+ </data-source>
+ -->
</data-sources>
</database-connections>
@@ -586,7 +706,9 @@
<!-- attempting to adjust this section. -->
<!-- -->
- <!-- The Storage block -->
+ <!-- The Object Storage block -->
+ <!-- -->
+ <!-- Defines file storage details that are used for file-based repositories. -->
<objectstorage>
<repositories>
<repository
class="org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Object_Repository">
@@ -602,6 +724,7 @@
<model>CACHE</model>
</models>
</repository>
+
<repository
class="org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Stream_Repository">
<protocols>
<protocol>file</protocol>
@@ -617,6 +740,7 @@
</repository>
</repositories>
</objectstorage>
+
<!-- The Connection Manager block -->
<!-- -->
<!-- The idle-timeout is the number of milliseconds that it will take for idle
-->
@@ -624,8 +748,9 @@
<!-- If no value is specified, the value defaults to 5 minutes, 300000
milliseconds -->
<!-- A value of 0 means that client sockets will not timeout. -->
<!-- -->
- <!-- The max-connections parameter specifies the maximum number of client
connections -->
- <!-- that this connection manager will allow per managed server socket. -->
+ <!-- The max-connections parameter specifies the default maximum number of
client -->
+ <!-- connections that this connection manager will allow per managed server
socket. -->
+ <!-- This value can be overridden by each individual service. -->
<!-- If no value is specified, the value defaults to 30. -->
<!-- A value of 0 means that there is no limit imposed by the connection
manager, although -->
<!-- resource limitations imposed by other components (i.e. max # of threads)
may -->
@@ -635,6 +760,7 @@
<idle-timeout>300000</idle-timeout>
<max-connections>30</max-connections>
</connections>
+
<!-- The Socket Manager block -->
<!-- -->
<!-- The server-sockets element has a number of factory sub-elements. -->
@@ -656,7 +782,8 @@
<sockets>
<server-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"/>
- <!--<factory name="ssl"
class="org.apache.avalon.cornerstone.blocks.sockets.TLSServerSocketFactory">
+ <!--
+ <factory name="ssl"
class="org.apache.avalon.cornerstone.blocks.sockets.TLSServerSocketFactory">
<keystore>
<file>conf/keystore</file>
<password>secret</password>
@@ -665,21 +792,38 @@
<algorithm>SunX509</algorithm>
<authenticate-client>false</authenticate-client>
</keystore>
- </factory>-->
+ </factory>
+ -->
</server-sockets>
<client-sockets>
<factory name="plain"
class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"/>
</client-sockets>
</sockets>
+
+ <!-- The Thread Manager block -->
+ <!-- -->
+ <!-- The thread manager provides thread pools for use throughout the server. -->
+ <!-- -->
+ <!-- A thread pool with the name "default" must be defined in this thread
manager -->
+ <!-- configuration. -->
+ <!-- -->
+ <!-- Each thread pool is defined with a "thread-group" element. -->
+ <!-- Each of these elements has the following required sub-elements: -->
+ <!-- name - the name of the thread pool, used by other components to -->
+ <!-- lookup the thread pool -->
+ <!-- priority - the thread priority for threads in the pool. This is -->
+ <!-- a value between 0 and 10, with 5 being the normal -->
+ <!-- priority and 10 being the maximum. -->
+ <!-- is-daemon - whether the threads in the pool are daemon threads. -->
+ <!-- max-threads - the maximum number of threads allowed in the pool. -->
+ <!-- min-threads - the minimum number of threads allowed in the pool. (not
implemented) -->
+ <!-- min-spare-threads - (not implemented) -->
<thread-manager>
<thread-group>
<name>default</name>
- <!-- normal priority == 5, max-priority = 10 -->
<priority>5</priority>
- <!-- are threads daemon threads ? -->
<is-daemon>false</is-daemon>
<max-threads>100</max-threads>
- <!-- these are ignored at the moment but will be fixed in later revisions
-->
<min-threads>20</min-threads>
<min-spare-threads>20</min-spare-threads>
</thread-group>
1.4 +1 -1 jakarta-james/proposals/imap/conf/james-server.xml
Index: james-server.xml
===================================================================
RCS file: /home/cvs/jakarta-james/proposals/imap/conf/james-server.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- james-server.xml 14 Oct 2002 07:03:49 -0000 1.3
+++ james-server.xml 11 Nov 2002 04:44:40 -0000 1.4
@@ -26,7 +26,7 @@
<category name="remotemanager" log-level="DEBUG">
<log-target id-ref="remotemanager-target"/>
</category>
- <category name="imapserver" log-level="DEBUG"/>
+ <category name="imapserver" log-level="DEBUG">
<log-target id-ref="imapserver-target"/>
</category>
<category name="pop3server" log-level="DEBUG">
1.7 +0 -1
jakarta-james/proposals/imap/java/org/apache/james/imapserver/BaseCommand.java
Index: BaseCommand.java
===================================================================
RCS file:
/home/cvs/jakarta-james/proposals/imap/java/org/apache/james/imapserver/BaseCommand.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- BaseCommand.java 17 Sep 2002 17:00:38 -0000 1.6
+++ BaseCommand.java 11 Nov 2002 04:44:40 -0000 1.7
@@ -7,7 +7,6 @@
*/
package org.apache.james.imapserver;
-import org.apache.james.BaseConnectionHandler;
import org.apache.james.imapserver.AccessControlException;
import java.util.*;
1.9 +2 -2
jakarta-james/proposals/imap/java/org/apache/james/imapserver/CommandFetch.java
Index: CommandFetch.java
===================================================================
RCS file:
/home/cvs/jakarta-james/proposals/imap/java/org/apache/james/imapserver/CommandFetch.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- CommandFetch.java 17 Sep 2002 17:00:38 -0000 1.8
+++ CommandFetch.java 11 Nov 2002 04:44:40 -0000 1.9
@@ -59,9 +59,9 @@
public boolean process( ImapRequest request, ImapSession session )
{
setRequest( request );
- StringTokenizer txt = request.getCommandLine();
+ StringTokenizer txt = request.getCommandLine();
-/* System.out.println("CommandFetch.process: #args="+txt.countTokens());
+/* System.out.println("CommandFetch.process: #args="+txt.countTokens());
while (txt.hasMoreTokens()) {
System.out.println("CommandFetch.process: arg='"+txt.nextToken()+"'");
}
1.9 +1 -1
jakarta-james/proposals/imap/java/org/apache/james/imapserver/FileMailbox.java
Index: FileMailbox.java
===================================================================
RCS file:
/home/cvs/jakarta-james/proposals/imap/java/org/apache/james/imapserver/FileMailbox.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FileMailbox.java 17 Sep 2002 17:00:38 -0000 1.8
+++ FileMailbox.java 11 Nov 2002 04:44:40 -0000 1.9
@@ -1215,7 +1215,7 @@
//BufferedInputStream inMsg = null;
try {
path = getPath( absoluteName, owner, rootPath );
- MimeMessageFileSource source = new MimeMessageFileSource(path +
File.separator + uid + MESSAGE_EXTENSION);
+ MimeMessageFileSource source = new MimeMessageFileSource(path +
File.separator + uid + MESSAGE_EXTENSION);
response = new MimeMessageWrapper(source);
// inMsg.close();
} catch(Exception e) {
1.7 +2 -2
jakarta-james/proposals/imap/java/org/apache/james/imapserver/SimpleMessageAttributes.java
Index: SimpleMessageAttributes.java
===================================================================
RCS file:
/home/cvs/jakarta-james/proposals/imap/java/org/apache/james/imapserver/SimpleMessageAttributes.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SimpleMessageAttributes.java 16 Sep 2002 23:06:38 -0000 1.6
+++ SimpleMessageAttributes.java 11 Nov 2002 04:44:41 -0000 1.7
@@ -78,7 +78,7 @@
private String contentEncoding;
SimpleMessageAttributes() {
- System.out.println("SimpleMessageAttributes()");
+ System.out.println("SimpleMessageAttributes()");
// new Throwable().printStackTrace();
}
@@ -296,7 +296,7 @@
msgAttrs.setAttributesFor(message);
if (part instanceof MimeMessage) {
- Comments out because I don't know what
it should do here
+ Comments out because I don't know what it should do here
MimeMessage msg1 = (MimeMessage) part;
MimeMessageWrapper message2 = new MimeMessageWrapper(msg1);
SimpleMessageAttributes msgAttrs2 = new
SimpleMessageAttributes();
1.1
jakarta-james/proposals/imap/java/org/apache/james/imapserver/BaseConnectionHandler.java
Index: BaseConnectionHandler.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.james.imapserver;
import org.apache.avalon.cornerstone.services.connection.ConnectionHandler;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* THIS FILE RETRIEVED FROM THE MAIN TRUNK ATTIC, TO ENABLE IMAP PROPOSAL
* TO COMPILE - EXTENDED BY o.a.james.imapserver.BaseCommand.
* TODO: Use the AbstractJamesService for ImapServer, and get rid of this file.
*
* Different connection handlers extend this class
* Common Connection Handler code could be factored into this class.
* At present(April 28' 2001) there is not much in this class
*
* @author Harmeet Bedi <[EMAIL PROTECTED]>
*/
public class BaseConnectionHandler extends AbstractLogEnabled implements
Configurable {
/**
* The default timeout for the connection
*/
private static int DEFAULT_TIMEOUT = 1800000;
/**
* The timeout for the connection
*/
protected int timeout = DEFAULT_TIMEOUT;
/**
* The hello name for the connection
*/
protected String helloName;
/**
* Get the hello name for this server
*
* @param configuration a configuration object containing server name
configuration info
* @return the hello name for this server
*/
public static String configHelloName(final Configuration configuration)
throws ConfigurationException {
String hostName = null;
try {
hostName = InetAddress.getLocalHost().getHostName();
} catch (UnknownHostException ue) {
// Default to localhost if we can't get the local host name.
hostName = "localhost";
}
Configuration helloConf = configuration.getChild("helloName");
boolean autodetect = helloConf.getAttributeAsBoolean("autodetect", true);
return autodetect ? hostName : helloConf.getValue("localhost");
}
/**
* @see
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
*/
public void configure( final Configuration configuration )
throws ConfigurationException {
timeout = configuration.getChild( "connectiontimeout" ).getValueAsInteger(
DEFAULT_TIMEOUT );
helloName = configHelloName(configuration);
if (getLogger().isDebugEnabled()) {
getLogger().debug("Hello Name is: " + helloName);
}
}
/**
* Release a previously created ConnectionHandler e.g. for spooling.
*
* @param connectionHandler the ConnectionHandler to be released
*/
public void releaseConnectionHandler(ConnectionHandler connectionHandler) {
}
}
1.8 +1 -1
jakarta-james/proposals/imap/java/org/apache/james/imapserver/commands/CommandTemplate.java
Index: CommandTemplate.java
===================================================================
RCS file:
/home/cvs/jakarta-james/proposals/imap/java/org/apache/james/imapserver/commands/CommandTemplate.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CommandTemplate.java 17 Sep 2002 17:00:39 -0000 1.7
+++ CommandTemplate.java 11 Nov 2002 04:44:41 -0000 1.8
@@ -68,7 +68,7 @@
List args = getArgs();
List argValues = new ArrayList();
- System.out.println("CommandTemplate.process command: '"+getCommand()+"'");
+ System.out.println("CommandTemplate.process command: '"+getCommand()+"'");
for ( Iterator iter = args.iterator(); iter.hasNext(); ) {
System.out.println("CommandTemplate.process ARGUMENT");
Object o = iter.next();
--
To unsubscribe, e-mail: <mailto:james-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@;jakarta.apache.org>