I found a bug with exactly the same problem but the answer was the same as Martijn's - spool does not work with dbfile.

http://issues.apache.org/jira/browse/JAMES-309

But there are examples for spool configurations with dbfile everywhere and I'm confused.

See this http://james.apache.org/server/2.3.1/using_database.html

Which is true?

On 19.10.2008, at 20:11, zkn wrote:

This is from the example configuration in JAMES distribution:

<!-- Alternative spool repository definition for JDBC use -->
  <!-- Stores message body in file system, rest in database -->
  <!--
<spoolrepository destinationURL="dbfile://maildb/spool/spool" type="SPOOL"/>
  -->

I suppose that spool is considered mail repository, not like nntp or users store.

Perhaps the attachment was deleted by the mail server so I will paste it below.

On 19.10.2008, at 19:46, Martijn Brinkers wrote:

DBFile cannot be used for spool only for mail repositories
.

See http://james.apache.org/server/2.3.1/repositories.html
.

Martijn
.

BTW I did not see any attachment
.

On Sun, 2008-10-19 at 19:35 +0300, zkn wrote:
Hi,

we use James as a smart host - it receives all emails and then
forwards some of them to our main server. I tried to switch it from
file storage to dbfile storage but then james started forwarding only
the headers of the emails. The source of the emails was missing. Can
anyone help?

Attached is the configuration file of the mail server with some
unimportant lines removed.



Thanks,
Ozkan



<?xml version="1.0"?>
<!DOCTYPE config [
<!ENTITY listserverConfig SYSTEM "../conf/james-listmanager.xml">
<!ENTITY listserverStores SYSTEM "../conf/james-liststores.xml">
<!ENTITY fetchmailConfig SYSTEM "../conf/james-fetchmail.xml">
<!ENTITY smtphandlerchainConfig SYSTEM "../conf/james- smtphandlerchain.xml">
<!ENTITY servernames SYSTEM "servernames.xml">
]>
<config>
  <James>

     <postmaster>[EMAIL PROTECTED]</postmaster>

     &servernames;
.

<usernames ignoreCase="true" enableAliases="true" enableForwarding="true"/>

     <inboxRepository>
<repository destinationURL="file://var/mail/inboxes/" type="MAIL"/>
     </inboxRepository>

  </James>

<!-- Set the Java packages from which to load mailets and matchers -->
  <mailetpackages>
     <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
<mailetpackage>org.apache.james.transport.mailets.smime</ mailetpackage>
  </mailetpackages>
  <matcherpackages>
<matcherpackage>org.apache.james.transport.matchers</ matcherpackage> <matcherpackage>org.apache.james.transport.matchers.smime</ matcherpackage>
  </matcherpackages>

  <spoolmanager>
     <threads> 100 </threads>

     <processor name="root">
                
                <mailet match="RelayLimit=30" class="ToRepository">
                        <repositoryPath> 
file://var/mail/relay-limit/</repositoryPath>
                </mailet>

                <mailet match="HostIsNotLocal" class="ToProcessor">
                        <processor> transport </processor>
                </mailet>
                
<mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.cmd *.pif *.scr *.vbs *.avi *.mp3 *.mpeg *.shs" class="ToRepository" onMatchException="noMatch">
                        
<repositoryPath>file://var/mail/virus-attachment/</repositoryPath>
                </mailet>
                
<mailet match="CompareNumericHeaderValue=X-Spam-Hits > 6" class="Null" />

<mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ClamAVScan" onMailetException="ignore">
                        <debug> true </debug>
                </mailet>
                
<mailet match="HasMailAttributeWithValue=org.apache.james.infected, true" class="ToRepository">
                        <repositoryPath>file://var/mail/virus/</repositoryPath>
                </mailet>

<!-- if the recipient is local and the email is good then forward to MAIN -->
                <mailet match="All" class="RemoteDelivery">
                        <!--
                        <outgoing> file://var/mail/relay/ </outgoing>
                        -->
                        
                        <outgoing> dbfile://maildb/spool/relay </outgoing>
                        
                        <delayTime> 21600000 </delayTime>
                        <maxRetries> 500 </maxRetries>
                        <deliveryThreads> 100 </deliveryThreads>
                        <gateway> GATEWAY_IP </gateway>
                        <gatewayPort> 25 </gatewayPort>
                </mailet>
                
        </processor>

     <processor name="error">
        <!-- Logs any messages to the repository specified -->
        <mailet match="All" class="ToRepository">
           <repositoryPath> file://var/mail/error/</repositoryPath>
        </mailet>
     </processor>

     <processor name="transport">

        <mailet match="All" class="RemoteDelivery">
                        <!--
           <outgoing> file://var/mail/outgoing/ </outgoing>
           -->

           <outgoing> dbfile://maildb/spool/outgoing </outgoing>

           <delayTime>  5 minutes </delayTime>
           <delayTime> 10 minutes </delayTime>
           <delayTime> 45 minutes </delayTime>
           <delayTime>  2 hours </delayTime>
           <delayTime>  3 hours </delayTime>
           <delayTime>  6 hours </delayTime>
           <maxRetries> 25 </maxRetries>

           <deliveryThreads> 25 </deliveryThreads>

           <sendpartial>false</sendpartial>

           <bounceProcessor>bounces</bounceProcessor>
        </mailet>

     </processor>

     <processor name="spam">
        <mailet match="All" class="ToRepository">
           <repositoryPath>file://var/mail/spam/</repositoryPath>
        </mailet>
     </processor>
.

     <processor name="virus">
        <mailet match="All" class="ToRepository">
           <repositoryPath>file://var/mail/virus/</repositoryPath>
        </mailet>
     </processor>
.

     <processor name="virus-attachment">
       <mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/virus-attachment/</ repositoryPath>
        </mailet>
     </processor>

     <processor name="local-address-error">
        <mailet match="All" class="ToRepository">
<repositoryPath> file://var/mail/address-error/</ repositoryPath>
        </mailet>
     </processor>

     <processor name="bounces">
        <mailet match="All" class="DSNBounce">
           <passThrough>false</passThrough>
        </mailet>
     </processor>
  </spoolmanager>

  <dnsserver>
     <servers>
                <server>DNS_IP</server>
                <server>DNS2_IP</server>
     </servers>

     <autodiscover>false</autodiscover>
     <authoritative>false</authoritative>

     <maxcachesize>50000</maxcachesize>
  </dnsserver>

  <smtpserver enabled="true">
     <port>25</port>

          <connectionLimit> 100 </connectionLimit>
.

     <handler>
        <helloName autodetect="true">HELLO_NAME</helloName>
        <connectiontimeout>360000</connectiontimeout>

        <authRequired>true</authRequired>
        <authorizedAddresses>127.0.0.0/8</authorizedAddresses>
        <maxmessagesize>0</maxmessagesize>
     </handler>


  </smtpserver>
  <!--
<spoolrepository destinationURL="file://var/mail/spool/" type="SPOOL"/>
  -->

<spoolrepository destinationURL="dbfile://maildb/spool/spool" type="SPOOL"/>

  <mailstore>
     <repositories>

<!-- 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/mail/dbspool</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/mail/dbspool</filestore>
              <maxcache>1000</maxcache>
           </config>
        </repository>

<!-- File based repositories. These repositories store all message data -->
        <!-- in the file system. -->
<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>

<repository class = "orgapachejames .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 = "orgapachejames .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>

  </mailstore>


  <!-- The User Storage block -->
  <users-store>
<repository name="LocalUsers" class="org.apache.james.userrepository.UsersFileRepository">
        <destination URL="file://var/users/"/>
     </repository>
  </users-store>

        <!-- The database-connections block -->
        <database-connections>
<data-source name="maildb" class="org.apache.james.util.dbcp.JdbcDataSource">
        <driver>com.mysql.jdbc.Driver</driver>
        <dburl>jdbc:mysql://127.0.0.1/mail?autoReconnect=true</dburl>
        <user>james</user>
        <password>grapefruit</password>
        <max>200</max>
     </data-source>
  </database-connections>

  <connections>
     <idle-timeout>300000</idle-timeout>
     <max-connections>200</max-connections>
  </connections>

  <sockets>
     <server-sockets>
<factory name="plain" class = "orgapache .avalon.cornerstone.blocks.sockets.DefaultServerSocketFactory"/>
     </server-sockets>
     <client-sockets>
<factory name="plain" class ="org.apache.avalon.cornerstone.blocks.sockets.DefaultSocketFactory"/>
     </client-sockets>
  </sockets>

  <thread-manager>
     <thread-group>
        <name>default</name>
        <priority>5</priority>
        <is-daemon>false</is-daemon>
        <max-threads>400</max-threads>
        <min-threads>100</min-threads>
        <min-spare-threads>20</min-spare-threads>
     </thread-group>

     <thread-group>
        <name>smtp</name>
        <priority>5</priority>
        <is-daemon>false</is-daemon>
        <max-threads>30</max-threads>
        <min-threads>10</min-threads>
        <min-spare-threads>10</min-spare-threads>
     </thread-group>
  </thread-manager>
</config>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to