james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joac...@apache.org
Subject svn commit: r487125 [3/4] - in /james/server/sandbox/spring-integration: ./ src/main/java/org/apache/james/container/spring/adaptor/ src/main/java/org/apache/james/container/spring/lifecycle/ src/main/java/org/apache/james/container/spring/processor/ s...
Date Thu, 14 Dec 2006 08:18:51 GMT
Added: james/server/sandbox/spring-integration/src/trunk/config/james-fetchmail.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/james-fetchmail.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/james-fetchmail.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/james-fetchmail.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,252 @@
+   <!-- Fetch mail block, fetches mail from message servers and inserts it into the incoming spool -->
+   <!-- Warning: It is important to prevent mail from looping by setting the  -->
+   <!-- fetched domains in the <servernames> section of the <James> block      -->
+   <!-- above. This block is disabled by default.                              -->
+      
+   <!-- See http://james.apache.org/server/2.3.0/fetchmail_configuration.html for detailed -->
+   <!-- configuration instructions and examples.                                  -->   
+
+   <!-- I M P O R T A N T -->
+   <!-- Setting markseen="true" will have no effect on many POP3 servers as the POP3 -->
+   <!-- protocol does not require the markSeen flag to be supported. When this is the -->
+   <!-- case, the only way to ensure that messages are fetched just once is to delete -->
+   <!-- fetched messages from the server with leaveonserver="false". -->
+   
+   <!-- If you want to perform mailet processing on messages fetched by fetchmail, -->
+   <!-- use the HasMailAttribute matcher to detect messages with the MailAttribute -->
+   <!-- org.apache.james.fetchmail.taskName. The attribute's value is that of the -->
+   <!-- fetch task's name parameter described below. -->
+   
+    <fetchmail enabled="false">
+        <!-- You can have as many fetch tasks as you want, but each must have a -->
+        <!-- unique name by which it is identified. -->
+        <!-- Each task runs at the specified <interval>, tasks may run concurrently. -->      
+        <fetch name="mydomain.com">
+            <!-- There must be one <accounts> entry per fetch task. An accounts entry can have 0 to many -->
+            <!-- <account> entries and 0 or 1 <alllocal> entries. <alllocal> generates -->
+            <!-- <accounts> for every user defined to James. <accounts> run consecutively within the -->
+            <!-- scope of their fetch task and inherit all the properties of the fetch task. -->
+            
+            <!-- The advantage of running consecutively is that we can avoid conflicting fetch tasks -->
+            <!-- operating concurrently on the same mailboxes. -->
+            
+            <!-- Fetchmail attempts to deduce the correct recipient of each message, but sometimes there is -->
+            <!-- insufficient information in the headers to do so. When the correct recipient cannot be deduced, -->
+            <!-- fetchmail can be configured to leave the mail on the server or deliver it to a default recipient. -->          
+            
+            <!-- When a message server delivers mail for a single user to a specific INBOX you can define -->
+            <!-- each user to James (via the console) and use <alllocal> with ignorercpt-header="true" to deliver mail -->
+            <!-- directly from each users INBOX onto James' spool. There is no need to update 'config.xml' -->
+            <!-- each time you add or remove users, fetchmail checks the list of users at the start of each fetch. -->
+            
+            <!-- When a message server provides an account that gives access to all mail for a domain through a single -->
+            <!-- INBOX, you can use an <account> to fetch all the mail for that domain, using the filter facilities -->
+            <!-- described below to reject unwanted messages. -->
+            
+            <!-- When a message server supports BOTH delivery for a single user to a specific INBOX and access to all mail -->
+            <!-- for a domain through a single INBOX, you can use <alllocal> and <account> together to guarantee that all -->
+            <!-- local mail gets delivered to the correct user and all unwanted mail is deleted from the message -->
+            <!-- server. See http://james.apache.org/server/2.3.0/fetchmail_configuration.html for details. -->
+            
+            <!-- Limitations and Future Directions -->
+            <!-- 1) <alllocal> requires the password for all accounts for a domain on the message server be the same. True -->
+            <!-- in many cases, but not all. A future version might work out a way of associating James users with a set -->
+            <!-- of account properties. -->
+            <!-- 2) <alllocal> will try to access an INBOX on the message server for all local users. The instance of James used -->
+            <!-- for this purpose should not have extraneous users defined. This is inefficient, but not fatal. -->
+            <!-- Again, a future version might work out a way of associating James users with message account properties. -->
+            <!-- This would allow all local users with an account on a particular message server to be fetched. -->
+            
+            <accounts>
+                <alllocal userprefix="" usersuffix="@myaccount" password="password" recipientprefix="" recipientsuffix="@mydomain.com" ignorercpt-header="true"/>
+                <account user="myglobalaccount" password="password" recipient="postmaster@localhost" ignorercpt-header="false"/>
+                <!-- Custom recipient header handling -->
+                <!-- this example search an header named X-Envelope-To and use the recipient found in that header -->
+                <!-- 
+                <account customrcpt-header="X-Envelope-To" user="myglobalaccount" password="password" recipient="postmaster@localhost" ignorercpt-header="false"/>
+                 -->
+            </accounts>
+            
+            <!-- The address of the server from which to fetch the mail -->
+            <host>pop.server.com</host>
+                      
+            <!-- How frequently this host is checked - in milliseconds. 600000 is every ten minutes -->
+            <interval>600000</interval>
+            
+            <!-- name of the javamail provider you wish to use -->
+            <!-- (pop3, imap, etc. -->
+            <javaMailProviderName>pop3</javaMailProviderName>
+
+            <!-- name of the folder to open -->
+            <javaMailFolderName>INBOX</javaMailFolderName>
+            
+            <!-- Properties to be applied to the JavaMail Session. -->
+            <!-- Properties are specific to the selected JavaMail provider. -->
+            <!-- Any number may be specified. -->
+            <javaMailProperties>
+                <!-- Set the connection timeout to 3 minutes -->
+                <property name="mail.pop3.connectiontimeout" value="180000"/>
+                <!-- Set the I/O timeout to 3 minutes -->                
+                <property name="mail.pop3.timeout" value="180000"/>                
+            </javaMailProperties>            
+
+            <!-- Retrieve both old (seen) and new messages from mailserver.  The default -->
+            <!-- is to fetch only messages the server has not marked as seen -->
+            <fetchall>false</fetchall>
+
+            <!-- If the folder javaMailFolderName contains subfolders do you -->
+            <!-- want to recurse into the subfolders as well? true = yes, false = no -->
+            <recursesubfolders>false</recursesubfolders>
+
+            <!-- If the From: header of a fetched message has a valid user part -->
+            <!-- but no domain part the fetch task will correct this by appending -->
+            <!-- a default domain. eg: 'james' becomes 'james@defaultdomain' --> 
+            <!-- The default behaviour is to append the canonical host name of the James server.  -->
+            <!-- You can override this behaviour here by specifying the name of the domain -->
+            <!-- you wish to append. The name you choose must be a local server or you can -->
+            <!-- use the name localhost -->
+            <!-- Example using a locally served domain -->
+            <!--
+            <defaultdomain>mydomain.com</defaultdomain>
+            -->
+            <!-- Example using localhost -->
+            <!--            
+            <defaultdomain>localhost</defaultdomain>            
+            -->
+            
+            <!-- Specify what happens to messages succesfully fetched from the mailserver -->
+            <!-- leaveonserver -->
+            <!--     if true, messages will be left on the server -->
+            <!--     if false, messages will be deleted from the server -->
+            <!-- markseen -->
+            <!--     if true, messages left on the server will be marked as seen -->
+            <!--     if false, messages left on the server will not be marked as seen -->            
+            <fetched leaveonserver="false" markseen="true"/>
+
+            <!-- Specify the index of the RECEIVED Header used to compute the remote address and remote host name -->
+            <!-- and what happens to messages that contain an invalid header at that index. -->
+            <!-- Matchers such as InSpammerBlacklist use the remote address and/or remote host name to identify illegitimate -->
+            <!-- remote MTAs. -->
+            <!-- This tag is optional. If omitted, the remote address will be set to 127.0.0.1 and the remote domain -->
+            <!-- will be set to 'localhost'. Both are almost always considered legitimate. -->
+            <!-- index -->                     
+            <!--     The zero based index of the RECEIVED Header used to compute the remote address and remote host name -->
+            <!--     of the MTA that delivered a fetched message. -->
+            <!--     Typically, the first (index = 0) RECEIVED Header is for the local MTA that delivers mail to the message store -->
+            <!--     and the second RECEIVED Header (index = 1) is the remote domain delivering mail to the MTA, so the second -->
+            <!--     RECEIVED Header is the one to use. -->
+            <!--     Some configurations will differ. Look at the RECEIVED Headers and set the index to point to the first remote MTA. -->
+            <!--     An index of -1 is is interpreted as use 127.0.0.1 for the remote address and use 'localhost' for the remote host name. -->
+            <!-- reject -->
+            <!--     if true, messages whose received header at the specified index is invalid will be rejected -->
+            <!--     if false, messages whose received header at the specified index is invalid will be accepted -->
+            <!--     and the Mail Attribute "org.apache.james.fetchmail.isInvalidReceivedHeader" -->
+            <!--     will be added to the message. Use the HasMailAttribute matcher to detect them. -->
+            <!-- The following apply if reject="true" and a message is rejected... -->
+            <!--     leaveonserver -->
+            <!--         if true, messages will be left on the server -->
+            <!--         if false, messages will be deleted from the server -->
+            <!--     markseen -->
+            <!--         if true, messages left on the server will be marked as seen -->
+            <!--         if false, messages left on the server will not be marked as seen -->             
+            <remotereceivedheader index="1" reject="true" leaveonserver="true" markseen="false"/>
+                
+            <!-- Specify what happens to messages whose size exceeds the specified limit. -->
+            <!-- This tag is optional. If omitted, there is no limit. -->
+            <!-- limit -->
+            <!--     The maximum message size in Kilobytes of messages injected into James. -->
+            <!--     A value of 0 means no limit. -->
+            <!-- reject -->
+            <!--     if true, messages whose size exceeds the limit will be rejected -->
+            <!--     if false, messages whose size exceeds the limit will be stripped of their message bodies -->
+            <!--     prior to injection into James and the MailAttribute "org.apache.james.fetchmail.isMaxMessageSizeExceeded" -->
+            <!--     will be added to the message with the value set to the original message size in bytes. -->
+            <!--     Use the HasMailAttribute matcher to detect them. -->
+            <!-- The following apply if reject="true" and a message is rejected... -->
+            <!--     leaveonserver -->
+            <!--         if true, messages will be left on the server -->
+            <!--         if false, messages will be deleted from the server -->
+            <!--     markseen -->
+            <!--         if true, messages left on the server will be marked as seen -->
+            <!--         if false, messages left on the server will not be marked as seen -->            
+            <maxmessagesize limit="0" reject="false" leaveonserver="true" markseen="false"/>
+            
+            <!-- Specify what happens to undeliverable messages -->
+            <!-- leaveonserver -->
+            <!--     if true, messages will be left on the server -->
+            <!--     if false, messages will be deleted from the server -->
+            <!-- markseen -->
+            <!--     if true, messages left on the server will be marked as seen -->
+            <!--     if false, messages left on the server will not be marked as seen -->            
+            <undeliverable leaveonserver="true" markseen="false"/>
+            
+            <!-- Specify what happens to messages for which a recipient cannot be determined. -->
+            <!-- defer -->
+            <!--     if true, processing of messages for which a recipient cannot be determined will deferred -->
+            <!--     until the next fetch of the Account. This gives an opportunity for other Accounts in the -->
+            <!--     fetch task to determine the recipient and process the mail. -->
+            <!--     if false, messages for which a recipient cannot be determined are processed immediately. -->
+            <!-- reject -->
+            <!--     if true, messages for which a recipient cannot be determined will be rejected -->
+            <!--     if false, messages for which a recipient cannot be determined will be accepted, -->
+            <!--     the account recipient will be used and the MailAttribute "org.apache.james.fetchmail.isRecipientNotFound" -->
+            <!--     will be added to the message. Use the HasMailAttribute matcher to detect them. -->
+            <!-- The following apply if reject="true" and a message is rejected... -->
+            <!--     leaveonserver -->
+            <!--         if true, messages will be left on the server -->
+            <!--         if false, messages will be deleted from the server -->
+            <!--     markseen -->
+            <!--         if true, messages left on the server will be marked as seen -->
+            <!--         if false, messages left on the server will not be marked as seen -->            
+            <recipientnotfound defer="true" reject="true" leaveonserver="true" markseen="false"/>                                         
+
+            <!-- Specify a list of recipients for whom messages will be rejected -->
+            <!-- and what happens to rejected messages. -->
+            <!-- The list can be comma, tab or space delimited. -->
+            <!-- reject -->
+            <!--     if true, messages for users on the blacklist will be rejected -->            
+            <!--     if false, messages for users on the blacklist will be accepted -->         
+            <!--     and the Mail Attribute "org.apache.james.fetchmail.isBlacklistedRecipient" -->
+            <!--     will be added to the message. Use the HasMailAttribute matcher to detect them. -->            
+            <!-- The following apply if reject="true" and a message is rejected... -->
+            <!--     leaveonserver -->
+            <!--         if true, messages will be left on the server -->
+            <!--         if false, messages will be deleted from the server -->
+            <!--     markseen -->
+            <!--         if true, messages left on the server will be marked as seen -->
+            <!--         if false, messages left on the server will not be marked as seen -->                        
+            <blacklist reject="true" leaveonserver="true" markseen="false"> wibble@localhost, flobble@localhost </blacklist>
+
+            <!-- Specify if messages for users who are not defined to James should -->
+            <!-- be rejected and what happens to rejected messages. -->
+            <!-- reject -->
+            <!--     if true, messages for users who are not defined to James will be rejected -->
+            <!--     if false, messages for users who are not defined to James will be accepted -->
+            <!--     and the Mail Attribute "org.apache.james.fetchmail.isUserUndefined" -->
+            <!--     will be added to the message. Use the HasMailAttribute matcher to detect them. -->            
+            <!-- The following apply if reject="true" and a message is rejected... -->
+            <!--     leaveonserver -->
+            <!--         if true, messages will be left on the server -->
+            <!--         if false, messages will be deleted from the server -->
+            <!--     markseen -->
+            <!--         if true, messages left on the server will be marked as seen -->
+            <!--         if false, messages left on the server will not be marked as seen -->                                           
+            <userundefined reject="true" leaveonserver="true" markseen="false" />
+
+            <!-- Specify if messages for recipients on remote hosts should -->
+            <!-- be rejected and what happens to rejected messages. -->
+            <!-- reject -->
+            <!--     if true, messages for remote recipients will be rejected -->
+            <!--     if false, messages for remote recipients will be accepted -->
+            <!--     and the Mail Attribute "org.apache.james.fetchmail.isRemoteRecipient" -->
+            <!--     will be added to the message. Use the HasMailAttribute matcher to detect them. -->            
+            <!-- The following apply if reject="true" and a message is rejected... -->
+            <!--     leaveonserver -->
+            <!--         if true, messages will be left on the server -->
+            <!--         if false, messages will be deleted from the server -->
+            <!--     markseen -->
+            <!--         if true, messages left on the server will be marked as seen -->
+            <!--         if false, messages left on the server will not be marked as seen -->       
+            <remoterecipient reject="true" leaveonserver="true" markseen="false" />
+        </fetch>
+    </fetchmail>        

Added: james/server/sandbox/spring-integration/src/trunk/config/james-listmanager.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/james-listmanager.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/james-listmanager.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/james-listmanager.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,43 @@
+      <!-- Add a Manager and Processor for each list -->
+      <!-- TODO: add more examples                   -->
+      <!-- CHECKME: check the <resource> path        -->
+
+        <mailet match="CommandListservMatcher=testlist@localhost" class="CommandListservManager">
+           <!-- CHECKME! -->
+           <!--resources-->
+           <resources>/opt/james/apps/james/conf/miResources.xml</resources>
+           <!-- general information -->
+           <listName>testlist</listName>
+           <displayName>Test mailing list</displayName>
+           <listOwner>owner@localhost</listOwner>
+           <repositoryName>list-test</repositoryName>
+           <listDomain>localhost</listDomain>
+
+           <!-- the packages where the commands can be loaded from -->
+           <commandpackages>
+              <commandpackage>org.apache.james.transport.mailets.listservcommands</commandpackage>
+           </commandpackages>
+
+           <!-- all the available commands for this command. -->
+           <commands>
+              <command name="subscribe" class="Subscribe"/>
+              <command name="subscribe-confirm" class="SubscribeConfirm"/>
+              <command name="unsubscribe" class="UnSubscribe"/>
+              <command name="unsubscribe-confirm" class="UnSubscribeConfirm"/>
+              <command name="error" class="ErrorCommand"/>
+              <command name="owner" class="Owner"/>
+              <command name="info" class="Info"/>
+           </commands>
+        </mailet>
+
+        <!-- the processor for this list serv -->
+        <mailet match="RecipientIs=testlist@localhost" class="CommandListservProcessor">
+           <membersonly>false</membersonly>
+           <attachmentsallowed>true</attachmentsallowed>
+           <replytolist>true</replytolist>
+           <repositoryName>list-test</repositoryName>
+           <subjectprefix>Test</subjectprefix>
+           <autobracket>true</autobracket>
+           <listOwner>owner@localhost</listOwner>
+           <listName>testlist</listName>
+        </mailet>

Added: james/server/sandbox/spring-integration/src/trunk/config/james-liststores.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/james-liststores.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/james-liststores.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/james-liststores.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,6 @@
+      <!-- Mailing list repositories  -->
+      <!-- Add a user repository for each list -->
+      <!-- TODO: add more examples             -->
+      <repository name="list-test" class="org.apache.james.userrepository.UsersFileRepository">
+         <destination URL="file://var/lists/list-test/"/>
+      </repository>

Added: james/server/sandbox/spring-integration/src/trunk/config/james-server.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/james-server.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/james-server.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/james-server.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,319 @@
+<?xml version="1.0"?>
+
+<server>
+  <logs version="1.1">
+    <!-- see http://jakarta.apache.org/avalon/excalibur/logger/index.html -->
+    <factories>
+      <factory type="file" class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
+    </factories>
+
+    <!-- Logger categories -->
+    <!-- -->
+    <!-- The categories element contains zero or more category elements. -->
+    <!-- -->
+    <!-- Each category element has a name attribute that should be unique -->
+    <!-- among the category elements. It also has a log-level attribute. -->
+    <!-- This attribute can be set to any of the values FATALERROR, ERROR, -->
+    <!-- WARN, INFO, or DEBUG.  This value determines what log messages -->
+    <!-- are recorded in the log file.  In addition, each category element -->
+    <!-- can have zero or more category subelements. -->
+    <!-- -->
+    <!-- Each category element has a single log-target sub-element.  Each of -->
+    <!-- these elements has an id-ref attribute that must match the id attribute -->
+    <!-- of a file subelement of the targets element that can be found in this -->
+    <!-- file. -->
+    <!-- -->
+    <!-- In addition, each category element can have zero or more category subelements. -->
+    <!-- -->
+    <categories>
+      <category name="" log-level="INFO">
+        <log-target id-ref="default"/>
+      </category>
+      <category name="mailboxmanager" log-level="DEBUG">
+        <log-target id-ref="mailboxmanager-target"/>
+      </category>   
+      <category name="imapserver" log-level="DEBUG">
+        <log-target id-ref="imapserver-target"/>
+      </category>           
+      <category name="mailetpackages" log-level="INFO">
+        <log-target id-ref="James-Mailet-target"/>
+      </category>
+      <category name="matcherpackages" log-level="INFO">
+        <log-target id-ref="James-Mailet-target"/>
+      </category>
+      <category name="James.Mailet" log-level="INFO">
+        <log-target id-ref="James-Mailet-target"/>
+      </category>
+      <category name="James" log-level="INFO">
+        <log-target id-ref="James-target"/>
+      </category>
+      <category name="spoolmanager" log-level="INFO">
+        <log-target id-ref="spoolmanager-target"/>
+      </category>
+      <category name="dnsserver" log-level="INFO">
+        <log-target id-ref="dnsserver-target"/>
+      </category>
+      <category name="remotemanager" log-level="INFO">
+        <log-target id-ref="remotemanager-target"/>
+      </category>
+      <category name="pop3server" log-level="INFO">
+        <log-target id-ref="pop3server-target"/>
+      </category>
+      <category name="smtpserver" log-level="INFO">
+        <log-target id-ref="smtpserver-target"/>
+      </category>
+      <category name="nntpserver" log-level="INFO">
+        <log-target id-ref="nntpserver-target"/>
+      </category>
+      <category name="nntp-repository" log-level="INFO">
+        <log-target id-ref="nntp-repository-target"/>
+      </category>
+      <category name="mailstore" log-level="INFO">
+        <log-target id-ref="mailstore-target"/>
+      </category>
+      <category name="users-store" log-level="INFO">
+        <log-target id-ref="users-store-target"/>
+      </category>
+      <category name="objectstorage" log-level="INFO">
+        <log-target id-ref="objectstorage-target"/>
+      </category>
+      <category name="connections" log-level="INFO">
+        <log-target id-ref="connections-target"/>
+      </category>
+      <category name="sockets" log-level="INFO">
+        <log-target id-ref="sockets-target"/>
+      </category>
+      <category name="scheduler" log-level="INFO">
+        <log-target id-ref="scheduler-target"/>
+      </category>
+      <category name="fetchmail" log-level="INFO">
+        <log-target id-ref="fetchmail-target"/>
+      </category>
+    </categories>
+
+    <!-- Logger targets -->
+    <!-- -->
+    <!-- The targets element contains zero or more file elements. -->
+    <!-- -->
+    <!-- Each file element has an id attribute that should be unique -->
+    <!-- among the file elements.  -->
+    <!-- -->
+    <!-- Each file element has three sub-elements.  The filename element -->
+    <!-- specifies the file associated with this log target.   The format -->
+    <!-- element describes the format for each line in the log.  The append -->
+    <!-- element is a boolean value that determines whether James appends -->
+    <!-- to old logs on restart.  -->
+    <!-- -->
+    <targets>
+      <file id="default">
+        <filename>${app.home}/logs/default</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+       <file id="mailboxmanager-target">
+        <filename>${app.home}/logs/mailboxmanager</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+       </file>  
+       <file id="imapserver-target">
+        <filename>${app.home}/logs/imapserver</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>               
+      <file id="James-Mailet-target">
+        <filename>${app.home}/logs/mailet</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="James-target">
+        <filename>${app.home}/logs/james</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="spoolmanager-target">
+        <filename>${app.home}/logs/spoolmanager</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="dnsserver-target">
+        <filename>${app.home}/logs/dnsserver</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="remotemanager-target">
+        <filename>${app.home}/logs/remotemanager</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="pop3server-target">
+        <filename>${app.home}/logs/pop3server</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="smtpserver-target">
+        <filename>${app.home}/logs/smtpserver</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="nntpserver-target">
+        <filename>${app.home}/logs/nntpserver</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="nntp-repository-target">
+        <filename>${app.home}/logs/nntpstore</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="mailstore-target">
+        <filename>${app.home}/logs/mailstore</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="users-store-target">
+        <filename>${app.home}/logs/usersstore</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="objectstorage-target">
+        <filename>${app.home}/logs/objectstore</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="connections-target">
+        <filename>${app.home}/logs/connections</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="sockets-target">
+        <filename>${app.home}/logs/sockets</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="scheduler-target">
+        <filename>${app.home}/logs/scheduler</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+      <file id="fetchmail-target">
+        <filename>${app.home}/logs/fetchmail</filename>
+        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
+        <append>true</append>
+        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
+          <or>
+            <date>dd</date>
+            <size>10485760</size>
+          </or>
+        </rotation>
+      </file>
+    </targets>
+  </logs>
+</server>

Added: james/server/sandbox/spring-integration/src/trunk/config/james-smtphandlerchain.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/james-smtphandlerchain.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/james-smtphandlerchain.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/james-smtphandlerchain.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,198 @@
+<!-- The configuration handler chain -->
+<!-- Please note that this is EXPERIMENTAL and will be changed in future -->
+<!-- releases -->
+<handlerchain>
+<!-- Load the core filter command handlers-->
+    <handler class="org.apache.james.smtpserver.core.filter.CoreFilterCmdHandlerLoader"></handler>        
+
+    <!-- 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.core.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.core.filter.fastfail.DNSRBLHandler" command="RCPT">
+         <action> reject </action>
+         <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>
+             <blacklist> relays.ordb.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.core.filter.fastfail.SPFHandler" command="MAIL,RCPT">
+         <action> reject </action>
+         <checkAuthNetworks> false </checkAuthNetworks>
+         <blockSoftFail> false </blockSoftFail>
+         <blockPermError> true </blockPermError>
+     </handler>
+     -->    
+            
+
+     <!-- The filter handler configuration -->
+     
+     <!-- 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.core.filter.fastfail.ResolvableEhloHeloHandler" command="EHLO,HELO,RCPT">
+         <action> reject </action>
+         <checkAuthNetworks> false </checkAuthNetworks>
+         <checkAuthUsers> false </checkAuthUsers>
+     </handler>  
+     -->
+            
+     <!-- 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.core.filter.fastfail.ReverseEqualsEhloHeloHandler" command="EHLO,HELO">
+         <action> reject </action>
+         <checkAuthClients> false </checkAuthClients>
+         <checkAuthUsers> false </checkAuthUsers>
+     </handler>
+     -->
+            
+     <!-- 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.core.filter.fastfail.ValidSenderDomainHandler" command="MAIL">
+         <action> reject </action>
+         <checkAuthClients> false </checkAuthClients>
+         <checkAuthUsers> false </checkAuthUsers>
+     </handler>
+     -->
+     
+         
+     <!-- If activated 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 -->
+     <!-- 
+     <handler class="org.apache.james.smtpserver.core.filter.fastfail.ValidRcptHandler" command="RCPT">
+         <validRecipients> </validRecipients>
+         <validDomains> </validDomains>
+         <validRegexPattern> </validRegexPattern>
+     </handler>
+     -->
+            
+     <!-- If activated you can limit the maximal recipients -->
+     <!-- 
+     <handler class="org.apache.james.smtpserver.core.filter.fastfail.MaxRcptHandler" command="RCPT">
+         <action> reject </action>
+         <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.core.filter.fastfail.GreylistHandler" command="RCPT">
+         <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.core.filter.fastfail.TarpitHandler" command="RCPT">
+         <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.core.filter.fastfail.SuppressDuplicateRcptHandler" command="RCPT"/>
+     -->
+     
+     <!-- Load the core command handlers -->
+     <handler class="org.apache.james.smtpserver.core.CoreCmdHandlerLoader"></handler>        
+      
+     <!-- The message handler configuration -->
+     
+     <!-- 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.core.filter.fastfail.SpamAssassinHandler">
+         <spamdHost> 127.0.0.1 </spamdHost>
+         <spamdPort> 783 </spamdPort>
+         <spamdRejectionHits> 10 </spamdRejectionHits>
+         <checkAuthNetworks> false </checkAuthNetworksv>
+     </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.core.filter.fastfail.URIRBLHandler">
+         <action> reject </action>
+         <getDetail> true </getDetail>
+         <checkAuthNetworks> false </checkAuthNetworks>
+         <uriRblServers> 
+             <server> multi.surbl.org</server>
+         </uriRblServers>
+     </handler>
+     -->
+     
+     <!-- 
+     <handler class="org.apache.james.smtpserver.core.SetMimeHeaderHandler">
+         <headername>SPF-test</headername>
+         <headervalue>passed</headervalue>
+     </handler>
+     -->
+            
+     <!--  The default message receiving handler -->
+     <!--  The default behaviour is to put the message in the root processor of -->
+     <!--  the spooler -->
+     <handler class="org.apache.james.smtpserver.core.SendMailHandler"></handler>
+</handlerchain>

Added: james/server/sandbox/spring-integration/src/trunk/config/mailboxManagerSqlResources.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/mailboxManagerSqlResources.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/mailboxManagerSqlResources.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/mailboxManagerSqlResources.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,162 @@
+<!-- SQL Statements used by MailboxManager for database access. -->
+<sqlResources>
+
+<!--
+     This section provided configuration to determine the determine the
+     database product which is being used for storage. Different database
+     products may require different SQL syntax.
+
+     The jdbc database connection is examined to see if it matches with the
+     regular expressions specified in any of the defined matchers. The matchers
+     are processed in the over provided here, with the first successful match
+     defining the "db" value for this connection.
+
+     This value is then used to choose between different definitions for various
+     named sql statements, defined below. If no match is found,
+     the default sql statements are used.
+-->
+  <dbMatchers>
+    <dbMatcher db="mysql" databaseProductName="my.*"/>
+    <dbMatcher db="derby" databaseProductName="derby.*"/>
+  </dbMatchers>
+
+  <dbOptions>
+  </dbOptions>
+  <sqlDefs name="org.apache.james.mailboxmanager.torque.TorqueMailboxManagerFactory">
+
+    <sql name="tableName">${table}</sql>
+
+    <sql name="createTable_mailbox" db="derby">
+CREATE TABLE mailbox
+(
+    mailbox_id BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY,
+    name VARCHAR(255) NOT NULL,
+    uid_validity BIGINT NOT NULL,
+    last_uid BIGINT NOT NULL,
+    message_count INTEGER default 0,
+    size BIGINT default 0,
+    PRIMARY KEY(mailbox_id),
+    UNIQUE (name))
+    </sql>
+    <sql name="createTable_message" db="derby">
+CREATE TABLE message
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    internal_date TIMESTAMP,
+    size INTEGER,
+    PRIMARY KEY(mailbox_id,uid),
+    FOREIGN KEY (mailbox_id) REFERENCES mailbox (mailbox_id)
+        ON DELETE CASCADE
+  )     
+    </sql>
+    <sql name="createTable_message_flags" db="derby">   
+CREATE TABLE message_flags
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    answered INTEGER default 0 NOT NULL,
+    deleted INTEGER default 0 NOT NULL,
+    draft INTEGER default 0 NOT NULL,
+    flagged INTEGER default 0 NOT NULL,
+    recent INTEGER default 0 NOT NULL,
+    seen INTEGER default 0 NOT NULL,
+    PRIMARY KEY(mailbox_id,uid),
+    FOREIGN KEY (mailbox_id, uid) REFERENCES message (mailbox_id, uid)
+        ON DELETE CASCADE
+  )
+    </sql>      
+    <sql name="createTable_message_header" db="derby">  
+CREATE TABLE message_header
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    line_number INTEGER NOT NULL,
+    field VARCHAR(256) NOT NULL,
+    value VARCHAR(1024) NOT NULL,
+    PRIMARY KEY(mailbox_id,uid,line_number),
+    FOREIGN KEY (mailbox_id, uid) REFERENCES message (mailbox_id, uid)
+        ON DELETE CASCADE
+  ) 
+    </sql>  
+    <sql name="createTable_message_body" db="derby">    
+CREATE TABLE message_body
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    body BLOB NOT NULL,
+    PRIMARY KEY(mailbox_id,uid),
+    FOREIGN KEY (mailbox_id, uid) REFERENCES message (mailbox_id, uid)
+        ON DELETE CASCADE
+  )
+    </sql>  
+    <!--
+       *** MySQL ***
+    -->
+    <sql name="createTable_mailbox" db="mysql">
+CREATE TABLE mailbox
+(
+    mailbox_id BIGINT NOT NULL AUTO_INCREMENT,
+    name VARCHAR(255) NOT NULL,
+    uid_validity BIGINT NOT NULL,
+    last_uid BIGINT NOT NULL,
+    message_count MEDIUMINT default 0,
+    size BIGINT default 0,
+    PRIMARY KEY(mailbox_id),
+    UNIQUE (name)) ENGINE=INNODB;
+    </sql>
+    <sql name="createTable_message" db="mysql">
+CREATE TABLE message
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    internal_date DATETIME,
+    size MEDIUMINT,
+    PRIMARY KEY(mailbox_id,uid),
+    FOREIGN KEY (mailbox_id) REFERENCES mailbox (mailbox_id)
+        ON DELETE CASCADE
+  ) ENGINE=INNODB;      
+    </sql>
+    <sql name="createTable_message_flags" db="mysql">   
+CREATE TABLE message_flags
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    answered INTEGER default 0 NOT NULL,
+    deleted INTEGER default 0 NOT NULL,
+    draft INTEGER default 0 NOT NULL,
+    flagged INTEGER default 0 NOT NULL,
+    recent INTEGER default 0 NOT NULL,
+    seen INTEGER default 0 NOT NULL,
+    PRIMARY KEY(mailbox_id,uid),
+    FOREIGN KEY (mailbox_id, uid) REFERENCES message (mailbox_id, uid)
+        ON DELETE CASCADE
+  ) ENGINE=INNODB;
+    </sql>      
+    <sql name="createTable_message_header" db="mysql">  
+CREATE TABLE message_header
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    line_number MEDIUMINT NOT NULL,
+    field VARCHAR(256) NOT NULL,
+    value VARCHAR(1024) NOT NULL,
+    PRIMARY KEY(mailbox_id,uid,line_number),
+    FOREIGN KEY (mailbox_id, uid) REFERENCES message (mailbox_id, uid)
+        ON DELETE CASCADE
+  ) ENGINE=INNODB;      
+    </sql>  
+    <sql name="createTable_message_body" db="mysql">    
+CREATE TABLE message_body
+(
+    mailbox_id BIGINT NOT NULL,
+    uid BIGINT NOT NULL,
+    body LONGBLOB NOT NULL,
+    PRIMARY KEY(mailbox_id,uid),
+    FOREIGN KEY (mailbox_id, uid) REFERENCES message (mailbox_id, uid)
+        ON DELETE CASCADE
+) ENGINE=INNODB;        
+    </sql>  
+  </sqlDefs>
+</sqlResources>
+

Added: james/server/sandbox/spring-integration/src/trunk/config/miResources.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/miResources.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/miResources.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/miResources.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,158 @@
+<!-- XML resources for mailing lists -->
+<resources>
+  <matchers>
+    <matcher for="custom" match="My Custom List"/>
+  </matchers>
+
+  <group name="subscribeConfirm">
+    <resource name="welcome.subscribe.address">Welcome to the ${LIST_NAME} mailing list</resource>
+    <resource name="already.subscribed">You are already subscribed to the ${LIST_NAME} mailing list.</resource>
+    <resource name="text" xml:space="preserve"><![CDATA[
+Acknowledgment: I have added the address
+
+   ${SENDER_ADDR}
+
+to the ${LIST_NAME} mailing list.
+
+Welcome to ${LIST_NAME}@${DOMAIN_NAME}!
+
+Please save this message so that you know the address you are
+subscribed under, in case you later want to unsubscribe or change your
+subscription address.]]>
+    </resource>
+  </group>
+  <group name="unsubscribeConfirm">
+    <resource name="goodbye.subscribe.address">Goodbye from the ${LIST_NAME} mailing list</resource>
+    <resource name="not.subscribed">You are not currently subscribed to the ${LIST_NAME} mailing list.</resource>
+    <resource name="text" xml:space="preserve"><![CDATA[
+Acknowledgment: I have removed the address
+
+   ${SENDER_ADDR}
+
+from the ${LIST_NAME} mailing list.
+
+Goodbye from ${LIST_NAME}@${DOMAIN_NAME}.
+
+If you would like to subscribe in the future please send email to: ${LIST_NAME}-subscribe@${DOMAIN_NAME}]]>
+    </resource>
+  </group>
+  <group name="error">
+    <resource name="text" xml:space="preserve"><![CDATA[
+An error occurred while processing your request:
+    ${ERROR_MESSAGE}]]>
+    </resource>
+  </group>
+  <group name="unsubscribe">
+    <resource name="not.subscribed">You are not currently subscribed to the ${LIST_NAME} mailing list.</resource>
+    <resource name="confirm.unsubscribe.subject">Please confirm your unsubscription to the ${LIST_NAME} mailing list</resource>
+    <resource name="confirm.unsubscribe.address">${LIST_NAME}-unsubscribe-confirm@${DOMAIN_NAME}</resource>
+    <resource name="text" xml:space="preserve"><![CDATA[
+To confirm that you would like
+
+    ${SENDER_ADDR}
+
+removed from the ${LIST_NAME} mailing list, please send an empty reply to this address:
+
+
+${LIST_NAME}-unsubscribe-confirm@${DOMAIN_NAME}
+
+Usually, this happens when you just hit the "reply" button.
+If this does not work, simply copy the address and paste it into the "To:" field of a new message.
+
+ or click here:
+
+mailto:${LIST_NAME}-unsubscribe-confirm@${DOMAIN_NAME}]]>
+    </resource>
+  </group>
+  <group name="subscribe">
+    <resource name="already.subscribed">You are already subscribed to the ${LIST_NAME} mailing list.</resource>
+    <resource name="confirm.subscribe.subject">Please confirm your subscription to the ${LIST_NAME} mailing list</resource>
+    <resource name="confirm.subscribe.address">${LIST_NAME}-subscribe-confirm@${DOMAIN_NAME}</resource>
+    <resource name="text" xml:space="preserve"><![CDATA[
+To confirm that you would like
+
+   ${SENDER_ADDR}
+
+added to the ${LIST_NAME} mailing list, please send an empty reply to this address:
+
+   ${LIST_NAME}-subscribe-confirm@${DOMAIN_NAME}
+
+Usually, this happens when you just hit the "reply" button.
+If this does not work, simply copy the address and paste it into the "To:" field of a new message.
+
+or click here:
+    mailto:${LIST_NAME}-subscribe-confirm@${DOMAIN_NAME}
+
+This confirmation serves two purposes. First, it verifies that I am able to get mail through to you. Second, it protects you in case someone forges a subscription request in your name.]]>
+    </resource>
+  </group>
+  <group name="admincommands">
+    <resource name="text" xml:space="preserve"><![CDATA[
+--- Administrative commands for the ${LIST_NAME} list ---
+
+I can handle administrative requests automatically. Please do not send them to the list address! Instead, send your message to the correct command address:
+
+To subscribe to the list, send a message to:
+   <${LIST_NAME}-subscribe@${DOMAIN_NAME}>
+
+To remove your address from the list, send a message to:
+   <${LIST_NAME}-unsubscribe@${DOMAIN_NAME}>
+
+Send mail to the following for info and FAQ for this list:
+   <${LIST_NAME}-info@${DOMAIN_NAME}>
+
+If despite following these instructions, you do not get the desired results, please contact my owner at ${LIST_NAME}-owner@${DOMAIN_NAME}. Please be patient, my owner is a lot slower than I am ;-)]]>
+    </resource>
+  </group>
+  <group name="info">
+    <resource name="info.subject">Information regarding the ${LIST_NAME} mailing list</resource>
+    <resource name="text" xml:space="preserve"><![CDATA[
+--- Information regarding the ${LIST_NAME} list ---
+
+This is a public mailing list associated with the ${DOMAIN_NAME} server.
+It is intended to be a convienent mechanism to share ideas, news and current events with like minded people.
+
+--- Common practices ---
+Sending email to the list:
+    If you want to send email to the list, you can simply click on this link: ${LIST_NAME}@${DOMAIN_NAME} and then send what ever email you'd like to share with the other members of the ${LIST_NAME} mailing list.
+
+Recieving email from the list:
+    Every time someone sends email to the list, every member will recieve the email in their inbox.
+
+Replying to list email:
+    When you reply to email from the list, it will also go to every member on the list.
+
+--- Current members ---
+The list of current members are:
+    ${MEMBER_LIST}]]>
+    </resource>
+  </group>
+  <group name="footer">
+    <resource name="text" xml:space="preserve"><![CDATA[
+---------------------------------------------------------------------
+To unsubscribe, e-mail: ${LIST_NAME}-unsubscribe@${DOMAIN_NAME}
+For additional commands, e-mail: ${LIST_NAME}-info@${DOMAIN_NAME}]]>
+    </resource>
+  </group>
+  <group name="footer_html">
+    <resource name="text" xml:space="preserve"><![CDATA[
+---------------------------------------------------------------------
+To unsubscribe, e-mail: <a href="mailto:${LIST_NAME}-unsubscribe@${DOMAIN_NAME}">${LIST_NAME}-unsubscribe@${DOMAIN_NAME}</a>
+For additional commands, e-mail: <a href="mailto:${LIST_NAME}-info@${DOMAIN_NAME}">${LIST_NAME}-info@${DOMAIN_NAME}</a>]]>
+    </resource>
+  </group>
+ <group name="List Manager">
+    <resource name="command.not.understood">I Could not understand the command "${COMMAND}" you sent to the "${LIST_NAME}" mailing list.</resource>
+    <resource name="invalid.mail.subject">You have sent invalid mail to the ${LIST_NAME} mailing list</resource>
+    <resource name="error.attachments">You cannot send attachments to the ${LIST_NAME} mailing list.</resource>
+    <resource name="error.membersonly">Only members of this listserv are allowed to send a message to the ${LIST_NAME} mailing list.</resource>
+ </group>
+  <group name="header">
+    <resource name="text" xml:space="preserve"><![CDATA[
+Hi! This is the list serv program. I'm managing the ${LIST_NAME}@${DOMAIN_NAME} mailing list.
+
+I'm working for my owner, who can be reached at ${LIST_NAME}-owner@${DOMAIN_NAME}.]]>
+    </resource>
+    <resource name="text" for="custom">This is my custom HEADER resource</resource>
+  </group>
+</resources>

Added: james/server/sandbox/spring-integration/src/trunk/config/spring-config.xml
URL: http://svn.apache.org/viewvc/james/server/sandbox/spring-integration/src/trunk/config/spring-config.xml?view=auto&rev=487125
==============================================================================
--- james/server/sandbox/spring-integration/src/trunk/config/spring-config.xml (added)
+++ james/server/sandbox/spring-integration/src/trunk/config/spring-config.xml Thu Dec 14 00:18:49 2006
@@ -0,0 +1,422 @@
+<?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:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+	
+	<!--
+	beans which replace Avalon specific container logic
+	-->
+	
+	<bean id="serviceManager"
+		class="org.apache.james.container.spring.adaptor.ServiceManagerBridge"
+		scope="prototype">
+		<!-- Although I started to list all dependencies, it is only needed 
+			to specify the ambigous ones! 
+			-->
+		<property name="beanBlockInfos">
+			<map>
+				<entry key="James">
+					<!-- Store is the only ambigous dependency known for James -->
+					<map>
+						<entry
+							key="org.apache.avalon.cornerstone.services.store.Store"
+							value="mailstore"/>
+					</map>
+				</entry>				
+				<entry key="users-store">
+					<map>
+						<entry
+							key="org.apache.avalon.cornerstone.services.store.Store"
+							value="mailstore"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
+							value="database-connections"/>
+						<entry key="org.apache.james.services.FileSystem"
+							value="filesystem"/>
+					</map>
+				</entry>
+				<entry key="mailboxmanager">
+					<map>
+						<entry
+							key="org.apache.avalon.cornerstone.services.store.Store"
+							value="mailboxmanager-mailstore"/>
+						<entry key="org.apache.james.services.FileSystem"
+							value="filesystem"/>
+					</map>
+				</entry>
+				<entry key="remotemanager">
+					<map>
+						<entry
+							key="org.apache.avalon.cornerstone.services.store.Store"
+							value="mailstore"/>
+						<entry key="org.apache.james.services.UsersStore"
+							value="users-store"/>
+						<entry key="org.apache.james.services.UsersRepository"
+							value="localusersrepository"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.sockets.SocketManager"
+							value="sockets"/>
+						<entry
+							key="org.apache.james.services.JamesConnectionManager"
+							value="connections"/>
+						<entry key="org.apache.james.services.MailServer"
+							value="James"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.threads.ThreadManager"
+							value="thread-manager"/>
+						<entry
+							key="org.apache.james.services.SpoolManagementService"
+							value="spoolmanagement"/>
+						<entry
+							key="org.apache.james.services.BayesianAnalyzerManagementService"
+							value="bayesiananalyzermanagement"/>
+						<entry key="org.apache.james.services.DNSServer"
+							value="dnsserver"/>
+						<entry
+							key="org.apache.james.services.ProcessorManagementService"
+							value="processormanagement"/>
+						<entry
+							key="org.apache.james.services.VirtualUserTableManagementService"
+							value="virtualusertablemanagement"/>
+						<entry
+							key="org.apache.james.services.DomainListManagementService"
+							value="domainlistmanagement"/>
+					</map>
+				</entry>
+				<entry key="imapserver">
+					<map>
+						<entry
+							key="org.apache.james.services.UsersRepository"
+							value="localusersrepository"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.sockets.SocketManager"
+							value="sockets"/>		
+						<entry
+							key="org.apache.james.services.JamesConnectionManager"
+							value="imap-connections"/>		
+						<entry key="org.apache.james.services.MailServer"
+							value="James"/>						
+						<entry
+							key="org.apache.avalon.cornerstone.services.threads.ThreadManager"
+							value="thread-manager"/>
+						<entry key="org.apache.james.mailboxmanager.manager.MailboxManagerProvider"
+							value="mailboxmanager"/>
+						<entry key="org.apache.james.services.DNSServer"
+							value="dnsserver"/>
+					</map>
+				</entry>			
+				<entry key="pop3server">
+					<map>
+						<entry
+							key="org.apache.james.services.UsersRepository"
+							value="localusersrepository"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.sockets.SocketManager"
+							value="sockets"/>		
+						<entry
+							key="org.apache.james.services.JamesConnectionManager"
+							value="connections"/>		
+						<entry key="org.apache.james.services.MailServer"
+							value="James"/>						
+						<entry
+							key="org.apache.avalon.cornerstone.services.threads.ThreadManager"
+							value="thread-manager"/>
+						<entry key="org.apache.james.services.DNSServer"
+							value="dnsserver"/>
+					</map>
+				</entry>	
+				<entry key="smtpserver">
+					<map>
+						<entry key="org.apache.mailet.MailetContext"
+							value="James"/>
+						<entry key="org.apache.james.services.UsersRepository"
+							value="localusersrepository"/>
+						<entry key="org.apache.james.services.DNSServer"
+							value="dnsserver"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.sockets.SocketManager"
+							value="sockets"/>
+						<entry
+							key="org.apache.james.services.JamesConnectionManager"
+							value="connections"/>
+						<entry key="org.apache.james.services.MailServer"
+							value="James"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.threads.ThreadManager"
+							value="thread-manager"/>
+						<entry key="org.apache.avalon.cornerstone.services.datasources.DataSourceSelector"
+							value="database-connections"/>
+						<entry key="org.apache.james.services.FileSystem"
+							value="filesystem"/>
+						<entry key="org.apache.james.services.VirtualUserTable"
+							value="defaultvirtualusertable"/>
+					</map>
+				</entry>	
+				<entry key="nntpserver">
+					<map>
+						<entry
+							key="org.apache.james.services.UsersRepository"
+							value="localusersrepository"/>
+						<entry
+							key="org.apache.avalon.cornerstone.services.sockets.SocketManager"
+							value="sockets"/>		
+						<entry
+							key="org.apache.james.services.JamesConnectionManager"
+							value="connections"/>		
+						<entry key="org.apache.james.nntpserver.repository.NNTPRepository"
+							value="nntp-repository"/>						
+						<entry
+							key="org.apache.avalon.cornerstone.services.threads.ThreadManager"
+							value="thread-manager"/>
+						<entry key="org.apache.james.services.DNSServer"
+							value="dnsserver"/>
+					</map>
+				</entry>		
+				<entry key="spoolmanager">
+					<map>
+						<entry
+							key="org.apache.james.services.SpoolRepository"
+							value="spoolrepository"/>
+						<entry
+							key="org.apache.james.services.MatcherLoader"
+							value="matcherpackages"/>		
+						<entry
+							key="org.apache.james.services.MailetLoader"
+							value="mailetpackages"/>		
+					</map>
+				</entry>																
+			</map>
+		</property>
+	</bean>
+	
+
+	<bean name="logWorker"
+		class="org.apache.james.container.spring.logging.SystemConsoleLogWorker"/>
+	
+	<bean name="loggerMap"
+		class="org.apache.james.container.spring.adaptor.LoggingBridge">
+		<property name="logWorker" ref="logWorker"/>
+	</bean>
+	
+	<bean id="configurationProvider"
+		class="org.apache.james.container.spring.adaptor.AvalonConfigurationFileProvider">
+		<property name="configurationPath"
+			value="src/trunk/config/james-config.xml"/>
+	</bean>
+	
+	<bean id="avalonContext"
+		class="org.apache.james.container.spring.adaptor.AvalonContext">
+		<property name="applicationHome" value="data"/>
+	</bean>
+	<!--
+	JMX part
+	-->
+	<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
+		<property name="autodetect" value="true"/>
+		<property name="namingStrategy" ref="namingStrategy"/>
+	</bean>
+	
+	<bean id="namingStrategy"
+		class="org.springframework.jmx.export.naming.KeyNamingStrategy">
+		<property name="mappings">
+			<props>
+				<prop key="fetchmail">bean:name=fetchmail</prop>
+				<prop key="smtpserver">bean:name=smtpserver</prop>
+				<prop key="James">bean:name=James</prop>
+				<prop key="dnsserver">bean:name=dnsserver</prop>
+				<prop key="remotemanager">bean:name=remotemanager</prop>
+				<prop key="pop3server">bean:name=pop3server</prop>
+				<prop key="nntpserver">bean:name=nntpserver</prop>
+				<prop key="virtualusertablemanagement">bean:name=virtualusertablemanagement</prop>				
+				<prop key="spoolmanagement">bean:name=spoolmanagement</prop>								
+				<prop key="domainlistmanagement">bean:name=domainlistmanagement</prop>					
+				<prop key="processormanagement">bean:name=processormanagement</prop>		
+				<prop key="bayesiananalyzermanagement">bean:name=bayesiananalyzermanagement</prop>	
+				<prop key="usermanagement">bean:name=usermanagement</prop>					
+			</props>
+		</property>
+	</bean>
+	
+	<bean id="mbeanServer"
+		class="org.springframework.jmx.support.MBeanServerFactoryBean"/>
+
+	<!--
+	beans which manage bootstrapping and component lifecycle
+	-->
+
+	<bean id="loggerProcessor"
+		class="org.apache.james.container.spring.processor.LoggerProcessor">
+		<property name="loggerToComponentMapper" ref="loggerMap" />
+	</bean>	
+	
+	<bean id="contextProcessor"
+		class="org.apache.james.container.spring.processor.ContextProcessor">
+			<property name="context" ref="avalonContext" />
+	</bean>	
+
+	<bean id="serviceProcessor"
+		class="org.apache.james.container.spring.processor.ServiceProcessor">
+		<!-- The listed Beans are excluded/ignored. They could be served directly by Spring DI -->
+		<property name="excludeBeans">
+			<set>
+				<value>spoolmanagement</value>
+				<value>spoolrepository</value>
+			</set>
+		</property>
+		<property name="serviceManagerBridge" ref="serviceManager" />
+	</bean>
+	
+	<bean id="configurationProcessor"
+		class="org.apache.james.container.spring.processor.ConfigurationProcessor">
+			<property name="configurationProvider" ref="configurationProvider" />
+	</bean>			
+	
+	<bean id="initializationProcessor"
+		class="org.apache.james.container.spring.processor.InitializationProcessor"/>
+	
+	<!--
+	JAMES components starting from here
+	-->
+	
+	<bean id="database-connections"
+		class="org.apache.avalon.cornerstone.blocks.datasources.DefaultDataSourceSelector"/>
+	
+	<bean id="thread-manager"
+		class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager"/>
+	
+	<bean id="users-store" class="org.apache.james.core.AvalonUsersStore"/>
+	
+	<bean id="localusersrepository"
+		class="org.apache.james.core.LocalJamesUsersRepository"/>
+	
+	<bean id="dnsserver" class="org.apache.james.dnsserver.DNSServer"/>
+	
+	<bean id="James" class="org.apache.james.James"/>
+	
+	<bean id="mailboxmanager"
+		class="org.apache.james.mailboxmanager.impl.DefaultMailboxManagerProvider"/>
+	
+	<bean id="mailboxmanager-mailstore"
+		class="org.apache.james.mailboxmanager.mailstore.MyAvalonMailStore"/>
+	
+	<bean id="matcherpackages"
+		class="org.apache.james.transport.JamesMatcherLoader"/>
+	
+	<bean id="mailetpackages"
+		class="org.apache.james.transport.JamesMailetLoader"/>
+	
+	<bean id="mailstore" class="org.apache.james.core.AvalonMailStore"/>
+	
+	<bean id="spoolrepository"
+		class="org.apache.james.mailrepository.MailStoreSpoolRepository">
+		<property name="store" ref="mailstore"/>
+	</bean>
+	
+	<bean id="spoolmanager" class="org.apache.james.transport.JamesSpoolManager"/>
+	
+	<bean id="spoolmanagement"
+		class="org.apache.james.management.SpoolManagement">
+    	<property name="store" ref="mailstore"/>
+	</bean>
+	
+	<bean id="processormanagement"
+		class="org.apache.james.management.ProcessorManagement"/>
+	
+	<bean id="bayesiananalyzermanagement"
+		class="org.apache.james.management.BayesianAnalyzerManagement"/>
+	
+	<bean id="sockets"
+		class="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketManager"/>
+	
+	<bean id="remotemanager" class="org.apache.james.remotemanager.RemoteManager">
+		<!--  Stopping here because of unknown use of sockets and threads
+	<property name="store" ref="mailstore"/>
+    <property name="usersStore" ref="users-store" />
+    <property name="users" ref="localusersrepository" />
+    <property name="" ref="sockets"
+    <property name="connectionManager" ref="connections"
+    <property name="mailServer" ref="James" />
+    <property name="" ref="thread-manager" />
+    <property name="spoolManagement" ref="spoolmanagement" />
+    <property name="bayesianAnalyzerManagement" ref="bayesiananalyzermanagement" />
+    <property name="dnsServer" ref="dnsserver" role="org.apache.james.services.DNSServer"/> />
+    <property name="processorManagement" ref="processormanagement" >
+    <property name="VirtualUserTableManagementService" ref="virtualusertablemanagement" />
+    <property name="org.apache.james.services.DomainListManagementService" ref="domainlistmanagement" />		
+			-->
+	</bean>	
+	
+	<bean id="usermanagement" class="org.apache.james.management.UserManagement"/>
+	
+	<bean id="imap-connections"
+		class="org.apache.james.util.connection.SimpleConnectionManager"/>
+	
+	<bean id="imapserver" class="org.apache.james.imapserver.ImapServer"/>
+	
+	<bean id="pop3server" class="org.apache.james.pop3server.POP3Server"/>
+	
+	<bean id="smtpserver" class="org.apache.james.smtpserver.SMTPServer"/>
+	
+	<bean id="nntpserver" class="org.apache.james.nntpserver.NNTPServer"/>
+	
+	<bean id="nntp-repository"
+		class="org.apache.james.nntpserver.repository.NNTPRepositoryImpl"/>
+	
+	<bean id="fetchmail" class="org.apache.james.fetchmail.FetchScheduler"/>
+	
+
+	
+
+	
+	<bean id="filesystem" class="org.apache.james.container.spring.adaptor.FileSystemBridge" />
+	
+	<bean id="virtualusertablemanagement"
+		class="org.apache.james.management.VirtualUserTableManagement"/>
+	
+	<bean id="virtualusertable-store"
+		class="org.apache.james.core.AvalonVirtualUserTableStore"/>
+	
+	<bean id="defaultvirtualusertable"
+		class="org.apache.james.core.DefaultVirtualUserTable"/>
+	
+	<bean id="domainlist" class="org.apache.james.domain.XMLDomainList"/>
+	
+	<bean id="domainlistmanagement"
+		class="org.apache.james.management.DomainListManagement"/>
+	
+	<bean id="connections"
+		class="org.apache.james.util.connection.SimpleConnectionManager"/>
+	
+
+	
+	<bean id="scheduler"
+		class="org.apache.avalon.cornerstone.blocks.scheduler.DefaultTimeScheduler"/>
+	
+</beans>
+
+
+
+



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


Mime
View raw message