You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/06/23 14:58:51 UTC

cvs commit: avalon-sandbox/merlin/merlin-platform/examples/james/conf block.xml james.xml

mcconnell    2003/06/23 05:58:51

  Added:       merlin/merlin-platform/examples/james .cvsignore README.TXT
               merlin/merlin-platform/examples/james/conf block.xml
                        james.xml
  Log:
  Addition of james block example.
  
  Revision  Changes    Path
  1.1                  avalon-sandbox/merlin/merlin-platform/examples/james/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  maven.log
  velocity.log
  build.xml
  build.properties
  target
  maven.log
  working
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/examples/james/README.TXT
  
  Index: README.TXT
  ===================================================================
  
  Instructions:
  
  1. download mail_1_3.jar from sun
  2. download activation.jar from sun
  3. rename mail_1_3.jar to mail-1.3.jar
  4. rename activation.jar to activation-1.0.jar
  5. place the above jar files in [MERLIN-HOME]/repository/james/jars/
  6. checkout jakarta-james from CVS
  7. build the jar files using "ant jar"
  8. copy jakarta-james/build/lib/*.jar to [MERLIN-HOME]/repository/james/jars/
  9. copy jakarta-james/lib/dnsjava-1.3.2 to [MERLIN-HOME]/repository/james/jars/
  10. checkout avalon-components
  11. build using "maven project-install"
  12. copy the [MAVEN-HOME]/repository/cornerstone-*/ directories to the [MERLIN-HOME] repository
  13. launch james
  
   $ cd merlin/merlin-platform/examples/james
   $ merlin conf/block.xml
  
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/examples/james/conf/block.xml
  
  Index: block.xml
  ===================================================================
  
  <block>
  
    <implementation>
  
      <!-- declaration of the classloader holding imported service classes -->
  
      <classloader>
        <classpath>
          <repository>
            <resource id="james:mail" version="1.3"/>
            <resource id="james:mailet-api" version="1.0"/>
          </repository>
        </classpath>
      </classloader>
  
      <!-- include blocks here -->
  
      <include name="james">
        <source path="james.xml"/>
      </include>
  
    </implementation>
  
  </block>
  
  
  
  1.1                  avalon-sandbox/merlin/merlin-platform/examples/james/conf/james.xml
  
  Index: james.xml
  ===================================================================
  
  <block>
  
     <info>
       <name>james</name>
     </info>
  
     <!--
     Service provided by this block.
     Please notw that in order to use these services, you must ensure that
     the required API classes are available in a classloader within the scope 
     of a container using these services.
     -->
  
     <services>
       <service type="org.apache.mailet.MailetContext:1.0">
         <source>/james</source>
       </service>
     </services>
  
     <!--
     Block implementation.  The implementation element may contain component,
     container and include entities.
     -->
     <implementation>
  
       <classloader>
         <classpath>
           <repository>
  
             <!-- apis for cornerstone service imports -->
             <resource id="avalon-framework:avalon-framework-impl" version="4.1.5-dev"/>
             <resource id="cornerstone-threads:cornerstone-threads-api" version="1.0"/>
             <resource id="cornerstone-sockets:cornerstone-sockets-api" version="1.0"/>
             <resource id="cornerstone-connection:cornerstone-connection-api" version="1.0"/>
             <resource id="cornerstone-scheduler:cornerstone-scheduler-api" version="1.0"/>
             <resource id="cornerstone-datasources:cornerstone-datasources-api" version="1.0"/>
             <resource id="cornerstone-store:cornerstone-store-api" version="1.0"/>
  
             <!-- james implementation dependencies -->
             <resource id="cornerstone-connection:cornerstone-connection-impl" version="1.0"/>
             <resource id="excalibur:excalibur-io" version="1.1"/>
             <resource id="excalibur:excalibur-collections" version="1.0"/>
             <resource id="excalibur-thread:excalibur-thread" version="1.1.1"/>
             <resource id="excalibur-pool:excalibur-pool" version="1.2"/>
             <!-- <resource id="james:mail" version="1.3"/> -->
             <!-- <resource id="james:mailet-api" version="1.0"/> -->
             <resource id="james:activation" version="1.0"/>
             <resource id="james:dnsjava" version="1.3.2"/>
             <resource id="james:mailet" version="1.0"/>
             <resource id="james:james" version="3.0a1"/>
           </repository>
         </classpath>
       </classloader>
  
       <include name="threads">
         <resource id="cornerstone-threads:cornerstone-threads-impl" version="1.0"/>
       </include>
  
       <include name="sockets">
         <resource id="cornerstone-sockets:cornerstone-sockets-impl" version="1.0"/>
       </include>
  
       <include name="scheduler">
         <resource id="cornerstone-scheduler:cornerstone-scheduler-impl" version="1.0"/>
       </include>
  
       <include name="datasources">
         <resource id="cornerstone-datasources:cornerstone-datasources-impl" version="1.0"/>
       </include>
  
       <include name="store">
         <resource id="cornerstone-store:cornerstone-store-impl" version="1.0"/>
         <targets>
           <target path="/manager">
             <configuration>
               <repositories>
                 <repository
                    class="org.apache.james.mailrepository.filepair.File_Persistent_Object_Repository"> 
                   <protocols>
                     <protocol>file</protocol>
                   </protocols>
                   <types>
                     <type>OBJECT</type>
                   </types>
                   <models>
                     <model>SYNCHRONOUS</model>
                     <model>ASYNCHRONOUS</model>
                     <model>CACHE</model>
                   </models>
                 </repository>
                 <repository 
                   class="org.apache.james.mailrepository.filepair.File_Persistent_Stream_Repository">
                   <protocols>
                     <protocol>file</protocol>
                   </protocols>
                   <types>
                     <type>STREAM</type>
                   </types>
                   <models>
                     <model>SYNCHRONOUS</model>
                     <model>ASYNCHRONOUS</model>
                     <model>CACHE</model>
                   </models>
                 </repository>
               </repositories>
             </configuration>
           </target>
         </targets>
       </include>
  
       <component name="connections" 
             class="org.apache.james.util.connection.SimpleConnectionManager" 
             activation="true">
           <configuration>
             <idle-timeout>300000</idle-timeout>
             <max-connections>30</max-connections>
           </configuration>
       </component>
  
       <component name="james" class="org.apache.james.James" 
             activation="true">
         <configuration>
           <postmaster>postmaster@localhost</postmaster>
           <servernames autodetect="true" autodetectIP="true">
             <servername>localhost</servername>
           </servernames>
           <usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/>
           <inboxRepository>
             <repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
           </inboxRepository>
         </configuration>
       </component>
  
       <component name="dns" class="org.apache.james.dnsserver.DNSServer" 
             activation="true">
         <configuration>
           <autodiscover>true</autodiscover>
           <authoritative>false</authoritative>
         </configuration>
       </component>
  
       <component name="remote" 
            class="org.apache.james.remotemanager.RemoteManager" 
            activation="true">
         <configuration>
           <port>4555</port>
           <handler>
             <helloName autodetect="TRUE"/>
             <administrator_accounts>
               <account login="root" password="root"/>
             </administrator_accounts>
             <connectiontimeout> 60000 </connectiontimeout>
           </handler>
         </configuration>
       </component>
  
       <component name="pop3" 
             class="org.apache.james.pop3server.POP3Server"  
             activation="true">
           <configuration enabled="true">
             <port>110</port>
             <handler>
               <helloName autodetect="true"/>
               <connectiontimeout>120000</connectiontimeout>
             </handler>
           </configuration>
       </component>
  
       <component name="smtp" 
             class="org.apache.james.smtpserver.SMTPServer" 
             activation="true">
           <configuration enabled="true">
             <port>25</port>
             <handler>
               <helloName autodetect="true"/>
               <connectiontimeout>360000</connectiontimeout>
               <maxmessagesize>0</maxmessagesize>
             </handler>
           </configuration>
       </component>
  
       <!-- The High Level Storage block -->
       <component name="mailstore" 
            class="org.apache.james.core.AvalonMailStore" 
            activation="true">
           <configuration>
             <repositories>
               <repository class="org.apache.james.mailrepository.AvalonMailRepository">
                 <protocols>
                   <protocol>file</protocol>
                 </protocols>
                 <types>
                   <type>MAIL</type>
                 </types>
               </repository>
               <repository class="org.apache.james.mailrepository.AvalonSpoolRepository">
                 <protocols>
                   <protocol>file</protocol>
                 </protocols>
                 <types>
                   <type>SPOOL</type>
                 </types>
               </repository>
  
               <!-- These repositories store the entire message in the database -->
               <repository class="org.apache.james.mailrepository.JDBCMailRepository">
                 <protocols>
                   <protocol>db</protocol>
                 </protocols>
                 <types>
                   <type>MAIL</type>
                 </types>
                 <config>
                   <sqlFile>file://conf/sqlResources.xml</sqlFile>
                 </config>
               </repository>
               <repository class="org.apache.james.mailrepository.JDBCSpoolRepository">
                 <protocols>
                   <protocol>db</protocol>
                 </protocols>
                 <types>
                    <type>SPOOL</type>
                 </types>
                 <config>
                    <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>
                   <protocol>dbfile</protocol>
                 </protocols>
                 <types>
                   <type>MAIL</type>
                 </types>
                 <config>
                   <sqlFile>file://conf/sqlResources.xml</sqlFile>
                   <filestore>file://var/dbmail</filestore>
                 </config>
               </repository>
               <repository class="org.apache.james.mailrepository.JDBCSpoolRepository">
                 <protocols>
                   <protocol>dbfile</protocol>
                 </protocols>
                 <types>
                   <type>SPOOL</type>
                 </types>
                 <config>
                   <sqlFile>file://conf/sqlResources.xml</sqlFile>
                   <filestore>file://var/dbmail</filestore>
                 </config>
               </repository>
             </repositories>
             <spoolRepository>
               <repository destinationURL="file://var/mail/spool/" type="SPOOL"/>
             </spoolRepository>
           </configuration>
       </component>
  
       <component name="users-store" 
             class="org.apache.james.core.AvalonUsersStore" 
             activation="true">
           <configuration>
             <repository name="LocalUsers" 
                class="org.apache.james.userrepository.UsersFileRepository">
               <destination URL="file://var/users/"/>
             </repository>
           </configuration>
       </component>
  
       <component name="spool" 
            class="org.apache.james.transport.JamesSpoolManager" 
            activation="true">
           <configuration>
             <threads> 10 </threads>
             <mailetpackages>
               <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
             </mailetpackages>
             <matcherpackages>
               <matcherpackage>org.apache.james.transport.matchers</matcherpackage>
             </matcherpackages>
  
             <processor name="root">
               <mailet match="RelayLimit=30" class="Null">
                 <debug>false</debug>
               </mailet>
               <mailet match="InSpammerBlacklist=blackholes.mail-abuse.org" class="ToProcessor">
                 <processor> spam </processor>
                 <notice> Rejected - see  http://www.mail-abuse.org/rbl/ </notice>
                 <debug>false</debug>
               </mailet>
               <mailet match="InSpammerBlacklist=dialups.mail-abuse.org" class="ToProcessor">
                 <processor> spam </processor>
                 <notice> Dialup - see http://www.mail-abuse.org/dul/ </notice>
                 <debug>false</debug>
               </mailet>
               <mailet match="InSpammerBlacklist=relays.mail-abuse.org" class="ToProcessor">
                 <processor> spam </processor>
                 <notice> Open spam relay - see http://www.mail-abuse.org/rss/ </notice>
                 <debug>false</debug>
               </mailet>
               <mailet match="All" class="ToProcessor">
                 <processor> transport </processor>
                 <debug>false</debug>
               </mailet>
             </processor>
  
             <processor name="error">
               <mailet match="All" class="ToRepository">
                 <repositoryPath> file://var/mail/error/</repositoryPath>
                 <passThrough> true </passThrough>
                 <debug>false</debug>
               </mailet>
             </processor>
  
             <processor name="transport">
               <mailet match="RecipientIsLocal" class="LocalDelivery"/>
               <mailet match="HostIsLocal" class="ToProcessor">
                 <processor>error</processor>
                 <debug>false</debug>
               </mailet>
               <mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">
                 <processor> spam </processor>
                 <debug>false</debug>
               </mailet>
               <mailet match="All" class="RemoteDelivery">
                 <outgoing> file://var/mail/outgoing/ </outgoing>
                 <delayTime> 21600000 </delayTime>
                 <maxRetries> 5 </maxRetries>
                 <deliveryThreads> 1 </deliveryThreads>
                 <debug>false</debug>
                 <!--<gateway> otherserver.mydomain.com </gateway>-->
                 <!--<gatewayPort> 25 </gatewayPort>-->
               </mailet>
             </processor>
  
             <processor name="spam">
               <!--<mailet match="All" class="Null"/>-->
               <!--<mailet match="All" class="NotifySender"/>-->
               <!--<mailet match="All" class="NotifyPostmaster"/>-->
               <mailet match="All" class="ToRepository">
                 <repositoryPath>file://var/mail/spam/</repositoryPath>
                 <debug>false</debug>
               </mailet>
             </processor>
           </configuration>
       </component>
  
  
       <!-- NNTP Repository -->
       <component name="nntp-repository" 
             class="org.apache.james.nntpserver.repository.NNTPRepositoryImpl" 
             activation="false">
           <configuration>
             <readOnly>false</readOnly>
             <rootPath>file://var/nntp/groups</rootPath>
             <tempPath>file://var/nntp/temp</tempPath>
             <articleIDPath>file://var/nntp/articleid</articleIDPath>
             <articleIDDomainSuffix>news.james.apache.org</articleIDDomainSuffix>
  
             <!-- The news groups hosted in this NNTP repository. -->
             <newsgroups>
               <newsgroup>org.apache.james.dev</newsgroup>
               <newsgroup>org.apache.james.user</newsgroup>
               <newsgroup>org.apache.avalon.dev</newsgroup>
               <newsgroup>org.apache.avalon.user</newsgroup>
             </newsgroups>
  
             <spool>
               <configuration>
                 <spoolPath>file://var/nntp/spool</spoolPath>
                 <threadCount>1</threadCount>
                 <threadIdleTime>1000</threadIdleTime>
               </configuration>
             </spool>
           </configuration>
       </component>
  
       <component name="nntp" class="org.apache.james.nntpserver.NNTPServer"  
             activation="false">
           <configuration enabled="false">
             <port>119</port>
             <handler>
               <helloName autodetect="true"/>
               <connectiontimeout>120000</connectiontimeout>
               <authRequired>false</authRequired>
             </handler>
           </configuration>
       </component>
  
       <component name="fetchpop" class="org.apache.james.fetchpop.FetchScheduler" 
             activation="false">
          <configuration enabled="false">
            <fetch name="mydomain.com">
              <host>mail.mydomain.com</host>
              <!-- Account login username -->
              <user>username</user>
              <!-- Account login password -->
              <password>pass</password>
              <interval>600000</interval>
            </fetch>
           </configuration>
       </component>
  
     </implementation>
  
  </block>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org