adds the deploy scripts

This commit is contained in:
Timothy Prepscius 2013-08-09 17:31:37 -04:00
parent ecb46a040d
commit f6035b0ca5
163 changed files with 7387 additions and 0 deletions

1
deploy/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
www/

9
deploy/deploy-all Executable file
View File

@ -0,0 +1,9 @@
./server-shutdown tunnel
./server-deploy tomcat
./server-deploy james
./server-deploy mail-user
./server-deploy mail-key
./server-deploy tools
./web-deploy
./server-deploy tunnel

6
deploy/dev-deploy-all Executable file
View File

@ -0,0 +1,6 @@
./dev-server-deploy tomcat
./dev-server-deploy james
./dev-server-deploy mail-user
./dev-server-deploy mail-key
./dev-server-deploy tools

24
deploy/dev-server-deploy Executable file
View File

@ -0,0 +1,24 @@
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
server="red"
echo stopping...
ssh $1@$server "cd deploy && ./shutdown"
echo transfering
rsync -avzL --delete $1/ $1@$server:deploy
echo cataloging
ssh $1@$server "cd deploy && ./catalog"
echo starting...
ssh $1@$server "cd deploy && ./run"
echo tailing...
sleep 2
ssh $1@$server "tail run.log"
echo ...
echo "***** remember to restart mail-user if you restart-james *****"

5
deploy/dev-tomcat-restart Executable file
View File

@ -0,0 +1,5 @@
server="red"
echo restarting...
ssh tomcat@$server "cd deploy && ./restart"

5
deploy/dev-watch Executable file
View File

@ -0,0 +1,5 @@
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
server="red"
ssh $1@$server "tail -n 100 -f run.log"

2
deploy/dev-web-deploy Executable file
View File

@ -0,0 +1,2 @@
rsync -avL --exclude="WEB-INF" --delete ../gwt/war/ tprepscius@red:www/

7
deploy/dev-web-deploy-s3 Executable file
View File

@ -0,0 +1,7 @@
./web-deploy
s3cmd sync www/ s3://www.mailiverse.com/beta/ --acl-public --delete-removed
echo putting files with cache control headers
s3cmd put www/index.html s3://www.mailiverse.com/beta/ --acl-public --add-header "Cache-Control: max-age:3600"
s3cmd put www/mailiverse_gwt/mailiverse_gwt.nocache.js s3://www.mailiverse.com/beta/mailiverse_gwt/ --acl-public --add-header "Cache-Control: no-cache"
echo done

0
deploy/james. Normal file
View File

View File

@ -0,0 +1,40 @@
<?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.
-->
<!-- Use this file to overwriting the annotations defined in the JPA domain classes -->
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
version="2.0">
<entity class="org.apache.james.mailbox.jpa.mail.model.JPAHeader">
<table name="JAMES_MAIL_HEADER"/>
<attributes>
<basic name="value">
<column name="HEADER_VALUE" length="8000" />
</basic>
</attributes>
</entity>
</entity-mappings>

View File

@ -0,0 +1,6 @@
You can place here any configuration file you find in
http://svn.apache.org/repos/asf/james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/
This will override the configuration loaded from classpath from mailbox-spring.jar.
If you create a file, ensure that the configuration in that file in complete (we don't support partial file-based configuration).

View File

@ -0,0 +1,32 @@
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd">
<!--
Mailbox Authenticator
-->
<bean id="authenticator" class="org.apache.james.adapter.mailbox.store.UserRepositoryAuthenticator"/>
</beans>

View File

@ -0,0 +1,58 @@
<?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"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd">
<!--
Mailbox HBase
Uncomment the definitions if you are using a real hbase cluster.
-->
<!--
This is the link to the HBase Cluster. You need to place a valid hbase
config file on the classpath that will be picked up by HBaseConfiguration.create().
-->
<!--
<bean id="hbase-conf" class="org.apache.hadoop.hbase.HBaseConfiguration" factory-method="create" />
<bean id="hbase-mailboxmanager" class="org.apache.james.mailbox.hbase.HBaseMailboxManager" init-method="init">
<constructor-arg index="0" ref="hbase-sessionMapperFactory"/>
<constructor-arg index="1" ref="authenticator"/>
<constructor-arg index="2" ref="hbase-locker"/>
</bean>
<bean id="hbase-sessionMapperFactory" class="org.apache.james.mailbox.hbase.HBaseMailboxSessionMapperFactory">
<constructor-arg index="0" ref="hbase-conf"/>
<constructor-arg index="1" ref="hbase-uidProvider"/>
<constructor-arg index="2" ref="hbase-modSeqProvider"/>
</bean>
<bean id="hbase-uidProvider" class="org.apache.james.mailbox.hbase.mail.HBaseUidProvider">
<constructor-arg index="0" ref="hbase-conf"/>
</bean>
<bean id="hbase-modSeqProvider" class="org.apache.james.mailbox.hbase.mail.HBaseModSeqProvider">
<constructor-arg index="0" ref="hbase-conf"/>
</bean>
<alias name="jvm-locker" alias="hbase-locker"/>
-->
</beans>

View File

@ -0,0 +1,373 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://camel.apache.org/schema/spring classpath:camel-spring.xsd
http://activemq.apache.org/schema/core classpath:activemq.xsd">
<!--
===========================================================================
Spring Wiring for James Server: Annotation, Bean Post-Processors...
===========================================================================
-->
<!--
Enable Java Annotations processing.
-->
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor">
<property name="order" value="3" />
</bean>
<!--
Enable support for Persistence Annotations processing.
-->
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
<!--
Spring "Bean-Post-Processor" for LogEnabled interface.
-->
<bean class="org.apache.james.container.spring.lifecycle.LogEnabledBeanPostProcessor">
<property name="logProvider" ref="logprovider" />
<property name="order" value="0" />
</bean>
<bean id="logprovider" class="org.apache.james.container.spring.lifecycle.LogProviderImpl">
</bean>
<!--
Configuration "Bean-Factory-Post-Processor"
responsible to register beans from James specific configuration files
-->
<bean class="org.apache.james.container.spring.bean.factorypostprocessor.ConfigurationBeanFactoryPostProcessor">
<property name="beans">
<map>
<!-- User Repository-->
<entry>
<key>
<value>usersrepository</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
<!-- Recipient Rewrite Table-->
<entry>
<key>
<value>recipientrewritetable</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
<!-- Domain List -->
<entry>
<key>
<value>domainlist</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
<entry>
<key>
<value>usersrepository23</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
</map>
</property>
</bean>
<!--
Spring "Bean-Post-Processor" for Configurable interface.
-->
<bean class="org.apache.james.container.spring.lifecycle.ConfigurableBeanPostProcessor">
<property name="configurationProvider" ref="configurationprovider" />
<property name="order" value="1" />
</bean>
<bean id="configurationprovider" class="org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl">
<property name="configurationMappings">
<map>
<entry key="mailprocessor" value="mailetcontainer.processors"/>
<entry key="mailspooler" value="mailetcontainer.spooler"/>
<entry key="mailetcontext" value="mailetcontainer.context"/>
</map>
</property>
</bean>
<!--
Mail Repository Store "Bean-Factory"
-->
<bean id="mailrepositorystore" class="org.apache.james.container.spring.bean.factory.mailrepositorystore.MailRepositoryStoreBeanFactory" />
<!--
===========================================================================
Queues
===========================================================================
-->
<!--
Mail Queue Factory
-->
<bean id="mailqueuefactory" class="org.apache.james.queue.activemq.ActiveMQMailQueueFactory" depends-on="broker"/>
<!--
ActiveMQ: Broker, Connections, BlobTransferPolicy...
-->
<amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/store/activemq/brokers" useShutdownHook="false" schedulerSupport="false" id="broker">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
<!-- Support priority handling of messages -->
<!-- http://activemq.apache.org/how-can-i-support-priority-queues.html -->
<amq:policyEntry queue=">" prioritizedMessages="true"/>
</amq:policyEntries>
</amq:policyMap>
</amq:destinationPolicy>
<amq:managementContext>
<amq:managementContext createConnector="false"/>
</amq:managementContext>
<amq:persistenceAdapter>
<amq:amqPersistenceAdapter/>
</amq:persistenceAdapter>
<amq:plugins>
<amq:statisticsBrokerPlugin/>
</amq:plugins>
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
<amq:connectionFactory id="amqConnectionFactory" brokerURL="vm://james?create=false">
<amq:prefetchPolicy>
<!-- Disable prefetch so slow consuming can not block other threads -->
<!-- See JAMES-1253 -->
<amq:prefetchPolicy queuePrefetch="0" topicPrefetch="0"/>
</amq:prefetchPolicy>
<property name="blobTransferPolicy" ref="blobTransferPolicy"/>
</amq:connectionFactory>
<bean id="blobTransferPolicy" class="org.apache.james.queue.activemq.FileSystemBlobTransferPolicy">
<property name="defaultUploadUrl" value="file://var/store/activemq/blob-transfer"/>
</bean>
<bean id="jmsConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
<property name="targetConnectionFactory" ref="amqConnectionFactory"/>
<property name="sessionCacheSize" value="10"/>
<property name="cacheConsumers" value="false"/>
<property name="cacheProducers" value="true"/>
</bean>
<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>
<!--
===========================================================================
Mailet Container
===========================================================================
-->
<!--
Mailet Container Beans.
-->
<bean id="mailprocessor" name="processorRoute" class="org.apache.james.mailetcontainer.impl.camel.CamelCompositeProcessor"/>
<!--
!!! mailetcontext bean must be defined after mailProcessor
otherwise LogEnabled injection via LogEnabledBeanPostProcessor will not occur before
it is used - Seems like a Spring bug...
-->
<bean id="mailetcontext" class="org.apache.james.mailetcontainer.impl.JamesMailetContext"/>
<bean id="mailspooler" class="org.apache.james.mailetcontainer.impl.JamesMailSpooler"/>
<!--
Mailet and Matcher "Bean-Factory".
-->
<bean id="mailetloader" class="org.apache.james.container.spring.bean.factory.mailetcontainer.MailetLoaderBeanFactory" />
<bean id="matcherloader" class="org.apache.james.container.spring.bean.factory.mailetcontainer.MatcherLoaderBeanFactory" />
<!--
Camel Context
-->
<camel:camelContext id="jamesCamelContext" trace="false" >
<camel:jmxAgent id="agent" disabled="false" createConnector="false" serviceUrlPath="/jmxrmi/jamescamel"/>
<camel:template id="producerTemplate"/>
</camel:camelContext>
<!--
===========================================================================
File System
===========================================================================
-->
<bean class="org.apache.james.container.spring.bean.factorypostprocessor.FileSystemBeanFactoryPostProcessor">
<property name="fileSystem" ref="filesystem" />
</bean>
<bean id="filesystem" class="org.apache.james.container.spring.filesystem.FileSystemImpl" />
<!--
===========================================================================
DNS Service
===========================================================================
-->
<bean id="dnsservice" class="org.apache.james.dnsservice.dnsjava.DNSJavaService" />
<!--
===========================================================================
Mail Protocol Servers
===========================================================================
-->
<bean id="protocolhandlerloader" class="org.apache.james.container.spring.bean.factory.protocols.ProtocolHandlerLoaderBeanFactory" />
<!--
SMTP Server
-->
<bean id="smtpserver" class="org.apache.james.smtpserver.netty.SMTPServerFactory"/>
<!--
===========================================================================
Mailbox
===========================================================================
-->
<!--
Mailbox Managers
-->
<bean class="org.apache.james.container.spring.bean.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor"/>
<bean id="locker" class="org.apache.james.mailbox.store.JVMMailboxPathLocker"/>
<import resource="classpath:META-INF/org/apache/james/spring-mailbox.xml" />
<!--
Mailbox Copier
-->
<bean id="mailboxcopier" class="org.apache.james.mailbox.copier.MailboxCopierImpl"/>
<!--
Mailbox Importer
-->
<bean id="james23importer" class="org.apache.james.container.spring.tool.James23Importer"/>
<!--
===========================================================================
Database DataSource
===========================================================================
-->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name ="location" value="classpath:james-database.properties"/>
</bean>
<bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${database.driverClassName}" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.username}" />
<property name="password" value="${database.password}" />
<!--The value for maxActive should always be larger than the number of spooler threads. The-->
<!--reason is that a spooler thread normally requires 1 connection to process a mail, however-->
<!--sometimes OpenJPA requires 1 connection to finish the processing on top of that. If-->
<!-- maxActive <= num spooler threads,-->
<!--it can happen that the spooler threads grab all maxActive connections but then cannot-->
<!--finish processing because each of them blocks waiting for OpenJPA which itself is waiting-->
<!--for a connection. See https://issues.apache.org/jira/browse/JAMES-1317.-->
<property name="maxActive" value="21"/>
<!-- This lets a mail fail to be processed rather than the server freezing. -->
<property name="maxWait" value="30000"/>
<!-- This keeps the number of connections in the pool low on average -->
<property name="timeBetweenEvictionRunsMillis" value="300000"/>
<property name="minEvictableIdleTimeMillis" value="300000"/>
<property name="removeAbandoned" value="true"/>
<property name="logAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="300"/>
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="datasource"/>
<property name="jpaVendorAdapter" ref="vendorAdapter"/>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
</bean>
<bean id="vendorAdapter" class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
<property name="database" value="${vendorAdapter.database}"/>
<!-- set this to true for debugging purposes -->
<property name="showSql" value="false"/>
</bean>
<!--
===========================================================================
JMX
===========================================================================
-->
<!--
JMX Server
-->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="location" value="classpath:jmx.properties"/>
</bean>
<bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean" >
<property name="locateExistingServerIfPossible" value="true"/>
<property name="registerWithFactory" value="true"/>
</bean>
<bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry">
<property name="objectName" value="connector:name=rmi" />
<property name="serviceUrl" value="service:jmx:rmi://${jmx.address}/jndi/rmi://${jmx.address}:${jmx.port}/jmxrmi" />
</bean>
<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
<property name="port" value="${jmx.port}" />
<property name="serverSocketFactory" ref="restrictedRmiSocketFactory"/>
<property name="clientSocketFactory" ref="restrictedRmiSocketFactory"/>
</bean>
<bean id="restrictedRmiSocketFactory" class="org.apache.james.util.RestrictingRMISocketFactory">
<constructor-arg value="${jmx.address}"/>
</bean>
<!--
JMX Export
-->
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
<map>
<entry key="org.apache.james:type=component,name=domainlist" value-ref="domainlistmanagement"/>
<entry key="org.apache.james:type=component,name=dnsservice" value-ref="dnsservice"/>
<entry key="org.apache.james:type=component,name=recipientrewritetable" value-ref="recipientrewritetablemanagement"/>
<entry key="org.apache.james:type=component,name=usersrepository" value-ref="usersrepositorymanagement"/>
<!-- <entry key="org.apache.james:type=component,name=fetchmail" value-ref="fetchmail"/> -->
<entry key="org.apache.james:type=component,name=mailboxmanagement" value-ref="mailboxmanagermanagement"/>
<entry key="org.apache.james:type=component,component=mailetcontainer,name=mailspooler" value-ref="mailspooler"/>
<entry key="org.apache.james:type=component,name=mailboxcopier" value-ref="mailboxcopiermanagement"/>
<entry key="org.apache.james:type=component,name=james23importer" value-ref="james23importermanagement"/>
<entry key="org.apache.james:type=container,name=logprovider" value-ref="logprovider"/>
</map>
</property>
<property name="assembler">
<bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
<!-- <property name="managedInterfaces" value="org.apache.james.fetchmail.FetchSchedulerMBean,org.apache.james.domainlist.api.DomainListManagementMBean,org.apache.james.dnsservice.api.DNSServiceMBean,org.apache.james.rrt.api.RecipientRewriteTableManagementMBean,org.apache.james.user.api.UsersRepositoryManagementMBean,org.apache.james.adapter.mailbox.MailboxManagerManagementMBean,org.apache.james.container.spring.mailbox.MailboxCopierManagementMBean,org.apache.james.mailetcontainer.api.jmx.MailSpoolerMBean,org.apache.james.container.spring.lifecycle.LogProviderManagementMBean"/> -->
<property name="managedInterfaces" value="org.apache.james.domainlist.api.DomainListManagementMBean,org.apache.james.dnsservice.api.DNSServiceMBean,org.apache.james.rrt.api.RecipientRewriteTableManagementMBean,org.apache.james.user.api.UsersRepositoryManagementMBean,org.apache.james.adapter.mailbox.MailboxManagerManagementMBean,org.apache.james.container.spring.mailbox.MailboxCopierManagementMBean,org.apache.james.mailetcontainer.api.jmx.MailSpoolerMBean,org.apache.james.container.spring.lifecycle.LogProviderManagementMBean"/>
</bean>
</property>
</bean>
<bean id="usersrepositorymanagement" class="org.apache.james.user.lib.UsersRepositoryManagement" />
<bean id="recipientrewritetablemanagement" class="org.apache.james.rrt.lib.RecipientRewriteTableManagement" />
<bean id="domainlistmanagement" class="org.apache.james.domainlist.lib.DomainListManagement" />
<bean id="mailboxmanagermanagement" class="org.apache.james.adapter.mailbox.MailboxManagerManagement" />
<bean id="mailboxcopiermanagement" class="org.apache.james.container.spring.mailbox.MailboxCopierManagement" />
<bean id="james23importermanagement" class="org.apache.james.container.spring.tool.James23ImporterManagement" />
</beans>

View File

@ -0,0 +1,419 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://camel.apache.org/schema/spring classpath:camel-spring.xsd
http://activemq.apache.org/schema/core classpath:activemq.xsd">
<!--
===========================================================================
Spring Wiring for James Server: Annotation, Bean Post-Processors...
===========================================================================
-->
<!--
Enable Java Annotations processing.
-->
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor">
<property name="order" value="3" />
</bean>
<!--
Enable support for Persistence Annotations processing.
-->
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
<!--
Spring "Bean-Post-Processor" for LogEnabled interface.
-->
<bean class="org.apache.james.container.spring.lifecycle.LogEnabledBeanPostProcessor">
<property name="logProvider" ref="logprovider" />
<property name="order" value="0" />
</bean>
<bean id="logprovider" class="org.apache.james.container.spring.lifecycle.LogProviderImpl">
</bean>
<!--
Configuration "Bean-Factory-Post-Processor"
responsible to register beans from James specific configuration files
-->
<bean class="org.apache.james.container.spring.bean.factorypostprocessor.ConfigurationBeanFactoryPostProcessor">
<property name="beans">
<map>
<!-- User Repository-->
<entry>
<key>
<value>usersrepository</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
<!-- Recipient Rewrite Table-->
<entry>
<key>
<value>recipientrewritetable</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
<!-- Domain List -->
<entry>
<key>
<value>domainlist</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
<entry>
<key>
<value>usersrepository23</value>
</key>
<!-- no alias needed -->
<value></value>
</entry>
</map>
</property>
</bean>
<!--
Spring "Bean-Post-Processor" for Configurable interface.
-->
<bean class="org.apache.james.container.spring.lifecycle.ConfigurableBeanPostProcessor">
<property name="configurationProvider" ref="configurationprovider" />
<property name="order" value="1" />
</bean>
<bean id="configurationprovider" class="org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl">
<property name="configurationMappings">
<map>
<entry key="mailprocessor" value="mailetcontainer.processors"/>
<entry key="mailspooler" value="mailetcontainer.spooler"/>
<entry key="mailetcontext" value="mailetcontainer.context"/>
</map>
</property>
</bean>
<!--
Mail Repository Store "Bean-Factory"
-->
<bean id="mailrepositorystore" class="org.apache.james.container.spring.bean.factory.mailrepositorystore.MailRepositoryStoreBeanFactory" />
<!--
===========================================================================
Queues
===========================================================================
-->
<!--
Mail Queue Factory
-->
<bean id="mailqueuefactory" class="org.apache.james.queue.activemq.ActiveMQMailQueueFactory" depends-on="broker"/>
<!--
ActiveMQ: Broker, Connections, BlobTransferPolicy...
-->
<amq:broker useJmx="true" persistent="true" brokerName="james" dataDirectory="filesystem=file://var/store/activemq/brokers" useShutdownHook="false" schedulerSupport="false" id="broker">
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
<!-- Support priority handling of messages -->
<!-- http://activemq.apache.org/how-can-i-support-priority-queues.html -->
<amq:policyEntry queue=">" prioritizedMessages="true"/>
</amq:policyEntries>
</amq:policyMap>
</amq:destinationPolicy>
<amq:managementContext>
<amq:managementContext createConnector="false"/>
</amq:managementContext>
<amq:persistenceAdapter>
<amq:amqPersistenceAdapter/>
</amq:persistenceAdapter>
<amq:plugins>
<amq:statisticsBrokerPlugin/>
</amq:plugins>
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
<amq:connectionFactory id="amqConnectionFactory" brokerURL="vm://james?create=false">
<amq:prefetchPolicy>
<!-- Disable prefetch so slow consuming can not block other threads -->
<!-- See JAMES-1253 -->
<amq:prefetchPolicy queuePrefetch="0" topicPrefetch="0"/>
</amq:prefetchPolicy>
<property name="blobTransferPolicy" ref="blobTransferPolicy"/>
</amq:connectionFactory>
<bean id="blobTransferPolicy" class="org.apache.james.queue.activemq.FileSystemBlobTransferPolicy">
<property name="defaultUploadUrl" value="file://var/store/activemq/blob-transfer"/>
</bean>
<bean id="jmsConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
<property name="targetConnectionFactory" ref="amqConnectionFactory"/>
<property name="sessionCacheSize" value="10"/>
<property name="cacheConsumers" value="false"/>
<property name="cacheProducers" value="true"/>
</bean>
<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>
<!--
===========================================================================
Mailet Container
===========================================================================
-->
<!--
Mailet Container Beans.
-->
<bean id="mailprocessor" name="processorRoute" class="org.apache.james.mailetcontainer.impl.camel.CamelCompositeProcessor"/>
<!--
!!! mailetcontext bean must be defined after mailProcessor
otherwise LogEnabled injection via LogEnabledBeanPostProcessor will not occur before
it is used - Seems like a Spring bug...
-->
<bean id="mailetcontext" class="org.apache.james.mailetcontainer.impl.JamesMailetContext"/>
<bean id="mailspooler" class="org.apache.james.mailetcontainer.impl.JamesMailSpooler"/>
<!--
Mailet and Matcher "Bean-Factory".
-->
<bean id="mailetloader" class="org.apache.james.container.spring.bean.factory.mailetcontainer.MailetLoaderBeanFactory" />
<bean id="matcherloader" class="org.apache.james.container.spring.bean.factory.mailetcontainer.MatcherLoaderBeanFactory" />
<!--
Camel Context
-->
<camel:camelContext id="jamesCamelContext" trace="false" >
<camel:jmxAgent id="agent" disabled="false" createConnector="false" serviceUrlPath="/jmxrmi/jamescamel"/>
<camel:template id="producerTemplate"/>
</camel:camelContext>
<!--
===========================================================================
File System
===========================================================================
-->
<bean class="org.apache.james.container.spring.bean.factorypostprocessor.FileSystemBeanFactoryPostProcessor">
<property name="fileSystem" ref="filesystem" />
</bean>
<bean id="filesystem" class="org.apache.james.container.spring.filesystem.FileSystemImpl" />
<!--
===========================================================================
DNS Service
===========================================================================
-->
<bean id="dnsservice" class="org.apache.james.dnsservice.dnsjava.DNSJavaService" />
<!--
===========================================================================
FetchMail
===========================================================================
-->
<bean id="fetchmail" class="org.apache.james.fetchmail.FetchScheduler" />
<!--
===========================================================================
Mail Protocol Servers
===========================================================================
-->
<bean id="protocolhandlerloader" class="org.apache.james.container.spring.bean.factory.protocols.ProtocolHandlerLoaderBeanFactory" />
<!--
SMTP Server
-->
<bean id="smtpserver" class="org.apache.james.smtpserver.netty.SMTPServerFactory"/>
<!--
LMTP Server
-->
<bean id="lmtpserver" class="org.apache.james.lmtpserver.netty.LMTPServerFactory"/>
<!--
POP3 Server
-->
<bean id="pop3server" class="org.apache.james.pop3server.netty.POP3ServerFactory"/>
<!--
IMAP Server
-->
<bean id="imapserver" class="org.apache.james.imapserver.netty.IMAPServerFactory">
<property name="imapDecoder" ref="imapDecoder"/>
<property name="imapEncoder" ref="imapEncoder"/>
</bean>
<!-- The imapProcessor configuration will be reviewed when IMAP will be integrated into Protocols project -->
<!-- Temporary configuration - see IMAP-357 -->
<bean id="imapProcessor" class="org.apache.james.imap.processor.main.DefaultImapProcessorFactory" factory-method="createXListSupportingProcessor">
<constructor-arg index="0" ref="mailboxmanager"/>
<constructor-arg index="1" ref="subscriptionManager"/>
<!-- The mailboxTyper -->
<constructor-arg index="2" value="#{null}"/>
<!-- The idleKeepAlive -->
<constructor-arg index="3" value="120"/>
<!-- The list of disabled capabilities -->
<constructor-arg index="4">
<set>
<value>ACL</value>
</set>
</constructor-arg>
</bean>
<bean id="imapDecoder" factory-bean="imapDecoderFactory" factory-method="buildImapDecoder"/>
<bean id="imapDecoderFactory" class="org.apache.james.imap.main.DefaultImapDecoderFactory"/>
<bean id="imapEncoder" factory-bean="imapEncoderFactory" factory-method="buildImapEncoder"/>
<bean id="imapEncoderFactory" class="org.apache.james.imap.encode.main.DefaultImapEncoderFactory"/>
<!--
===========================================================================
Mailbox
===========================================================================
-->
<!--
Mailbox Managers
-->
<bean class="org.apache.james.container.spring.bean.factorypostprocessor.MailboxConfigurationBeanFactoryPostProcessor"/>
<bean id="locker" class="org.apache.james.mailbox.store.JVMMailboxPathLocker"/>
<import resource="classpath:META-INF/org/apache/james/spring-mailbox.xml" />
<!--
Mailbox Copier
-->
<bean id="mailboxcopier" class="org.apache.james.mailbox.copier.MailboxCopierImpl"/>
<!--
Mailbox Importer
-->
<bean id="james23importer" class="org.apache.james.container.spring.tool.James23Importer"/>
<!--
===========================================================================
Database DataSource
===========================================================================
-->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name ="location" value="classpath:james-database.properties"/>
</bean>
<bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${database.driverClassName}" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.username}" />
<property name="password" value="${database.password}" />
<!--The value for maxActive should always be larger than the number of spooler threads. The-->
<!--reason is that a spooler thread normally requires 1 connection to process a mail, however-->
<!--sometimes OpenJPA requires 1 connection to finish the processing on top of that. If-->
<!-- maxActive <= num spooler threads,-->
<!--it can happen that the spooler threads grab all maxActive connections but then cannot-->
<!--finish processing because each of them blocks waiting for OpenJPA which itself is waiting-->
<!--for a connection. See https://issues.apache.org/jira/browse/JAMES-1317.-->
<property name="maxActive" value="21"/>
<!-- This lets a mail fail to be processed rather than the server freezing. -->
<property name="maxWait" value="30000"/>
<!-- This keeps the number of connections in the pool low on average -->
<property name="timeBetweenEvictionRunsMillis" value="300000"/>
<property name="minEvictableIdleTimeMillis" value="300000"/>
<property name="removeAbandoned" value="true"/>
<property name="logAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="300"/>
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="datasource"/>
<property name="jpaVendorAdapter" ref="vendorAdapter"/>
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
</bean>
<bean id="vendorAdapter" class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
<property name="database" value="${vendorAdapter.database}"/>
<!-- set this to true for debugging purposes -->
<property name="showSql" value="false"/>
</bean>
<!--
===========================================================================
JMX
===========================================================================
-->
<!--
JMX Server
-->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="location" value="classpath:jmx.properties"/>
</bean>
<bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean" >
<property name="locateExistingServerIfPossible" value="true"/>
<property name="registerWithFactory" value="true"/>
</bean>
<bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry">
<property name="objectName" value="connector:name=rmi" />
<property name="serviceUrl" value="service:jmx:rmi://${jmx.address}/jndi/rmi://${jmx.address}:${jmx.port}/jmxrmi" />
</bean>
<bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean">
<property name="port" value="${jmx.port}" />
<property name="serverSocketFactory" ref="restrictedRmiSocketFactory"/>
<property name="clientSocketFactory" ref="restrictedRmiSocketFactory"/>
</bean>
<bean id="restrictedRmiSocketFactory" class="org.apache.james.util.RestrictingRMISocketFactory">
<constructor-arg value="${jmx.address}"/>
</bean>
<!--
JMX Export
-->
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
<property name="beans">
<map>
<entry key="org.apache.james:type=component,name=domainlist" value-ref="domainlistmanagement"/>
<entry key="org.apache.james:type=component,name=dnsservice" value-ref="dnsservice"/>
<entry key="org.apache.james:type=component,name=recipientrewritetable" value-ref="recipientrewritetablemanagement"/>
<entry key="org.apache.james:type=component,name=usersrepository" value-ref="usersrepositorymanagement"/>
<entry key="org.apache.james:type=component,name=fetchmail" value-ref="fetchmail"/>
<entry key="org.apache.james:type=component,name=mailboxmanagement" value-ref="mailboxmanagermanagement"/>
<entry key="org.apache.james:type=component,component=mailetcontainer,name=mailspooler" value-ref="mailspooler"/>
<entry key="org.apache.james:type=component,name=mailboxcopier" value-ref="mailboxcopiermanagement"/>
<entry key="org.apache.james:type=component,name=james23importer" value-ref="james23importermanagement"/>
<entry key="org.apache.james:type=container,name=logprovider" value-ref="logprovider"/>
</map>
</property>
<property name="assembler">
<bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler">
<property name="managedInterfaces" value="org.apache.james.fetchmail.FetchSchedulerMBean,org.apache.james.domainlist.api.DomainListManagementMBean,org.apache.james.dnsservice.api.DNSServiceMBean,org.apache.james.rrt.api.RecipientRewriteTableManagementMBean,org.apache.james.user.api.UsersRepositoryManagementMBean,org.apache.james.adapter.mailbox.MailboxManagerManagementMBean,org.apache.james.container.spring.mailbox.MailboxCopierManagementMBean,org.apache.james.mailetcontainer.api.jmx.MailSpoolerMBean,org.apache.james.container.spring.lifecycle.LogProviderManagementMBean"/>
</bean>
</property>
</bean>
<bean id="usersrepositorymanagement" class="org.apache.james.user.lib.UsersRepositoryManagement" />
<bean id="recipientrewritetablemanagement" class="org.apache.james.rrt.lib.RecipientRewriteTableManagement" />
<bean id="domainlistmanagement" class="org.apache.james.domainlist.lib.DomainListManagement" />
<bean id="mailboxmanagermanagement" class="org.apache.james.adapter.mailbox.MailboxManagerManagement" />
<bean id="mailboxcopiermanagement" class="org.apache.james.container.spring.mailbox.MailboxCopierManagement" />
<bean id="james23importermanagement" class="org.apache.james.container.spring.tool.James23ImporterManagement" />
</beans>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="James" transaction-type="RESOURCE_LOCAL">
<!-- Use the mappings to overwriting the annotations defined in the JPA domain classes -->
<mapping-file>META-INF/jpa-mappings-template.xml</mapping-file>
<!-- Mailbox stuff-->
<class>org.apache.james.mailbox.jpa.mail.model.JPAMailbox</class>
<class>org.apache.james.mailbox.jpa.mail.model.JPAUserFlag</class>
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage</class>
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage</class>
<!--
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAEncryptedMessage</class>
-->
<!-- This needs to get used when you want to use streaming. Remember to comment the following classes
org.apache.james.mailbox.jpa.mail.model.JPAMessage
If you don't do this the EntityManager will get confused!
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAStreamingMessage</class>
-->
<!-- Comment if you want to use streaming -->
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage</class>
<class>org.apache.james.mailbox.jpa.mail.model.JPAProperty</class>
<class>org.apache.james.mailbox.jpa.user.model.JPASubscription</class>
<!-- DomainList -->
<class>org.apache.james.domainlist.jpa.model.JPADomain</class>
<!-- User-->
<class>org.apache.james.user.jpa.model.JPAUser</class>
<!-- RecipientRewrite -->
<class>org.apache.james.rrt.jpa.model.JPARecipientRewrite</class>
<properties>
<!-- Create tables on startup -->
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
<!-- Create foreign keys on startup -->
<property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=cascade, JoinForeignKeyDeleteAction=cascade"/>
<!-- Reorder SQL statements to satisfy database foreign key constraints -->
<property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>
<!-- Disable query cache for now. It seems to be buggy. -->
<!-- See http://www.mail-archive.com/server-dev@james.apache.org/msg28802.html -->
<!-- See https://issues.apache.org/jira/browse/OPENJPA-1827 -->
<property name="openjpa.jdbc.QuerySQLCache" value="false"/>
<!-- Uncomment this if you want to see the generated SQL in the console.
<property name="openjpa.Log" value="SQL=TRACE"/>
-->
<!-- Uncomment this if you want to get verbose OpenJPA log the console.
<property name="openjpa.Log" value="DefaultLevel=TRACE"/>
-->
</properties>
</persistence-unit>
</persistence>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="James" transaction-type="RESOURCE_LOCAL">
<!-- Mailbox stuff-->
<class>org.apache.james.mailbox.jpa.mail.model.JPAMailbox</class>
<class>org.apache.james.mailbox.jpa.mail.model.JPAUserFlag</class>
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage</class>
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage</class>
<class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage</class>
<class>org.apache.james.mailbox.jpa.mail.model.JPAProperty</class>
<class>org.apache.james.mailbox.jpa.user.model.JPASubscription</class>
<class>org.apache.james.domainlist.jpa.model.JPADomain</class>
<class>org.apache.james.user.jpa.model.JPAUser</class>
<class>org.apache.james.rrt.jpa.model.JPARecipientRewrite</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
<property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=cascade, JoinForeignKeyDeleteAction=cascade"/>
<property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>
<property name="openjpa.jdbc.QuerySQLCache" value="false"/>
</properties>
</persistence-unit>
</persistence>

View File

@ -0,0 +1,65 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- DNS Service Block -->
<!-- -->
<!-- Specifies DNS Server information for use by various components inside -->
<!-- James. -->
<!-- -->
<!-- If autodiscover is true, James will attempt to autodiscover the DNS servers configured on your underlying system.-->
<!-- Currently, this works if the OS has a unix-like /etc/resolv.conf,-->
<!-- or the system is Windows based with ipconfig or winipcfg.-->
<!-- -->
<!-- If no DNS servers are found and you have not specified any below, 127.0.0.1 will be used-->
<!-- If you use autodiscover and add DNS servers manually a combination of all the dns servers will be used -->
<!-- -->
<!-- Information includes a list of DNS Servers to be used by James. These are -->
<!-- specified by the server elements, each of which is a child element of the -->
<!-- servers element. Each server element is the IP address of a single DNS server. -->
<!-- The servers element can have multiple server children. -->
<dnsservice>
<servers>
<!--Enter ip address of your DNS server, one IP address per server -->
<!-- element. -->
<!--
<server>127.0.0.1</server>
-->
</servers>
<!-- Change autodiscover to false if you would like to turn off autodiscovery -->
<!-- and set the DNS servers manually in the<servers>section -->
<autodiscover>true</autodiscover>
<authoritative>false</authoritative>
<!-- Maximum number of entries to maintain in the DNS cache -->
<maxcachesize>50000</maxcachesize>
<!-- Uncomment this if you want James to try a single server for each -->
<!-- multihomed mx host. -->
<!--
<singleIPperMX>true</singleIPperMX>
-->
</dnsservice>

View File

@ -0,0 +1,63 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- Domainnames identifies the DNS namespace served by this instance of James. -->
<!-- These domainnames are used for both matcher/mailet processing and SMTP auth -->
<!-- to determine when a mail is intended for local delivery. -->
<!-- -->
<!-- If autodetect is TRUE, James wil attempt to discover its own host name AND -->
<!-- use any explicitly specified servernames. -->
<!-- If autodetect is FALSE, James will use only the specified domainnames. -->
<!-- -->
<!-- If autodetectIP is not FALSE, James will also allow add the IP address for each servername. -->
<!-- The automatic IP detection is to support RFC 2821, Sec 4.1.3, address literals. -->
<!-- -->
<!-- To override autodetected domainames names simply add explicit domainname elements. -->
<!-- In most cases this will be necessary. -->
<!-- By default, the domainname 'localhost' is specified. This can be removed, if required. -->
<!-- -->
<!-- Warning: If you are using fetchmail it is important to include the -->
<!-- fetched domains in the server name list to prevent looping. -->
<!-- JPA implementation for DomainList -->
<domainlist class="org.apache.james.domainlist.jpa.JPADomainList">
<autodetect>true</autodetect>
<autodetectIP>true</autodetectIP>
<defaultDomain>localhost</defaultDomain>
</domainlist>
<!-- XML based implementation for DomainList -->
<!--
<domainlist class="org.apache.james.domainlist.xml.XMLDomainList">
<domainnames>
# <domainname>mailiverse.com</domainname>
</domainnames>
<autodetect>false</autodetect>
<autodetectIP>false</autodetectIP>
<defaultDomain>mailiverse.com</defaultDomain>
</domainlist>
-->

View File

@ -0,0 +1,288 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- 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">
<!-- The number of threads to use for the scheduled execution -->
<threads>5</threads>
<!-- The JMX Name to use -->
<jmxName>fetchmail</jmxName>
<!-- 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>

View File

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
* Copyright 2010 The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!--
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<configuration>
</configuration>

View File

@ -0,0 +1,80 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<imapservers>
<!-- IMAP server is enabled by default -->
<!-- Disabling blocks will stop them from listening, -->
<!-- but does not free as many resources as removing them would -->
<imapserver enabled="true">
<jmxName>imapserver</jmxName>
<!-- Configure this if you want to bind to a specific inetaddress -->
<!-- port 143 is the well-known/IANA registered port for IMAP -->
<!-- port 993 is the well-known/IANA registered port for IMAPS ie over SSL/TLS -->
<!-- Please NOTE: you should add this IP also to your RemoteAddrNotInNetwork -->
<!-- in order to avoid relay check for locally generated bounces -->
<bind>0.0.0.0:143</bind>
<connectionBacklog>200</connectionBacklog>
<!-- Set to true to use TLS for the Socket.
To use this you need to copy sunjce_provider.jar to /path/james/lib directory.
-->
<tls socketTLS="false" startTLS="false">
<!-- To create a new keystore execute:
keytool -genkey -alias james -keyalg RSA -keystore /path/to/james/conf/keystore
-->
<keystore>file://conf/keystore</keystore>
<secret>yoursecret</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
</tls>
<handler>
<!-- This is the name used by the server to identify itself in the SMTP -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<!--
<helloName autodetect="true">myMailServer</helloName>
-->
<!-- Connection timeout is 30 minutes and can not be changed - See rfc2060 5.4 for details -->
<!-- Set the maximum simultaneous incoming connections for this service -->
<connectionLimit>0</connectionLimit>
<!-- Set the maximum simultaneous incoming connections per IP for this service -->
<connectionLimitPerIP>0</connectionLimitPerIP>
</handler>
</imapserver>
</imapservers>

View File

@ -0,0 +1,40 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# See http://james.apache.org/server/3/config.html for usage
# Use derby as default
database.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
database.url=jdbc:derby:../var/store/derby;create=true
database.username=app
database.password=app
# Supported adapters are:
# DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE
vendorAdapter.database=DERBY
# Use streaming for Blobs
# This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable
# it.
#
# See:
# http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html #7.11. LOB Streaming
#
openjpa.streaming=false

View File

@ -0,0 +1,40 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# See http://james.apache.org/server/3/config.html for usage
# Use derby as default
database.driverClassName=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost/james
database.username=james
database.password=JAMES_DB_PASSWORD
# Supported adapters are:
# DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE
vendorAdapter.database=MYSQL
# Use streaming for Blobs
# This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable
# it.
#
# See:
# http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html #7.11. LOB Streaming
#
openjpa.streaming=false

View File

@ -0,0 +1,40 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# See http://james.apache.org/server/3/config.html for usage
# Use derby as default
database.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
database.url=jdbc:derby:../var/store/derby;create=true
database.username=app
database.password=app
# Supported adapters are:
# DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE
vendorAdapter.database=DERBY
# Use streaming for Blobs
# This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable
# it.
#
# See:
# http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html #7.11. LOB Streaming
#
openjpa.streaming=false

View File

@ -0,0 +1 @@
james-database-mysql.properties

View File

@ -0,0 +1,72 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!DOCTYPE Repository
PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
"http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<Repository>
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
<DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
<Security appName="Jackrabbit">
<SecurityManager class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" workspaceName="security">
</SecurityManager>
<AccessManager class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager">
</AccessManager>
<LoginModule class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
<param name="anonymousId" value="anonymous"/>
<param name="adminId" value="admin"/>
</LoginModule>
</Security>
<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="james"/>
<Workspace name="${wsp.name}">
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
<param name="schemaObjectPrefix" value="${wsp.name}_"/>
</PersistenceManager>
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
<param name="supportHighlighting" value="true"/>
</SearchIndex>
</Workspace>
<Versioning rootPath="${rep.home}/version">
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/version" />
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager">
<param name="url" value="jdbc:derby:${rep.home}/version/db;create=true"/>
<param name="schemaObjectPrefix" value="version_"/>
</PersistenceManager>
</Versioning>
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${rep.home}/repository/index"/>
<param name="supportHighlighting" value="true"/>
</SearchIndex>
</Repository>

View File

@ -0,0 +1,28 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# See http://james.apache.org/server/3/config.html for usage
jmx.address=127.0.0.1
jmx.port=9999

View File

@ -0,0 +1 @@
../../../keys/james/final/mail_mailiverse_com.jks

View File

@ -0,0 +1 @@
../../../../java/lib/JavaPNS_2.2.jar

View File

@ -0,0 +1 @@
# Put every jar you want to have included in the classpath in here

View File

@ -0,0 +1 @@
../../../../java/lib/activation-1.1.1.jar

View File

@ -0,0 +1 @@
../../../../java/lib/aws-java-sdk.jar

View File

@ -0,0 +1 @@
../../../../java/lib/bcprov-jdk15on-148.jar

View File

@ -0,0 +1 @@
../../../../java/lib/dropbox-java-sdk-1.3.jar

View File

@ -0,0 +1 @@
../../../../java/lib/httpclient-4.1.1.jar

View File

@ -0,0 +1 @@
../../../../java/lib/httpcore-4.1.jar

View File

@ -0,0 +1 @@
../../../../java/lib/jackson-core-asl-1.8.9.jar

View File

@ -0,0 +1 @@
../../../../java/lib/jackson-mapper-asl-1.8.9.jar

View File

@ -0,0 +1 @@
../../../../java/lib/json_simple-1.1.jar

View File

@ -0,0 +1 @@
../../../../java/lib/mysql-connector-java-3.1.14-bin.jar

View File

@ -0,0 +1,77 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<lmtpservers>
<!-- The LMTP server is disabled by default -->
<!-- Disabling blocks will stop them from listening, -->
<!-- but does not free as many resources as removing them would -->
<lmtpserver enabled="false">
<jmxName>lmtpserver</jmxName>
<!-- LMTP should not be reachable from outside your network so bind it to loopback-->
<bind>127.0.0.1:24</bind>
<connectionBacklog>200</connectionBacklog>
<!-- This is the name used by the server to identify itself in the LMTP -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<!--
<helloName autodetect="true">myMailServer</helloName>
-->
<!-- connection timeout in secconds -->
<connectiontimeout>1200</connectiontimeout>
<!-- Set the maximum simultaneous incoming connections for this service -->
<connectionLimit>0</connectionLimit>
<!-- Set the maximum simultaneous incoming connections per IP for this service -->
<connectionLimitPerIP>0</connectionLimitPerIP>
<!-- This sets the maximum allowed message size (in kilobytes) for this -->
<!-- LMTP service. If unspecified, the value defaults to 0, which means no limit. -->
<maxmessagesize>0</maxmessagesize>
<!-- This sets the LMTPGreeting which will be used when connect to the lmtpserver -->
<!-- If none is specified a default is generated -->
<!--
<smtpGreeting>JAMES LMTP Server</smtpGreeting>
-->
<handlerchain>
<!-- This loads the core CommandHandlers. Only remove this if you really -->
<!-- know what you are doing -->
<handler class="org.apache.james.lmtpserver.CoreCmdHandlerLoader"/>
</handlerchain>
</lmtpserver>
</lmtpservers>

View File

@ -0,0 +1,140 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# See http://james.apache.org/server/3/config.html for usage
log4j.rootLogger=DEBUG
log4j.appender.CONS=org.apache.log4j.ConsoleAppender
log4j.appender.CONS.layout=org.apache.log4j.PatternLayout
log4j.appender.CONS.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.File=../log/james-server.log
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILBOXMANAGER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILBOXMANAGER.File=../log/mailboxmanager.log
log4j.appender.MAILBOXMANAGER.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILBOXMANAGER.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILBOXMANAGER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.IMAPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.IMAPSERVER.File=../log/imapserver.log
log4j.appender.IMAPSERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.IMAPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.IMAPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILETCONTAINER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILETCONTAINER.File=../log/mailetcontainer.log
log4j.appender.MAILETCONTAINER.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILETCONTAINER.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILETCONTAINER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.DNSSERVICE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DNSSERVICE.File=../log/dnsservice.log
log4j.appender.DNSSERVICE.DatePattern='.'yyyy-MM-dd
log4j.appender.DNSSERVICE.layout=org.apache.log4j.PatternLayout
log4j.appender.DNSSERVICE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.POP3SERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.POP3SERVER.File=../log/pop3server.log
log4j.appender.POP3SERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.POP3SERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.POP3SERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.SMTPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SMTPSERVER.File=../log/smtpserver.log
log4j.appender.SMTPSERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.SMTPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.SMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.LMTPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.LMTPSERVER.File=../log/lmtpserver.log
log4j.appender.LMTPSERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.LMTPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.LMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILREPOSITORYSTORE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILREPOSITORYSTORE.File=../log/mailrepositorystore.log
log4j.appender.MAILREPOSITORYSTORE.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILREPOSITORYSTORE.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILREPOSITORYSTORE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.USERSREPOSITORY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.USERSREPOSITORY.File=../log/usersrepository.log
log4j.appender.USERSREPOSITORY.DatePattern='.'yyyy-MM-dd
log4j.appender.USERSREPOSITORY.layout=org.apache.log4j.PatternLayout
log4j.appender.USERSREPOSITORY.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.FETCHMAIL=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FETCHMAIL.File=../log/fetchmail.log
log4j.appender.FETCHMAIL.DatePattern='.'yyyy-MM-dd
log4j.appender.FETCHMAIL.layout=org.apache.log4j.PatternLayout
log4j.appender.FETCHMAIL.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.DOMAINLIST=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DOMAINLIST.File=../log/domainlist.log
log4j.appender.DOMAINLIST.DatePattern='.'yyyy-MM-dd
log4j.appender.DOMAINLIST.layout=org.apache.log4j.PatternLayout
log4j.appender.DOMAINLIST.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.VIRTUALUSERTABLE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.VIRTUALUSERTABLE.File=../log/virtualusertable.log
log4j.appender.VIRTUALUSERTABLE.DatePattern='.'yyyy-MM-dd
log4j.appender.VIRTUALUSERTABLE.layout=org.apache.log4j.PatternLayout
log4j.appender.VIRTUALUSERTABLE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILQUEUEFACTORY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILQUEUEFACTORY.File=../log/mailqueuefactory.log
log4j.appender.MAILQUEUEFACTORY.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILQUEUEFACTORY.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILQUEUEFACTORY.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.logger.org.apache.jackrabbit=ERROR, CONS, FILE
log4j.logger.org.apache.xbean.spring=WARN, CONS, FILE
log4j.logger.org.apache.activemq=WARN, CONS, FILE
log4j.logger.org.apache.camel=WARN, CONS, FILE
log4j.logger.org.springframework=WARN, CONS, FILE
log4j.logger.org.apache.james=INFO, CONS, FILE
log4j.logger.james=WARN, CONS, FILE
log4j.logger=DEBUG, CONS, FILE
log4j.logger.james.mailboxmanager=INFO, MAILBOXMANAGER
log4j.logger.james.imapserver=INFO, IMAPSERVER
log4j.logger.james.mailetcontainer=INFO, MAILETCONTAINER
log4j.logger.james.mailetcontext=INFO, MAILETCONTAINER
log4j.logger.james.mailspooler=INFO, MAILETCONTAINER
log4j.logger.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.james.dnsservice=INFO, DNSSERVICE
log4j.logger.james.pop3server=INFO, POP3SERVER
log4j.logger.james.smtpserver=INFO, SMTPSERVER
log4j.logger.james.lmtpserver=INFO, LMTPSERVER
log4j.logger.james.mailrepositorystore=INFO, MAILREPOSITORYSTORE
log4j.logger.james.usersrepository=INFO, USERSREPOSITORY
log4j.logger.james.fetchmail=INFO, FETCHMAIL
log4j.logger.james.domainlist=INFO, DOMAINLIST
log4j.logger.james.virtualusertable=INFO, VIRTUALUSERTABLE
log4j.logger.james.mailqueuefactory=INFO, MAILQUEUEFACTORY

View File

@ -0,0 +1,151 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# See http://james.apache.org/server/3/config.html for usage
log4j.rootLogger=DEBUG
log4j.appender.CONS=org.apache.log4j.ConsoleAppender
log4j.appender.CONS.layout=org.apache.log4j.PatternLayout
log4j.appender.CONS.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.File=../log/james-server.log
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILBOXMANAGER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILBOXMANAGER.File=../log/mailboxmanager.log
log4j.appender.MAILBOXMANAGER.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILBOXMANAGER.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILBOXMANAGER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.IMAPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.IMAPSERVER.File=../log/imapserver.log
log4j.appender.IMAPSERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.IMAPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.IMAPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILETCONTAINER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILETCONTAINER.File=../log/mailetcontainer.log
log4j.appender.MAILETCONTAINER.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILETCONTAINER.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILETCONTAINER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.DNSSERVICE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DNSSERVICE.File=../log/dnsservice.log
log4j.appender.DNSSERVICE.DatePattern='.'yyyy-MM-dd
log4j.appender.DNSSERVICE.layout=org.apache.log4j.PatternLayout
log4j.appender.DNSSERVICE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.POP3SERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.POP3SERVER.File=../log/pop3server.log
log4j.appender.POP3SERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.POP3SERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.POP3SERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.SMTPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.SMTPSERVER.File=../log/smtpserver.log
log4j.appender.SMTPSERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.SMTPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.SMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.LMTPSERVER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.LMTPSERVER.File=../log/lmtpserver.log
log4j.appender.LMTPSERVER.DatePattern='.'yyyy-MM-dd
log4j.appender.LMTPSERVER.layout=org.apache.log4j.PatternLayout
log4j.appender.LMTPSERVER.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILREPOSITORYSTORE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILREPOSITORYSTORE.File=../log/mailrepositorystore.log
log4j.appender.MAILREPOSITORYSTORE.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILREPOSITORYSTORE.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILREPOSITORYSTORE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.USERSREPOSITORY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.USERSREPOSITORY.File=../log/usersrepository.log
log4j.appender.USERSREPOSITORY.DatePattern='.'yyyy-MM-dd
log4j.appender.USERSREPOSITORY.layout=org.apache.log4j.PatternLayout
log4j.appender.USERSREPOSITORY.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.FETCHMAIL=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FETCHMAIL.File=../log/fetchmail.log
log4j.appender.FETCHMAIL.DatePattern='.'yyyy-MM-dd
log4j.appender.FETCHMAIL.layout=org.apache.log4j.PatternLayout
log4j.appender.FETCHMAIL.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.DOMAINLIST=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DOMAINLIST.File=../log/domainlist.log
log4j.appender.DOMAINLIST.DatePattern='.'yyyy-MM-dd
log4j.appender.DOMAINLIST.layout=org.apache.log4j.PatternLayout
log4j.appender.DOMAINLIST.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.VIRTUALUSERTABLE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.VIRTUALUSERTABLE.File=../log/virtualusertable.log
log4j.appender.VIRTUALUSERTABLE.DatePattern='.'yyyy-MM-dd
log4j.appender.VIRTUALUSERTABLE.layout=org.apache.log4j.PatternLayout
log4j.appender.VIRTUALUSERTABLE.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.appender.MAILQUEUEFACTORY=org.apache.log4j.DailyRollingFileAppender
log4j.appender.MAILQUEUEFACTORY.File=../log/mailqueuefactory.log
log4j.appender.MAILQUEUEFACTORY.DatePattern='.'yyyy-MM-dd
log4j.appender.MAILQUEUEFACTORY.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILQUEUEFACTORY.layout.ConversionPattern=%-5p %d{HH:mm:ss,SSS} | %c | %m%n
log4j.logger.org.apache.jackrabbit=ERROR, CONS, FILE
log4j.logger.org.apache.xbean.spring=WARN, CONS, FILE
log4j.logger.org.apache.activemq=WARN, CONS, FILE
log4j.logger.org.apache.camel=WARN, CONS, FILE
log4j.logger.org.springframework=WARN, CONS, FILE
log4j.logger.org.apache.james=INFO, CONS, FILE
# tjp
log4j.logger.mail.server.handler=DEBUG, CONS, FILE
log4j.logger.org.apache.james.smtpserver.SendMailHandler=DEBUG, CONS, FILE
log4j.logger.james=DEBUG, CONS, FILE
log4j.logger=DEBUG, CONS, FILE
log4j.logger.james.mailboxmanager=INFO, MAILBOXMANAGER
log4j.logger.james.imapserver=INFO, IMAPSERVER
log4j.logger.james.mailetcontainer=DEBUG, MAILETCONTAINER
log4j.logger.james.mailspooler=DEBUG, MAILETCONTAINER
log4j.logger.james.mailprocessor=DEBUG, MAILETCONTAINER
log4j.logger.james.dnsservice=INFO, DNSSERVICE
log4j.logger.james.pop3server=OFF, POP3SERVER
#changed additivty tjp
log4j.logger.james.mailetcontext=DEBUG, MAILETCONTAINER
#log4j.additivity.james.mailetcontext = false
#changed additivty tjp
log4j.logger.james.smtpserver=DEBUG, SMTPSERVER
#log4j.additivity.james.smtpserver = false
#changed additivty tjp
log4j.logger.james.lmtpserver=DEBUG, LMTPSERVER
#log4j.additivity.james.lmtpserver = false
log4j.logger.james.mailrepositorystore=INFO, MAILREPOSITORYSTORE
log4j.logger.james.usersrepository=INFO, USERSREPOSITORY
log4j.logger.james.fetchmail=INFO, FETCHMAIL
log4j.logger.james.domainlist=INFO, DOMAINLIST
log4j.logger.james.virtualusertable=INFO, VIRTUALUSERTABLE
log4j.logger.james.mailqueuefactory=INFO, MAILQUEUEFACTORY

View File

@ -0,0 +1,74 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<jamesMailbox = 'http://james.apache.org/imap/jcr/'>
[jamesMailbox:user] > mix:created
mixin
- jamesMailbox:user (String)
- jamesMailbox:subscriptionMailboxes (STRING) multiple
+ * (nt:unstructured) multiple
[jamesMailbox:messageHeader] > mix:created, mix:lockable
mixin
- jamesMailbox:headerFieldName (STRING) mandatory
- jamesMailbox:headerValue(STRING) mandatory
- jamesMailbox:headerLineNumber (LONG) mandatory
[jamesMailbox:messageProperty] > mix:created
mixin
- jamesMailbox:propertyNamespace (STRING) mandatory
- jamesMailbox:propertyLocalName (STRING) mandatory
- jamesMailbox:propertyValue(STRING) mandatory
- jamesMailbox:propertyOrder (Long) mandatory
[jamesMailbox:message] > mix:referenceable, mix:created, mix:created
mixin
- jamesMailbox:mailboxUUID (String) mandatory
- jamesMailbox:uid (LONG) mandatory
- jamesMailbox:modSeq (LONG)
- jamesMailbox:size (LONG) mandatory
- jamesMailbox:answered (BOOLEAN)
- jamesMailbox:deleted (BOOLEAN)
- jamesMailbox:draft (BOOLEAN)
- jamesMailbox:flagged (BOOLEAN)
- jamesMailbox:recent (BOOLEAN)
- jamesMailbox:seen (BOOLEAN)
- jamesMailbox:internalDate (DATE)
- jamesMailbox:userFlags (STRING) multiple
- jamesMailbox:messageBodyStartOctet (LONG) mandatory
- jamesMailbox:messageTextualLineCount (LONG)
- jamesMailbox:messageSubType (String) mandatory
+ messageHeader (nt:unstructured) multiple
+ messageProperty (nt:unstructured) multiple
[jamesMailbox:mailbox] > mix:referenceable, mix:lockable, mix:created
mixin
- jamesMailbox:mailboxUidValidity (LONG)
- jamesMailbox:mailboxName (STRING)
- jamesMailbox:mailboxLastUid (LONG)
- jamesMailbox:mailboxNamespace (STRING)
- jamesMailbox:mailboxUser (STRING)
+ * (nt:unstructured) multiple

View File

@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This template file can be used as example for James Server configuration
# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
# See http://james.apache.org/server/3/config.html for usage
maildir.folder=../var/store/maildir/%domain/%user

View File

@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<mailbox>
<!-- supported providers are: -->
<!-- jpa, jcr, maildir, hbase, memory -->
<!-- -->
<!-- Be aware that maildir will only work on unix like operation systems! -->
<provider>memory</provider>
</mailbox>

View File

@ -0,0 +1,675 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- This block is responsible for processing messages on the spool. -->
<mailetcontainer enableJmx="true">
<!-- MailAddress used for PostMaster -->
<context>
<postmaster>postmaster@localhost</postmaster>
</context>
<!-- Number of spool threads -->
<spooler>
<threads>20</threads>
</spooler>
<processors>
<!-- The root processor is a required processor - James routes all mail on the spool -->
<!-- through this processor first. -->
<!-- -->
<!-- This configuration is a sample configuration for the root processor. -->
<processor state="root" enableJmx="true">
<!-- This mailet redirects mail for the user 'postmaster' at any local domain to -->
<!-- the postmaster address specified for the server. The postmaster address -->
<!-- is required by rfc822. Do not remove this mailet unless you are meeting -->
<!-- this requirement through other means (e.g. a XML/JDBCRecipientRewriteTable defined in recipientrewritetable-store.xml) -->
<mailet match="All" class="PostmasterAlias"/>
<!-- Checks that the email Sender is associated with a valid domain. -->
<!-- Useful for detecting and eliminating spam. -->
<!-- For this block to function, the spam processor must be configured. -->
<!--
<mailet match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6" class="ToProcessor">
<processor>spam</processor>
</mailet>
-->
<!-- Important check to avoid looping -->
<mailet match="RelayLimit=30" class="Null"/>
<!-- Check for viruses -->
<!-- -->
<!-- Does an antivirus scan check using a ClamAV daemon (CLAMD). -->
<!-- -->
<!-- Interacts directly with the daemon using the "stream" method, -->
<!-- which should have the lowest possible overhead. -->
<!-- The CLAMD daemon will typically reside on localhost, but could reside on a -->
<!-- different host. -->
<!-- It may also consist on a set of multiple daemons, each residing on a different -->
<!-- server and on different IP number. -->
<!-- In such case a DNS host name with multiple IP addresses (round-robin load sharing) -->
<!-- is supported by the mailet (but on the same port number). -->
<!-- -->
<!-- Handles the following init parameters: -->
<!--<debug>-->
<!--<host>: the host name of the server where CLAMD runs. It can either be -->
<!-- a machine name, such as -->
<!-- "java.sun.com", or a textual representation of its -->
<!-- IP address. If a literal IP address is supplied, only the -->
<!-- validity of the address format is checked. -->
<!-- If the machine name resolves to multiple IP addresses, round-robin load sharing will -->
<!-- be used. -->
<!-- The default is "localhost". -->
<!--<port>: the port on which CLAMD listens. The default is "3310". -->
<!--<maxPings>: the maximum number of connection retries during startup. -->
<!-- If the value is "0" no startup test will be done. -->
<!-- The default is "6". -->
<!--<pingIntervalMilli>: the interval (in milliseconds) -->
<!-- between each connection retry during startup. -->
<!-- The default is "30000" (30 seconds). -->
<!--<streamBufferSize>: the BufferedOutputStream buffer size to use -->
<!-- writing to the stream connection. The default is "8192". -->
<!--
<mailet match="All" class="ClamAVScan" onMailetException="ignore">
<debug>true</debug>
</mailet>
-->
<!-- If infected go to virus processor -->
<mailet match="HasMailAttributeWithValue=org.apache.james.infected, true" class="ToProcessor">
<processor>virus</processor>
</mailet>
<!-- Check attachment extensions for possible viruses -->
<!-- The "-z" option requests the check to be non-recursively applied -->
<!-- to the contents of any attached '*.zip' file. -->
<!--
<mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.cmd *.pif *.scr *.vbs *.avi *.mp3 *.mpeg *.shs" class="Bounce" onMatchException="error">
<inline>heads</inline>
<attachment>none</attachment>
<passThrough>false</passThrough>
<prefix>[REJECTED]</prefix>
<notice>
The Security Policy of XXX does not allow to forward messages containing attachments having any of the extensions .exe, .com, .bat, .cmd, .pif, .scr, .vbs, .avi, .mp3, .mpeg, .shs, therefore your message has been rejected.
Please don't reply to this e-mail as it has been automatically sent by the antivirus system.
Regards, Postmaster XXX.YYY
.....................................
</notice>
</mailet>
-->
<!-- Whitelist Management -->
<!-- Manages for each local user a "white list" of remote addresses whose messages -->
<!-- should never be blocked as spam. -->
<!-- -->
<!-- If<automaticInsert>is true, it will check, for a local sender, if a remote recipient -->
<!-- is already in the list: if not, it will be automatically inserted. -->
<!-- This is under the interpretation that if a local sender X sends a message to a -->
<!-- remote recipient Y, then later on if a message is sent by Y to X it should be -->
<!-- considered always valid and never blocked; hence Y should be in the white list -->
<!-- of X. -->
<!-- -->
<!-- Another mode of operations is when a local sender sends a message to<whitelistManagerAddress>-->
<!-- with one of three specific values in the subject, to -->
<!-- (i) send back a message displaying a list of the addresses in his own list (<displayFlag>); -->
<!-- (ii) insert some new addresses in his own list (<insertFlag>); -->
<!-- (iii) remove some addresses from his own list (<removeFlag>). -->
<!-- In all of the three above cases the message will be ghosted and the postmaster will reply -->
<!-- to the sender. -->
<!-- -->
<!-- The sender name is always converted to its primary name (handling aliases). -->
<!--
<mailet match="SMTPAuthSuccessful" class="WhiteListManager" onMailetException="ignore">
<repositoryPath>db://maildb</repositoryPath>
<automaticInsert>true</automaticInsert>
<whitelistManagerAddress>whitelist.manager@xxx.yyy</whitelistManagerAddress>
<displayFlag>display</displayFlag>
<insertFlag>insert</insertFlag>
<removeFlag>remove</removeFlag>
</mailet>
-->
<!-- "not spam" bayesian analysis feeder. -->
<!--
<mailet match="RecipientIs=not.spam@xxx.yyy" class="BayesianAnalysisFeeder">
<repositoryPath>db://maildb</repositoryPath>
<feedType>ham</feedType>
<maxSize>200000</maxSize>
</mailet>
-->
<!-- "spam" bayesian analysis feeder. -->
<!--
<mailet match="RecipientIs=spam@xxx.yyy" class="BayesianAnalysisFeeder">
<repositoryPath>db://maildb</repositoryPath>
<feedType>spam</feedType>
<maxSize>200000</maxSize>
</mailet>
-->
<!-- sample SMIME mailets configuration -->
<!--
<mailet match="IsSMIMEEncrypted" class="SMIMEDecrypt">
<keyStoreType>pkcs12</keyStoreType>
<keyStoreFileName>c:/path.pfx</keyStoreFileName>
<keyStorePassword>myKeyStorePass</keyStorePassword>
<keyAlias>myKeyAlias</keyAlias>
<keyAliasPassword>myKeyPass</keyAliasPassword>
</mailet>
<mailet match="IsSMIMESigned" class="SMIMECheckSignature">
<keyStoreType>pkcs12</keyStoreType>
<keyStoreFileName>c:/path.pfx</keyStoreFileName>
<keyStorePassword>myKeyStorePass</keyStorePassword>
<strip>false</strip>
<onlyTrusted>true</onlyTrusted>
</mailet>
-->
<!--
XMLRecipientRewriteTable is deprecated - Use the definitions in recipientrewritetable-store.xml
<mailet match="All" class="XMLRecipientRewriteTable">
<!- 1:1 mapping ->
<mapping>morgoth@middle-earth=sauron@mordor</mapping>
<!- 1:n mapping ->
<mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
<!- DSN mapping ->
<mapping>boromir@osgilliath=error:550 Requested action not taken: no such user here</mapping>
<!- regex based mapping ->
<mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
<!- both standard and regex mapping ->
<mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
<!- conditional regex mapping example ->
<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;
regex:(.*)-off@listserver:${1}-unsubscribe@listserver
</mapping>
</mailet>
-->
<!-- Anti-spam processing -->
<!-- The following two entries avoid double anti-spam analysis -->
<!-- for forwarded messages. -->
<!-- Has spam checking already been done? -->
<mailet match="HasMailAttribute=spamChecked" class="ToProcessor">
<processor>transport</processor>
</mailet>
<!-- Spam checking will not be done twice -->
<mailet match="All" class="SetMailAttribute">
<spamChecked>true</spamChecked>
</mailet>
<!-- White List:
If you use block lists, you will probably want to check
for known permitted senders. This is particularly true
if you use more aggressive block lists, such as SPEWS,
that are prone to block entire subnets without regard
for non-spamming senders.
-->
<!-- Messages from authenticated senders never are spam -->
<mailet match="SMTPAuthSuccessful" class="ToProcessor">
<processor>transport</processor>
</mailet>
<!-- Messages signed by trusted users never are spam -->
<!-- Uncommenting the following entry, messages with valid signatures will never be considered spam. -->
<!-- This can be a valid policy *if* SMIMECheckSignature was invoked -->
<!-- with<onlyTrusted>true</onlyTrusted>set -->
<!--
<mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
<!-- specific known senders -->
<!--
<mailet match="SenderIs=goodboy@goodhost"
class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
<!-- People on this list agree to pay a penalty if they send spam -->
<mailet match="InSpammerBlacklist=query.bondedsender.org."
class="ToProcessor">
<processor>transport</processor>
</mailet>
<!-- E-mail legally required not to be spam (see: http://www.habeas.com) -->
<!--
<mailet match="HasHabeasWarrantMark" class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
<!-- If the sender is in a recipient's whitelist, it is a valid sender, -->
<!-- and as such the message should not be considered spam for such recipient. -->
<!--
<mailet match="IsInWhiteList=db://maildb" class="ToProcessor" onMatchException="noMatch">
<processor>transport</processor>
</mailet>
-->
<!-- End of White List -->
<!-- Check for delivery from a known spam server -->
<!-- This set of matchers/mailets redirect all emails from known -->
<!-- black holes, open relays, and spam servers to the spam processor -->
<!-- For this set to function properly, the spam processor must be configured. -->
<mailet match="InSpammerBlacklist=dnsbl.njabl.org."
class="ToProcessor">
<processor>spam</processor>
<notice>550 Requested action not taken: rejected - see http://njabl.org/</notice>
</mailet>
<!-- Sample matching to kill a message (send to Null) -->
<!--
<mailet match="RecipientIs=badboy@badhost" class="Null"/>
-->
<!-- Anti spam bayesian analysis -->
<!--
<mailet match="All" class="BayesianAnalysis" onMailetException="ignore">
<repositoryPath>db://maildb</repositoryPath>
<maxSize>200000</maxSize>
<headerName>X-MessageIsSpamProbability</headerName>
<ignoreLocalSender>true</ignoreLocalSender>
</mailet>
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability >0.90" class="SetMailAttribute" onMatchException="noMatch">
<isSpam>true</isSpam>
</mailet>
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability >0.90" class="SetMimeHeader" onMatchException="noMatch">
<name>X-MessageIsSpam</name>
<value>true</value>
</mailet>
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability >0.99" class="ToProcessor" onMatchException="noMatch">
<processor>spam</processor>
<notice>Spam not accepted</notice>
</mailet>
-->
<!-- Send remaining mails to the transport processor for either local or remote delivery -->
<mailet match="All" class="ToProcessor">
<processor>transport</processor>
</mailet>
</processor>
<!-- The error processor is required. James may internally set emails to the -->
<!-- error state. The error processor is generally invoked when there is an -->
<!-- unexpected error either in the mailet chain or internal to James. -->
<!-- -->
<!-- By default configuration all email that generates an error in placed in -->
<!-- an error repository. -->
<processor state="error" enableJmx="true">
<!-- If you want to notify the sender their message generated an error, uncomment this -->
<!--
<mailet match="All" class="Bounce"/>
-->
<!-- If you want to notify the postmaster that a message generated an error, uncomment this -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
<!-- Logs any messages to the repository specified -->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/error/</repositoryPath>
<!-- An alternative database repository example follows. -->
<!--
<repositoryPath>db://maildb/deadletter/error</repositoryPath>
-->
</mailet>
</processor>
<!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor for local or -->
<!-- remote delivery -->
<processor state="transport" enableJmx="true">
<!-- This is an example configuration including configuration for a list server. -->
<!-- CHECKME: before uncommenting this, edit the configuration file's contents -->
<!--
&listserverConfig;
-->
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
</mailet>
<mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="SetMimeHeader">
<name>X-WasSigned</name>
<value>true</value>
</mailet>
<!-- Add a server-side signature -->
<!--
<mailet match="All" class="SMIMESign" onMailetException="ignore">
<keyStoreType>jks</keyStoreType>
<keyStoreFileName>path.keystore</keyStoreFileName>
<keyStorePassword>myKeyStorePass</keyStorePassword>
<keyAlias>myKeyAlias</keyAlias>
<keyAliasPassword>myKeyPass</keyAliasPassword>
<signerName>XXX Trusted Server</signerName>
<rebuildFrom>true</rebuildFrom>
<postmasterSigns>true</postmasterSigns>
<debug>true</debug>
</mailet>
-->
<!-- Experimental quota Matcher -->
<!-- This matcher need to calculate the mailbox size everytime it is called. This can slow down things if there are many mails in -->
<!-- the mailbox. Some users also report big problems with the matcher if a JDBC based mailrepository is used. -->
<!-- Check if over quota -->
<!--
<mailet match="RecipientIsOverFixedQuota=20M" class="Resend">
<sender>postmaster</sender>
<replyTo>postmaster</replyTo>
<reversePath>null</reversePath>
<inline>none</inline>
<attachment>message</attachment>
<prefix>[OVER QUOTA WARNING]</prefix>
<message>
When receiving the attached message, your mailbox is larger than 20 MB, which is the maximum allowed quota. The mailbox will not be blocked, but we ask you to empty it ASAP.
It is likely that you have set, in your mail client account, the option "leave a copy of messages on server". For any help ask your administrators.
Regards, Postmaster XXX.YYY
.....................................
</message>
</mailet>
-->
<!-- The RecipientRewriteTable will use the definitions found in recipientrewritetablexml -->
<mailet match="All" class="RecipientRewriteTable" />
<!-- Place a copy in the user Sent folder -->
<mailet match="RecipientIsLocal" class="ToSenderFolder">
<folder>Sent</folder>
<consume>false</consume>
</mailet>
<!-- Is the recipient is for a local account, deliver it locally -->
<mailet match="RecipientIsLocal" class="LocalDelivery"/>
<!-- If the host is handled by this server and it did not get -->
<!-- locally delivered, this is an invalid recipient -->
<mailet match="HostIsLocal" class="ToProcessor">
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
<!-- CHECKME! -->
<!-- This is an anti-relay matcher/mailet combination -->
<!-- -->
<!-- Emails sent from servers not in the network list are -->
<!-- rejected as spam. This is one method of preventing your -->
<!-- server from being used as an open relay. Make sure you understand -->
<!-- how to prevent your server from becoming an open relay before -->
<!-- changing this configuration. See also<authorizedAddresses>in SMTP Server -->
<!-- -->
<!-- This matcher/mailet combination must come after local delivery has -->
<!-- been performed. Otherwise local users will not be able to receive -->
<!-- email from senders not in this remote address list. -->
<!-- -->
<!-- If you are using this matcher/mailet you will probably want to -->
<!-- update the configuration to include your own network/addresses. The -->
<!-- matcher can be configured with a comma separated list of IP addresses -->
<!-- wildcarded IP subnets, and wildcarded hostname subnets. -->
<!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*" -->
<!-- -->
<!-- If you are using SMTP authentication then you can (and generally -->
<!-- should) disable this matcher/mailet pair. -->
<mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">
<processor>relay-denied</processor>
<notice>550 - Requested action not taken: relaying denied</notice>
</mailet>
<!-- Attempt remote delivery using the specified repository for the spool, -->
<!-- using delay time to retry delivery and the maximum number of retries -->
<mailet match="All" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
<!-- 5 day retry period, with 4 attempts in the first
hour, two more within the first 6 hours, and then
every 6 hours for the rest of the period. -->
<delayTime>5 minutes</delayTime>
<delayTime>10 minutes</delayTime>
<delayTime>45 minutes</delayTime>
<delayTime>2 hours</delayTime>
<delayTime>3 hours</delayTime>
<delayTime>6 hours</delayTime>
<maxRetries>25</maxRetries>
<!-- The max reties which will used if no A or MX record for the domain was found. -->
<!-- If 0 it will fail on first time -->
<maxDnsProblemRetries>0</maxDnsProblemRetries>
<!-- The number of threads that should be trying to deliver outgoing messages -->
<deliveryThreads>10</deliveryThreads>
<!-- If false the message will not be sent to given server if any recipients fail -->
<sendpartial>true</sendpartial>
<!-- By default we send bounces to the "bounce" processor -->
<!-- By removing this configuration James will fallback to hardcoded bounce -->
<!-- notifications -->
<bounceProcessor>bounces</bounceProcessor>
<!-- A single mail server to deliver all outgoing messages. -->
<!-- This is useful if this server is a backup or failover machine, -->
<!-- or if you want all messages to be routed through a particular mail server, -->
<!-- regardless of the email addresses specified in the message -->
<!-- -->
<!-- The gateway element specifies the gateway SMTP server name. -->
<!-- If your gateway mail server is listening on a port other than 25, -->
<!-- you can set James to connect to it on that port using the gatewayPort -->
<!-- element. -->
<!-- Although normally multiple addresses are implemented through proper -->
<!-- DNS configuration, the RemoteDelivery mail does allow specifying -->
<!-- multiple gateway elements, each of which may also have a port -->
<!-- e.g., mygateway:2525 -->
<!-- the gatewayPort element is used as a default -->
<!--
<gateway>otherserver.mydomain.com</gateway>
<gatewayPort>25</gatewayPort>
-->
<!-- If the gateway requires smtp authentication the following directives -->
<!-- (gatewayUsername/gatewayPassword) can be used. -->
<!--
<gatewayUsername>login</gatewayUsername>
<gatewayPassword>pass</gatewayPassword>
-->
<!-- Set the HELO/EHLO name to use when connectiong to remote SMTP-Server -->
<!--
<mail.smtp.localhost>myMailServer</mail.smtp.localhost>
-->
</mailet>
</processor>
<!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor for handling -->
<!-- spam. -->
<!-- You can either log these, bounce these, or just ignore them. -->
<processor state="spam" enableJmx="true">
<!-- To place the spam messages in the user junk folder, uncomment this matcher/mailet configuration -->
<!--
<mailet match="RecipientIsLocal" class="ToRecipientFolder">
<folder>Junk</folder>
<consume>false</consume>
</mailet>
-->
<!-- To destroy all messages, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="Null"/>
-->
<!-- To notify the sender their message was marked as spam, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="Bounce"/>
-->
<!-- To notify the postmaster that a message was marked as spam, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
<!-- To log the message to a repository, this matcher/mailet configuration should be uncommented. -->
<!-- This is the default configuration. -->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/spam/</repositoryPath>
<!-- Changing the repositoryPath, as in this commented out example, will -->
<!-- cause the mails to be stored in a database repository. -->
<!-- Please note that only one repositoryPath element can be present for the mailet -->
<!-- configuration. -->
<!--
<repositoryPath>db://maildb/deadletter/spam</repositoryPath>
-->
</mailet>
</processor>
<!-- messages containing viruses. -->
<processor state="virus" enableJmx="true">
<!-- To avoid a loop while bouncing -->
<mailet match="All" class="SetMailAttribute">
<org.apache.james.infected>true, bouncing</org.apache.james.infected>
</mailet>
<!-- If the sender is authenticated, notify the infection -->
<mailet match="SMTPAuthSuccessful" class="Bounce">
<inline>heads</inline>
<attachment>none</attachment>
<notice>Warning: We were unable to deliver the message below because it was found infected by virus(es).</notice>
</mailet>
<!-- In any other situation ghost it, -->
<!-- as viruses almost always spoof the sender's address -->
<mailet match="All" class="Null" />
</processor>
<!-- This processor handles messages that are for local domains, where the user is unknown -->
<processor state="local-address-error" enableJmx="true">
<!-- To avoid bouncing/archiving spam, uncomment this matcher/mailet configuration -->
<!--
<mailet match="HasMailAttribute=isSpam" class="Null" onMatchException="noMatch"/>
-->
<!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration -->
<!-- The original message is not attached to keep the bounce processor from deliverying spam -->
<!--
<mailet match="All" class="Bounce">
<attachment>none</attachment>
</mailet>
-->
<!-- To notify the postmaster that a message had an invalid address, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/address-error/</repositoryPath>
<!-- An alternative database repository example follows. -->
<!--
<repositoryPath>db://maildb/deadletter/address-error</repositoryPath>
-->
</mailet>
</processor>
<!-- This processor handles messages that are for foreign domains, where relaying is denied -->
<!-- As of James v2.2, this processor can be deprecated by using the<authorizedAddresses>tag
in the SMTP Server, and rejecting the message in the protocol transaction. -->
<processor state="relay-denied" enableJmx="true">
<!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration -->
<!-- The original message is not attached to keep the bounce processor from deliverying spam -->
<!--
<mailet match="All" class="Bounce">
<attachment>none</attachment>
</mailet>
-->
<!-- To notify the postmaster that a relay request was denied, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/relay-denied/</repositoryPath>
<!-- An alternative database repository example follows. -->
<!--
<repositoryPath>db://maildb/deadletter/relay-denied</repositoryPath>
-->
</mailet>
</processor>
<!-- This processor handle the bounces from RemoteDelivery: As of James v2.3, this is the new -->
<!-- Default. -->
<!-- -->
<!-- DSNBounce properly create a DSN compliant bounce -->
<processor state="bounces" enableJmx="true">
<mailet match="All" class="DSNBounce">
<passThrough>false</passThrough>
<!-- optional subject prefix prepended to the original message -->
<!--
<prefix>[bounce]</prefix>
-->
<!-- message, heads or none, default=message -->
<!--
<attachment>heads</attachment>
-->
<!-- the message sent in the bounce, the first occurrence of the pattern [machine] is -->
<!-- replaced with the name of the executing machine -->
<!-- Default: Hi. This is the James mail server at [machine] ... -->
<!--
<messageString>Here is [machine]. I'm not able to deliver this message.</messageString>
-->
</mailet>
</processor>
</processors>
</mailetcontainer>

View File

@ -0,0 +1,662 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- This block is responsible for processing messages on the spool. -->
<mailetcontainer enableJmx="true">
<!-- MailAddress used for PostMaster -->
<context>
<postmaster>postmaster@mailiverse.com</postmaster>
</context>
<!-- Number of spool threads -->
<spooler>
<threads>20</threads>
</spooler>
<processors>
<!-- The root processor is a required processor - James routes all mail on the spool -->
<!-- through this processor first. -->
<!-- -->
<!-- This configuration is a sample configuration for the root processor. -->
<processor state="root" enableJmx="true">
<!-- This mailet redirects mail for the user 'postmaster' at any local domain to -->
<!-- the postmaster address specified for the server. The postmaster address -->
<!-- is required by rfc822. Do not remove this mailet unless you are meeting -->
<!-- this requirement through other means (e.g. a XML/JDBCRecipientRewriteTable defined in recipientrewritetable-store.xml) -->
<mailet match="All" class="PostmasterAlias"/>
<!-- Checks that the email Sender is associated with a valid domain. -->
<!-- Useful for detecting and eliminating spam. -->
<!-- For this block to function, the spam processor must be configured. -->
<!--
<mailet match="SenderInFakeDomain=64.55.105.9,64.94.110.11,194.205.62.122,194.205.62.62,195.7.77.20,206.253.214.102,212.181.91.6,219.88.106.80,194.205.62.42,216.35.187.246,203.119.4.6" class="ToProcessor">
<processor>spam</processor>
</mailet>
-->
<!-- Important check to avoid looping -->
<mailet match="RelayLimit=30" class="Null"/>
<!-- Check for viruses -->
<!-- -->
<!-- Does an antivirus scan check using a ClamAV daemon (CLAMD). -->
<!-- -->
<!-- Interacts directly with the daemon using the "stream" method, -->
<!-- which should have the lowest possible overhead. -->
<!-- The CLAMD daemon will typically reside on localhost, but could reside on a -->
<!-- different host. -->
<!-- It may also consist on a set of multiple daemons, each residing on a different -->
<!-- server and on different IP number. -->
<!-- In such case a DNS host name with multiple IP addresses (round-robin load sharing) -->
<!-- is supported by the mailet (but on the same port number). -->
<!-- -->
<!-- Handles the following init parameters: -->
<!--<debug>-->
<!--<host>: the host name of the server where CLAMD runs. It can either be -->
<!-- a machine name, such as -->
<!-- "java.sun.com", or a textual representation of its -->
<!-- IP address. If a literal IP address is supplied, only the -->
<!-- validity of the address format is checked. -->
<!-- If the machine name resolves to multiple IP addresses, round-robin load sharing will -->
<!-- be used. -->
<!-- The default is "localhost". -->
<!--<port>: the port on which CLAMD listens. The default is "3310". -->
<!--<maxPings>: the maximum number of connection retries during startup. -->
<!-- If the value is "0" no startup test will be done. -->
<!-- The default is "6". -->
<!--<pingIntervalMilli>: the interval (in milliseconds) -->
<!-- between each connection retry during startup. -->
<!-- The default is "30000" (30 seconds). -->
<!--<streamBufferSize>: the BufferedOutputStream buffer size to use -->
<!-- writing to the stream connection. The default is "8192". -->
<!--
<mailet match="All" class="ClamAVScan" onMailetException="ignore">
<debug>true</debug>
</mailet>
-->
<!-- If infected go to virus processor -->
<mailet match="HasMailAttributeWithValue=org.apache.james.infected, true" class="ToProcessor">
<processor>virus</processor>
</mailet>
<!-- Check attachment extensions for possible viruses -->
<!-- The "-z" option requests the check to be non-recursively applied -->
<!-- to the contents of any attached '*.zip' file. -->
<!--
<mailet match="AttachmentFileNameIs=-d -z *.exe *.com *.bat *.cmd *.pif *.scr *.vbs *.avi *.mp3 *.mpeg *.shs" class="Bounce" onMatchException="error">
<inline>heads</inline>
<attachment>none</attachment>
<passThrough>false</passThrough>
<prefix>[REJECTED]</prefix>
<notice>
The Security Policy of XXX does not allow to forward messages containing attachments having any of the extensions .exe, .com, .bat, .cmd, .pif, .scr, .vbs, .avi, .mp3, .mpeg, .shs, therefore your message has been rejected.
Please don't reply to this e-mail as it has been automatically sent by the antivirus system.
Regards, Postmaster XXX.YYY
.....................................
</notice>
</mailet>
-->
<!-- Whitelist Management -->
<!-- Manages for each local user a "white list" of remote addresses whose messages -->
<!-- should never be blocked as spam. -->
<!-- -->
<!-- If<automaticInsert>is true, it will check, for a local sender, if a remote recipient -->
<!-- is already in the list: if not, it will be automatically inserted. -->
<!-- This is under the interpretation that if a local sender X sends a message to a -->
<!-- remote recipient Y, then later on if a message is sent by Y to X it should be -->
<!-- considered always valid and never blocked; hence Y should be in the white list -->
<!-- of X. -->
<!-- -->
<!-- Another mode of operations is when a local sender sends a message to<whitelistManagerAddress>-->
<!-- with one of three specific values in the subject, to -->
<!-- (i) send back a message displaying a list of the addresses in his own list (<displayFlag>); -->
<!-- (ii) insert some new addresses in his own list (<insertFlag>); -->
<!-- (iii) remove some addresses from his own list (<removeFlag>). -->
<!-- In all of the three above cases the message will be ghosted and the postmaster will reply -->
<!-- to the sender. -->
<!-- -->
<!-- The sender name is always converted to its primary name (handling aliases). -->
<!--
<mailet match="SMTPAuthSuccessful" class="WhiteListManager" onMailetException="ignore">
<repositoryPath>db://maildb</repositoryPath>
<automaticInsert>true</automaticInsert>
<whitelistManagerAddress>whitelist.manager@xxx.yyy</whitelistManagerAddress>
<displayFlag>display</displayFlag>
<insertFlag>insert</insertFlag>
<removeFlag>remove</removeFlag>
</mailet>
-->
<!-- "not spam" bayesian analysis feeder. -->
<!--
<mailet match="RecipientIs=not.spam@xxx.yyy" class="BayesianAnalysisFeeder">
<repositoryPath>db://maildb</repositoryPath>
<feedType>ham</feedType>
<maxSize>200000</maxSize>
</mailet>
-->
<!-- "spam" bayesian analysis feeder. -->
<!--
<mailet match="RecipientIs=spam@xxx.yyy" class="BayesianAnalysisFeeder">
<repositoryPath>db://maildb</repositoryPath>
<feedType>spam</feedType>
<maxSize>200000</maxSize>
</mailet>
-->
<!-- sample SMIME mailets configuration -->
<!--
<mailet match="IsSMIMEEncrypted" class="SMIMEDecrypt">
<keyStoreType>pkcs12</keyStoreType>
<keyStoreFileName>c:/path.pfx</keyStoreFileName>
<keyStorePassword>myKeyStorePass</keyStorePassword>
<keyAlias>myKeyAlias</keyAlias>
<keyAliasPassword>myKeyPass</keyAliasPassword>
</mailet>
<mailet match="IsSMIMESigned" class="SMIMECheckSignature">
<keyStoreType>pkcs12</keyStoreType>
<keyStoreFileName>c:/path.pfx</keyStoreFileName>
<keyStorePassword>myKeyStorePass</keyStorePassword>
<strip>false</strip>
<onlyTrusted>true</onlyTrusted>
</mailet>
-->
<!--
XMLRecipientRewriteTable is deprecated - Use the definitions in recipientrewritetable-store.xml
<mailet match="All" class="XMLRecipientRewriteTable">
<!- 1:1 mapping ->
<mapping>morgoth@middle-earth=sauron@mordor</mapping>
<!- 1:n mapping ->
<mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
<!- DSN mapping ->
<mapping>boromir@osgilliath=error:550 Requested action not taken: no such user here</mapping>
<!- regex based mapping ->
<mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
<!- both standard and regex mapping ->
<mapping>ring@*=onering@mordor;regex:ring@(.*):ring@${1}</mapping>
<!- conditional regex mapping example ->
<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;
regex:(.*)-off@listserver:${1}-unsubscribe@listserver
</mapping>
</mailet>
-->
<!-- Anti-spam processing -->
<!-- The following two entries avoid double anti-spam analysis -->
<!-- for forwarded messages. -->
<!-- Has spam checking already been done? -->
<mailet match="HasMailAttribute=spamChecked" class="ToProcessor">
<processor>transport</processor>
</mailet>
<!-- Spam checking will not be done twice -->
<mailet match="All" class="SetMailAttribute">
<spamChecked>true</spamChecked>
</mailet>
<!-- White List:
If you use block lists, you will probably want to check
for known permitted senders. This is particularly true
if you use more aggressive block lists, such as SPEWS,
that are prone to block entire subnets without regard
for non-spamming senders.
-->
<!-- Messages from authenticated senders never are spam -->
<mailet match="SMTPAuthSuccessful" class="ToProcessor">
<processor>transport</processor>
</mailet>
<!-- Messages signed by trusted users never are spam -->
<!-- Uncommenting the following entry, messages with valid signatures will never be considered spam. -->
<!-- This can be a valid policy *if* SMIMECheckSignature was invoked -->
<!-- with<onlyTrusted>true</onlyTrusted>set -->
<!--
<mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
<!-- specific known senders -->
<!--
<mailet match="SenderIs=goodboy@goodhost"
class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
<!-- People on this list agree to pay a penalty if they send spam -->
<mailet match="InSpammerBlacklist=query.bondedsender.org."
class="ToProcessor">
<processor>transport</processor>
</mailet>
<!-- E-mail legally required not to be spam (see: http://www.habeas.com) -->
<!--
<mailet match="HasHabeasWarrantMark" class="ToProcessor">
<processor>transport</processor>
</mailet>
-->
<!-- If the sender is in a recipient's whitelist, it is a valid sender, -->
<!-- and as such the message should not be considered spam for such recipient. -->
<!--
<mailet match="IsInWhiteList=db://maildb" class="ToProcessor" onMatchException="noMatch">
<processor>transport</processor>
</mailet>
-->
<!-- End of White List -->
<!-- Check for delivery from a known spam server -->
<!-- This set of matchers/mailets redirect all emails from known -->
<!-- black holes, open relays, and spam servers to the spam processor -->
<!-- For this set to function properly, the spam processor must be configured. -->
<mailet match="InSpammerBlacklist=dnsbl.njabl.org."
class="ToProcessor">
<processor>spam</processor>
<notice>550 Requested action not taken: rejected - see http://njabl.org/</notice>
</mailet>
<!-- Sample matching to kill a message (send to Null) -->
<!--
<mailet match="RecipientIs=badboy@badhost" class="Null"/>
-->
<!-- Anti spam bayesian analysis -->
<!--
<mailet match="All" class="BayesianAnalysis" onMailetException="ignore">
<repositoryPath>db://maildb</repositoryPath>
<maxSize>200000</maxSize>
<headerName>X-MessageIsSpamProbability</headerName>
<ignoreLocalSender>true</ignoreLocalSender>
</mailet>
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability >0.90" class="SetMailAttribute" onMatchException="noMatch">
<isSpam>true</isSpam>
</mailet>
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability >0.90" class="SetMimeHeader" onMatchException="noMatch">
<name>X-MessageIsSpam</name>
<value>true</value>
</mailet>
<mailet match="CompareNumericHeaderValue=X-MessageIsSpamProbability >0.99" class="ToProcessor" onMatchException="noMatch">
<processor>spam</processor>
<notice>Spam not accepted</notice>
</mailet>
-->
<!-- Send remaining mails to the transport processor for either local or remote delivery -->
<mailet match="All" class="ToProcessor">
<processor>transport</processor>
</mailet>
</processor>
<!-- The error processor is required. James may internally set emails to the -->
<!-- error state. The error processor is generally invoked when there is an -->
<!-- unexpected error either in the mailet chain or internal to James. -->
<!-- -->
<!-- By default configuration all email that generates an error in placed in -->
<!-- an error repository. -->
<processor state="error" enableJmx="true">
<!-- If you want to notify the sender their message generated an error, uncomment this -->
<mailet match="All" class="Bounce">
<debug>true</debug>
</mailet>
<!-- Logs any messages to the repository specified -->
</processor>
<!-- Processor CONFIGURATION SAMPLE: transport is a sample custom processor for local or -->
<!-- remote delivery -->
<processor state="transport" enableJmx="true">
<!-- This is an example configuration including configuration for a list server. -->
<!-- CHECKME: before uncommenting this, edit the configuration file's contents -->
<!--
&listserverConfig;
-->
<mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
<name>X-UserIsAuth</name>
<value>true</value>
</mailet>
<mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="SetMimeHeader">
<name>X-WasSigned</name>
<value>true</value>
</mailet>
<!-- Add a server-side signature -->
<!--
<mailet match="All" class="SMIMESign" onMailetException="ignore">
<keyStoreType>jks</keyStoreType>
<keyStoreFileName>path.keystore</keyStoreFileName>
<keyStorePassword>myKeyStorePass</keyStorePassword>
<keyAlias>myKeyAlias</keyAlias>
<keyAliasPassword>myKeyPass</keyAliasPassword>
<signerName>XXX Trusted Server</signerName>
<rebuildFrom>true</rebuildFrom>
<postmasterSigns>true</postmasterSigns>
<debug>true</debug>
</mailet>
-->
<!-- Experimental quota Matcher -->
<!-- This matcher need to calculate the mailbox size everytime it is called. This can slow down things if there are many mails in -->
<!-- the mailbox. Some users also report big problems with the matcher if a JDBC based mailrepository is used. -->
<!-- Check if over quota -->
<!--
<mailet match="RecipientIsOverFixedQuota=20M" class="Resend">
<sender>postmaster</sender>
<replyTo>postmaster</replyTo>
<reversePath>null</reversePath>
<inline>none</inline>
<attachment>message</attachment>
<prefix>[OVER QUOTA WARNING]</prefix>
<message>
When receiving the attached message, your mailbox is larger than 20 MB, which is the maximum allowed quota. The mailbox will not be blocked, but we ask you to empty it ASAP.
It is likely that you have set, in your mail client account, the option "leave a copy of messages on server". For any help ask your administrators.
Regards, Postmaster XXX.YYY
.....................................
</message>
</mailet>
-->
<!-- The RecipientRewriteTable will use the definitions found in recipientrewritetablexml -->
<mailet match="All" class="RecipientRewriteTable" />
<!-- Place a copy in the user Sent folder -->
<mailet match="SenderIsLocal" class="ToSenderFolder">
<folder>Sent</folder>
<consume>false</consume>
</mailet>
<!-- Is the recipient is for a local account, deliver it locally -->
<mailet match="RecipientIsLocal" class="LocalDelivery">
<consume>true</consume>
<delayTime>1 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>
</mailet>
<!-- If the host is handled by this server and it did not get -->
<!-- locally delivered, this is an invalid recipient -->
<mailet match="HostIsLocal" class="ToProcessor">
<processor>local-address-error</processor>
<notice>550 - Requested action not taken: no such user here</notice>
</mailet>
<!-- CHECKME! -->
<!-- This is an anti-relay matcher/mailet combination -->
<!-- -->
<!-- Emails sent from servers not in the network list are -->
<!-- rejected as spam. This is one method of preventing your -->
<!-- server from being used as an open relay. Make sure you understand -->
<!-- how to prevent your server from becoming an open relay before -->
<!-- changing this configuration. See also<authorizedAddresses>in SMTP Server -->
<!-- -->
<!-- This matcher/mailet combination must come after local delivery has -->
<!-- been performed. Otherwise local users will not be able to receive -->
<!-- email from senders not in this remote address list. -->
<!-- -->
<!-- If you are using this matcher/mailet you will probably want to -->
<!-- update the configuration to include your own network/addresses. The -->
<!-- matcher can be configured with a comma separated list of IP addresses -->
<!-- wildcarded IP subnets, and wildcarded hostname subnets. -->
<!-- e.g. "RemoteAddrNotInNetwork=127.0.0.1, abc.de.*, 192.168.0.*" -->
<!-- -->
<!-- If you are using SMTP authentication then you can (and generally -->
<!-- should) disable this matcher/mailet pair. -->
<!--
<mailet match="RemoteAddrNotInNetwork=127.0.0.1,127.0.1.1,blue" class="ToProcessor">
<processor>relay-denied</processor>
<notice>550 - Requested action not taken: relaying denied</notice>
</mailet>
-->
<!-- Attempt remote delivery using the specified repository for the spool, -->
<!-- using delay time to retry delivery and the maximum number of retries -->
<mailet match="All" class="RemoteDelivery">
<debug>true</debug>
<!-- <mail.debug>true</mail.debug> -->
<mail.smtp.starttls.enable>true</mail.smtp.starttls.enable>
<mail.smtp.ssl.checkserveridentity>false</mail.smtp.ssl.checkserveridentity>
<mail.smtp.ssl.trust>*</mail.smtp.ssl.trust>
<outgoingQueue>outgoing</outgoingQueue>
<!-- Delivery Schedule based upon RFC 2821, 4.5.4.1 -->
<!-- 5 day retry period, with 4 attempts in the first
hour, two more within the first 6 hours, and then
every 6 hours for the rest of the period. -->
<delayTime>5 minutes</delayTime>
<delayTime>10 minutes</delayTime>
<delayTime>45 minutes</delayTime>
<delayTime>2 hours</delayTime>
<delayTime>3 hours</delayTime>
<delayTime>6 hours</delayTime>
<maxRetries>25</maxRetries>
<!-- The max reties which will used if no A or MX record for the domain was found. -->
<!-- If 0 it will fail on first time -->
<maxDnsProblemRetries>0</maxDnsProblemRetries>
<!-- The number of threads that should be trying to deliver outgoing messages -->
<deliveryThreads>10</deliveryThreads>
<!-- If false the message will not be sent to given server if any recipients fail -->
<sendpartial>true</sendpartial>
<!-- By default we send bounces to the "bounce" processor -->
<!-- By removing this configuration James will fallback to hardcoded bounce -->
<!-- notifications -->
<bounceProcessor>bounces</bounceProcessor>
<!-- A single mail server to deliver all outgoing messages. -->
<!-- This is useful if this server is a backup or failover machine, -->
<!-- or if you want all messages to be routed through a particular mail server, -->
<!-- regardless of the email addresses specified in the message -->
<!-- -->
<!-- The gateway element specifies the gateway SMTP server name. -->
<!-- If your gateway mail server is listening on a port other than 25, -->
<!-- you can set James to connect to it on that port using the gatewayPort -->
<!-- element. -->
<!-- Although normally multiple addresses are implemented through proper -->
<!-- DNS configuration, the RemoteDelivery mail does allow specifying -->
<!-- multiple gateway elements, each of which may also have a port -->
<!-- e.g., mygateway:2525 -->
<!-- the gatewayPort element is used as a default -->
<!--
<gateway>otherserver.mydomain.com</gateway>
<gatewayPort>25</gatewayPort>
-->
<!-- If the gateway requires smtp authentication the following directives -->
<!-- (gatewayUsername/gatewayPassword) can be used. -->
<!--
<gatewayUsername>login</gatewayUsername>
<gatewayPassword>pass</gatewayPassword>
-->
<!-- Set the HELO/EHLO name to use when connectiong to remote SMTP-Server -->
<mail.smtp.localhost>outgoing.mailiverse.com</mail.smtp.localhost>
</mailet>
</processor>
<!-- Processor CONFIGURATION SAMPLE: spam is a sample custom processor for handling -->
<!-- spam. -->
<!-- You can either log these, bounce these, or just ignore them. -->
<processor state="spam" enableJmx="true">
<!-- To place the spam messages in the user junk folder, uncomment this matcher/mailet configuration -->
<!--
<mailet match="RecipientIsLocal" class="ToRecipientFolder">
<folder>Junk</folder>
<consume>false</consume>
</mailet>
-->
<!-- To destroy all messages, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="Null"/>
-->
<!-- To notify the sender their message was marked as spam, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="Bounce"/>
-->
<!-- To notify the postmaster that a message was marked as spam, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
</processor>
<!-- messages containing viruses. -->
<processor state="virus" enableJmx="true">
<!-- To avoid a loop while bouncing -->
<mailet match="All" class="SetMailAttribute">
<org.apache.james.infected>true, bouncing</org.apache.james.infected>
</mailet>
<!-- If the sender is authenticated, notify the infection -->
<mailet match="SMTPAuthSuccessful" class="Bounce">
<inline>heads</inline>
<attachment>none</attachment>
<notice>Warning: We were unable to deliver the message below because it was found infected by virus(es).</notice>
</mailet>
<!-- In any other situation ghost it, -->
<!-- as viruses almost always spoof the sender's address -->
<mailet match="All" class="Null" />
</processor>
<!-- This processor handles messages that are for local domains, where the user is unknown -->
<processor state="local-address-error" enableJmx="true">
<!-- To avoid bouncing/archiving spam, uncomment this matcher/mailet configuration -->
<!--
<mailet match="HasMailAttribute=isSpam" class="Null" onMatchException="noMatch"/>
-->
<!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration -->
<!-- The original message is not attached to keep the bounce processor from deliverying spam -->
<!--
<mailet match="All" class="Bounce">
<attachment>none</attachment>
</mailet>
-->
<!-- To notify the postmaster that a message had an invalid address, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/address-error/</repositoryPath>
<!-- An alternative database repository example follows. -->
<!--
<repositoryPath>db://maildb/deadletter/address-error</repositoryPath>
-->
</mailet>
</processor>
<!-- This processor handles messages that are for foreign domains, where relaying is denied -->
<!-- As of James v2.2, this processor can be deprecated by using the<authorizedAddresses>tag
in the SMTP Server, and rejecting the message in the protocol transaction. -->
<processor state="relay-denied" enableJmx="true">
<!-- To notify the sender the address was invalid, uncomment this matcher/mailet configuration -->
<!-- The original message is not attached to keep the bounce processor from deliverying spam -->
<!--
<mailet match="All" class="Bounce">
<attachment>none</attachment>
</mailet>
-->
<!-- To notify the postmaster that a relay request was denied, uncomment this matcher/mailet configuration -->
<!--
<mailet match="All" class="NotifyPostmaster"/>
-->
<mailet match="All" class="ToRepository">
<repositoryPath>file://var/mail/relay-denied/</repositoryPath>
<!-- An alternative database repository example follows. -->
<!--
<repositoryPath>db://maildb/deadletter/relay-denied</repositoryPath>
-->
</mailet>
</processor>
<!-- This processor handle the bounces from RemoteDelivery: As of James v2.3, this is the new -->
<!-- Default. -->
<!-- -->
<!-- DSNBounce properly create a DSN compliant bounce -->
<processor state="bounces" enableJmx="true">
<mailet match="All" class="DSNBounce">
<passThrough>false</passThrough>
<!-- optional subject prefix prepended to the original message -->
<!--
<prefix>[bounce]</prefix>
-->
<!-- message, heads or none, default=message -->
<!--
<attachment>heads</attachment>
-->
<!-- the message sent in the bounce, the first occurrence of the pattern [machine] is -->
<!-- replaced with the name of the executing machine -->
<!-- Default: Hi. This is the James mail server at [machine] ... -->
<messageString>This is Mailiverse. I'm not able to deliver this message.</messageString>
</mailet>
</processor>
</processors>
</mailetcontainer>

View File

@ -0,0 +1,96 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<mailrepositorystore>
<mailrepositories>
<!-- File based repositories. These repositories store all message data -->
<!-- in the file system. -->
<mailrepository class="org.apache.james.mailrepository.file.FileMailRepository">
<protocols>
<protocol>file</protocol>
</protocols>
<!-- Set if the messages should be listed sorted. False by default -->
<config FIFO="false" CACHEKEYS="true"/>
</mailrepository>
<!-- JDBC based repositories. These repositories store all message data -->
<!-- in the database. -->
<mailrepository class="org.apache.james.mailrepository.jdbc.JDBCMailRepository">
<protocols>
<protocol>db</protocol>
</protocols>
<config>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<!-- Set the size threshold for in memory handling of storing operations -->
<!-- Default is currently 409600000 due to a bug with mysql and binary stream -->
<!-- currently under investigation. Please change this only if you know what -->
<!-- you do. -->
<!--
<inMemorySizeLimit>4096</inMemorySizeLimit>
-->
</config>
</mailrepository>
<!-- These repositories store message delivery and headers in the DB, and the body to the filesystem -->
<mailrepository class="org.apache.james.mailrepository.jdbc.JDBCMailRepository">
<protocols>
<protocol>dbfile</protocol>
</protocols>
<config>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<filestore>file://var/dbmail</filestore>
</config>
</mailrepository>
<!-- The mbox repository is designed for MAIL only; SPOOL performance would be less than ideal-->
<mailrepository class="org.apache.james.mailrepository.file.MBoxMailRepository">
<protocols>
<protocol>mbox</protocol>
</protocols>
<!-- Set if the messages should be listed sorted. False by default -->
<config FIFO="false"/>
</mailrepository>
<!-- If you enable this you need to make sure that embedded Jackrabbit instance is started as well. Check the container configuration -->
<!--
<mailrepository class="org.apache.james.mailrepository.jcr.JCRMailRepository">
<protocols>
<protocol>jcr</protocol>
</protocols>
<config>
<repository>//localhost/jackrabbit.repository</repository>
<username>admin</username>
<password>admin</password>
<workspace>default</workspace>
</config>
</mailrepository>
-->
</mailrepositories>
</mailrepositorystore>

View File

@ -0,0 +1,81 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<pop3servers>
<!-- The POP3 server is enabled by default -->
<!-- Disabling blocks will stop them from listening, -->
<!-- but does not free as many resources as removing them would -->
<pop3server enabled="true">
<jmxName>pop3server</jmxName>
<!-- Configure this to bind to a specific inetaddress -->
<!-- port 995 is the well-known/IANA registered port for POP3S ie over SSL/TLS -->
<!-- port 110 is the well-known/IANA registered port for Standard POP3 -->
<bind>0.0.0.0:110</bind>
<connectionBacklog>200</connectionBacklog>
<!-- Set to true to support STARTTLS or SSL for the Socket.
To use this you need to copy sunjce_provider.jar to /path/james/lib directory.
-->
<tls socketTLS="false" startTLS="false">
<!-- To create a new keystore execute:
keytool -genkey -alias james -keyalg RSA -keystore /path/to/james/conf/keystore
-->
<keystore>file://conf/keystore</keystore>
<secret>yoursecret</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
</tls>
<!-- This is the name used by the server to identify itself in the POP3 -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<!--
<helloName autodetect="true">myMailServer</helloName>
-->
<!-- connection timeout in secconds -->
<connectiontimeout>1200</connectiontimeout>
<!-- Set the maximum simultaneous incoming connections for this service -->
<connectionLimit>0</connectionLimit>
<!-- Set the maximum simultaneous incoming connections per IP for this service -->
<connectionLimitPerIP>0</connectionLimitPerIP>
<handlerchain>
<!-- This loads the core CommandHandlers. Only remove this if you really -->
<!-- know what you are doing -->
<handler class="org.apache.james.pop3server.core.CoreCmdHandlerLoader"/>
</handlerchain>
</pop3server>
</pop3servers>

View File

@ -0,0 +1,57 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- If set recursiveMapping false only the first mapping will get processed. -->
<!-- Default true. -->
<!-- By setting the mappingLimit you can specify how much mapping will get processed -->
<!-- before a bounce will send. This avoid infinity loops. Default 10. -->
<!--
<recipientrewritetable class="org.apache.james.rrt.xml.XMLRecipientRewriteTable">
<recursiveMapping>true</recursiveMapping>
<mappingLimit>10</mappingLimit>
<mapping>some@domain=someuser</mapping>
</recipientrewritetable>
-->
<!-- Database backed RecipientRewritetable -->
<!-- -->
<!-- Use these configurations to store the RecipientRewriteTable in a database. -->
<!--
<recipientrewritetable class="org.apache.james.rrt.jdbc.JDBCRecipientRewriteTable" destinationURL="db://maildb/RecipientRewriteTable">
<recursiveMapping>true</recursiveMapping>
<mappingLimit>10</mappingLimit>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
</recipientrewritetable>
-->
<!-- The default table for storing James' RecipientRewriteTable mappings. -->
<recipientrewritetable class="org.apache.james.rrt.jpa.JPARecipientRewriteTable">
<recursiveMapping>true</recursiveMapping>
<mappingLimit>10</mappingLimit>
</recipientrewritetable>

View File

@ -0,0 +1,323 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<smtpservers>
<!-- The SMTP server is enabled by default -->
<!-- Disabling blocks will stop them from listening, -->
<!-- but does not free as many resources as removing them would -->
<smtpserver enabled="true">
<jmxName>smtpserver</jmxName>
<!-- Configure this to bind to a specific inetaddress -->
<!-- Please NOTE: you should add this IP also to your RemoteAddrNotInNetwork -->
<!-- in order to avoid relay check for locallly generated bounces -->
<!--
Port 25 is the well-known/IANA registered port for SMTP.
Port 465 is the well-known/IANA registered port for SMTP over TLS.
-->
<bind>0.0.0.0:25</bind>
<connectionBacklog>200</connectionBacklog>
<!-- Set to true to support STARTTLS or TLS for the Socket.
To use this you need to copy sunjce_provider.jar to /path/james/lib directory.
-->
<tls socketTLS="false" startTLS="false">
<!-- To create a new keystore execute:
keytool -genkey -alias james -keyalg RSA -keystore /path/to/james/conf/keystore
-->
<keystore>file://conf/keystore</keystore>
<secret>yoursecret</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
<!-- The algorithm is optional and only needs to be specified when using something other
than the Sun JCE provider - You could use IbmX509 with IBM Java runtime. -->
<algorithm>SunX509</algorithm>
</tls>
<!-- This is the name used by the server to identify itself in the SMTP -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<!--
<helloName autodetect="true">myMailServer</helloName>
-->
<!-- connection timeout in secconds -->
<connectiontimeout>360</connectiontimeout>
<!-- Set the maximum simultaneous incoming connections for this service -->
<connectionLimit>0</connectionLimit>
<!-- Set the maximum simultaneous incoming connections per IP for this service -->
<connectionLimitPerIP>0</connectionLimitPerIP>
<!-- Uncomment this if you want to require SMTP authentication.
supported values:
true: required but announced only to not authorizedAddresses
false: don't use AUTH
announce: like true, but always announce AUTH capability to clients
The correct behaviour per RFC value would be false or announce
but we still support true for backward compatibility and because
some webmail client fails when AUTH is announced but no authentication
information has been provided
-->
<!--
<authRequired>true</authRequired>
-->
<!-- CHECKME! -->
<!-- Uncomment this if you want to authorize specific addresses/networks.
If you use SMTP AUTH, addresses that match those specified here will
be permitted to relay without SMTP AUTH. If you do not use SMTP
AUTH, and you specify addreses here, then only addresses that match
those specified will be permitted to relay.
Addresses may be specified as a an IP address or domain name, with an
optional netmask, e.g.,
127.*, 127.0.0.0/8, 127.0.0.0/255.0.0.0, and localhost/8 are all the same
See also the RemoteAddrNotInNetwork matcher in the transport processor.
You would generally use one OR the other approach.
-->
<authorizedAddresses>127.0.0.0/8</authorizedAddresses>
<!-- Uncomment this if you want to verify sender addresses, ensuring that -->
<!-- the sender address matches the user who has authenticated. -->
<!-- This prevents a user of your mail server from acting as someone else -->
<!-- If unspecified, default value is true -->
<!--
<verifyIdentity>true</verifyIdentity>
-->
<!-- This sets the maximum allowed message size (in kilobytes) for this -->
<!-- SMTP service. If unspecified, the value defaults to 0, which means no limit. -->
<maxmessagesize>0</maxmessagesize>
<!-- This sets wether to enforce the use of HELO/EHLO salutation before a -->
<!-- MAIL command is accepted. If unspecified, the value defaults to true -->
<!--
<heloEhloEnforcement>true</heloEhloEnforcement>
-->
<!-- WARNING: This is Non-RFC compliant (default value: true) -->
<!-- See: http://wiki.apache.org/james/StandardsComplianceStatement -->
<!-- TODO: CHANGE TO OFFICIAL URL LATER -->
<addressBracketsEnforcement>true</addressBracketsEnforcement>
<!-- This sets the SMTPGreeting which will be used when connect to the smtpserver -->
<!-- If none is specified a default is generated -->
<!--
<smtpGreeting>JAMES SMTP Server</smtpGreeting>
-->
<!-- The configuration handler chain -->
<handlerchain>
<!-- This connect handler can be used to enable POP3 before SMTP support -->
<!-- Plz note that only the ip get stored to indentify an authenticated client -->
<!-- The expireTime is the time after which an ipAddress is handled as expired -->
<!--
<handler class="org.apache.james.smtpserver.POP3BeforeSMTPHandler">
<expireTime>1 hour</expireTime>
</handler>
-->
<!-- This command handler check against RBL-Lists -->
<!-- If getDetail is set to true it try to retrieve information from TXT Record -->
<!-- why the ip was blocked. Default to false -->
<!-- STOP - before you uncomment out the DNS RBL handler,
please take a moment to review each block list. We
have included some that various JAMES committers use,
but you must decide which, if any, are appropriate
for your environment. The mail servers hosting
@apache.org mailing lists, for example, use a
slightly different list than we have included below.
And it is likely that most JAMES committes also have
slightly different sets of lists. The SpamAssassin
user's list would be one good place to discuss the
measured quality of various block lists.
NOTA BENE: the domain names, below, are terminated
with '.' to ensure that they are absolute names in
DNS lookups. Under some circumstances, names that
are not explicitly absolute could be treated as
relative names, leading to incorrect results. This
has been observed on *nix and MS-Windows platforms
by users of multiple mail servers, and is not JAMES
specific. If you are unsure what this means for you,
please speak with your local system/network admins.
-->
<!--
<handler class="org.apache.james.smtpserver.fastfail.DNSRBLHandler">
<getDetail>false</getDetail>
<rblservers>
<whitelist>query.bondedsender.org.</whitelist>
<blacklist>sbl-xbl.spamhaus.org.</blacklist>
<blacklist>dul.dnsbl.sorbs.net.</blacklist>
<blacklist>list.dsbl.org.</blacklist>
</rblservers>
</handler>
-->
<!-- This command handler can be used to reject emails with not match the SPF record of the sender domain -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.SPFHandler">
<blockSoftFail>false</blockSoftFail>
<blockPermError>true</blockPermError>
</handler>
-->
<!-- checks for resolvable HELO/EHLO before accept the HELO/EHLO -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.ResolvableEhloHeloHandler"/>
-->
<!-- Checks HELO/EHLO is equal the reverse of the connecting client before accept it -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.ReverseEqualsEhloHeloHandler"/>
-->
<!-- If activated mail is only accepted if the sender contains -->
<!-- a resolvable domain having a valid MX Record or A Record associated! -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.ValidSenderDomainHandler"/>
-->
<!-- With ValidRcptHandler, all email will get rejected which has no valid user -->
<!-- You need to add the recipient to the validRecipient list if you want -->
<!-- to accept email for a recipient which not exist on the server -->
<!-- If you want James to act as a spamtrap or honeypot, you may comment ValidRcptHandler -->
<!-- and implement the needed processors in spoolmanager.xml -->
<handler class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
<!-- If activated you can limit the maximal recipients -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.MaxRcptHandler">
<maxRcpt>10</maxRcpt>
</handler>
-->
<!-- If uncomment this block you can enable greylisting. For more infos-->
<!-- how greylisting work see: http://projects.puremagic.com/greylisting/whitepaper.html -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.JDBCGreylistHandler">
<repositoryPath>db://maildb</repositoryPath>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<tempBlockTime>1 hour</tempBlockTime>
<unseenLifeTime>4 hours</unseenLifeTime>
<autoWhiteListLifeTime>36 days</autoWhiteListLifeTime>
<whitelistedNetworks>127.0.0.0/8</whitelistedNetworks>
</handler>
-->
<!-- Tarpitting is a method to insert a small sleep after each rcpt. For more -->
<!-- infos read this: http://www.palomine.net/qmail/tarpit.html . -->
<!-- Default is set to 0 (disabled). -->
<!-- You can also configure the time to sleep in milliseconds -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.TarpitHandler">
<tarpitRcptCount>5</tarpitRcptCount>
<tarpitSleepTime>5000</tarpitSleepTime>
</handler>
-->
<!-- This handler ignore duplicated recipients per session. So the email will get only send on time even -->
<!-- if the recipient is specified more then once -->
<!--
<handler class="org.apache.james.smtpserver.protocol.core.fastfail.SuppressDuplicateRcptHandler"/>
-->
<!-- Load the core command handlers -->
<handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
<!-- This handler can add a hint to the mail which tells the MailQueue which email should get processed first -->
<!-- Normally the MailQueue will just handles Mails in FIFO manner -->
<!-- Valid priority values are 1,5,9 where 9 is the highest-->
<!--
<handler class="org.apache.james.smtpserver.MailPriortyHandler">
<priorityEntries>
<priorityEntry>
<domain>yourdomain1</domain>
<priority>1</priority>
</priorityEntry>
<priorityEntry>
<domain>yourdomain2</domain>
<priority>9</priority>
</priorityEntry>
<priorityEntries>
</handler>
-->
<!-- This MessageHandler could be used to check message against spamd before -->
<!-- accept the email. So its possible to reject a message on smtplevel if a -->
<!-- configured hits amount is reached. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.SpamAssassinHandler">
<spamdHost>127.0.0.1</spamdHost>
<spamdPort>783</spamdPort>
<spamdRejectionHits>10</spamdRejectionHits>
</handler>
-->
<!-- This MessageHandler could be used to extract domain out of the message and check -->
<!-- this domains against uriRbllists. See http://www.surbl.org for more informations. -->
<!-- The message get rejected if a domain matched . -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.URIRBLHandler">
<action>reject</action>
<getDetail>true</getDetail>
<uriRblServers>
<server>multi.surbl.org</server>
</uriRblServers>
</handler>
-->
<!--
<handler class="org.apache.james.smtpserver.SetMimeHeaderHandler">
<headername>SPF-test</headername>
<headervalue>passed</headervalue>
</handler>
-->
</handlerchain>
</smtpserver>
</smtpservers>

View File

@ -0,0 +1,314 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<smtpservers>
<!-- The SMTP server is enabled by default -->
<!-- Disabling blocks will stop them from listening, -->
<!-- but does not free as many resources as removing them would -->
<smtpserver enabled="true">
<jmxName>smtpserver</jmxName>
<!-- Configure this to bind to a specific inetaddress -->
<!-- Please NOTE: you should add this IP also to your RemoteAddrNotInNetwork -->
<!-- in order to avoid relay check for locallly generated bounces -->
<!--
Port 25 is the well-known/IANA registered port for SMTP.
Port 465 is the well-known/IANA registered port for SMTP over TLS.
-->
<bind>0.0.0.0:10025</bind>
<connectionBacklog>200</connectionBacklog>
<!-- Set to true to support STARTTLS or TLS for the Socket.
To use this you need to copy sunjce_provider.jar to /path/james/lib directory.
-->
<tls socketTLS="false" startTLS="true">
<keystore>file://conf/keystore</keystore>
<secret>password</secret>
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
<!-- The algorithm is optional and only needs to be specified when using something other
than the Sun JCE provider - You could use IbmX509 with IBM Java runtime. -->
<algorithm>SunX509</algorithm>
</tls>
<!-- This is the name used by the server to identify itself in the SMTP -->
<!-- protocol. If autodetect is TRUE, the server will discover its -->
<!-- own host name and use that in the protocol. If discovery fails, -->
<!-- the value of 'localhost' is used. If autodetect is FALSE, James -->
<!-- will use the specified value. -->
<helloName autodetect="false">mail.mailiverse.com</helloName>
<!-- connection timeout in secconds -->
<connectiontimeout>360</connectiontimeout>
<!-- Set the maximum simultaneous incoming connections for this service -->
<connectionLimit>0</connectionLimit>
<!-- Set the maximum simultaneous incoming connections per IP for this service -->
<connectionLimitPerIP>0</connectionLimitPerIP>
<!-- Uncomment this if you want to require SMTP authentication.
supported values:
true: required but announced only to not authorizedAddresses
false: don't use AUTH
announce: like true, but always announce AUTH capability to clients
The correct behaviour per RFC value would be false or announce
but we still support true for backward compatibility and because
some webmail client fails when AUTH is announced but no authentication
information has been provided
-->
<authRequired>true</authRequired>
<!-- CHECKME! -->
<!-- Uncomment this if you want to authorize specific addresses/networks.
If you use SMTP AUTH, addresses that match those specified here will
be permitted to relay without SMTP AUTH. If you do not use SMTP
AUTH, and you specify addreses here, then only addresses that match
those specified will be permitted to relay.
Addresses may be specified as a an IP address or domain name, with an
optional netmask, e.g.,
127.*, 127.0.0.0/8, 127.0.0.0/255.0.0.0, and localhost/8 are all the same
See also the RemoteAddrNotInNetwork matcher in the transport processor.
You would generally use one OR the other approach.
-->
<!-- <authorizedAddresses>127.0.0.0/8</authorizedAddresses> -->
<!-- Uncomment this if you want to verify sender addresses, ensuring that -->
<!-- the sender address matches the user who has authenticated. -->
<!-- This prevents a user of your mail server from acting as someone else -->
<!-- If unspecified, default value is true -->
<!--
<verifyIdentity>true</verifyIdentity>
-->
<!-- This sets the maximum allowed message size (in kilobytes) for this -->
<!-- SMTP service. If unspecified, the value defaults to 0, which means no limit. -->
<maxmessagesize>0</maxmessagesize>
<!-- This sets wether to enforce the use of HELO/EHLO salutation before a -->
<!-- MAIL command is accepted. If unspecified, the value defaults to true -->
<!--
<heloEhloEnforcement>true</heloEhloEnforcement>
-->
<!-- WARNING: This is Non-RFC compliant (default value: true) -->
<!-- See: http://wiki.apache.org/james/StandardsComplianceStatement -->
<!-- TODO: CHANGE TO OFFICIAL URL LATER -->
<addressBracketsEnforcement>true</addressBracketsEnforcement>
<!-- This sets the SMTPGreeting which will be used when connect to the smtpserver -->
<!-- If none is specified a default is generated -->
<!--
<smtpGreeting>JAMES SMTP Server</smtpGreeting>
-->
<!-- The configuration handler chain -->
<handlerchain>
<!-- This connect handler can be used to enable POP3 before SMTP support -->
<!-- Plz note that only the ip get stored to indentify an authenticated client -->
<!-- The expireTime is the time after which an ipAddress is handled as expired -->
<!--
<handler class="org.apache.james.smtpserver.POP3BeforeSMTPHandler">
<expireTime>1 hour</expireTime>
</handler>
-->
<!-- This command handler check against RBL-Lists -->
<!-- If getDetail is set to true it try to retrieve information from TXT Record -->
<!-- why the ip was blocked. Default to false -->
<!-- STOP - before you uncomment out the DNS RBL handler,
please take a moment to review each block list. We
have included some that various JAMES committers use,
but you must decide which, if any, are appropriate
for your environment. The mail servers hosting
@apache.org mailing lists, for example, use a
slightly different list than we have included below.
And it is likely that most JAMES committes also have
slightly different sets of lists. The SpamAssassin
user's list would be one good place to discuss the
measured quality of various block lists.
NOTA BENE: the domain names, below, are terminated
with '.' to ensure that they are absolute names in
DNS lookups. Under some circumstances, names that
are not explicitly absolute could be treated as
relative names, leading to incorrect results. This
has been observed on *nix and MS-Windows platforms
by users of multiple mail servers, and is not JAMES
specific. If you are unsure what this means for you,
please speak with your local system/network admins.
-->
<handler class="org.apache.james.smtpserver.fastfail.DNSRBLHandler">
<getDetail>false</getDetail>
<rblservers>
<whitelist>query.bondedsender.org.</whitelist>
<!--
<blacklist>sbl-xbl.spamhaus.org.</blacklist>
<blacklist>dul.dnsbl.sorbs.net.</blacklist>
<blacklist>list.dsbl.org.</blacklist>
-->
</rblservers>
</handler>
<!-- This command handler can be used to reject emails with not match the SPF record of the sender domain -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.SPFHandler">
<blockSoftFail>false</blockSoftFail>
<blockPermError>true</blockPermError>
</handler>
-->
<!-- checks for resolvable HELO/EHLO before accept the HELO/EHLO -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.ResolvableEhloHeloHandler"/>
-->
<!-- Checks HELO/EHLO is equal the reverse of the connecting client before accept it -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.ReverseEqualsEhloHeloHandler"/>
-->
<!-- If activated mail is only accepted if the sender contains -->
<!-- a resolvable domain having a valid MX Record or A Record associated! -->
<!-- If checkAuthNetworks is set to true sender domain will be checked also for clients that -->
<!-- are allowed to relay. Default is false. -->
<handler class="org.apache.james.smtpserver.fastfail.ValidSenderDomainHandler"/>
<!-- With ValidRcptHandler, all email will get rejected which has no valid user -->
<!-- You need to add the recipient to the validRecipient list if you want -->
<!-- to accept email for a recipient which not exist on the server -->
<!-- If you want James to act as a spamtrap or honeypot, you may comment ValidRcptHandler -->
<!-- and implement the needed processors in spoolmanager.xml -->
<handler class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
<!-- If activated you can limit the maximal recipients -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.MaxRcptHandler">
<maxRcpt>10</maxRcpt>
</handler>
-->
<!-- If uncomment this block you can enable greylisting. For more infos-->
<!-- how greylisting work see: http://projects.puremagic.com/greylisting/whitepaper.html -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.JDBCGreylistHandler">
<repositoryPath>db://maildb</repositoryPath>
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<tempBlockTime>1 hour</tempBlockTime>
<unseenLifeTime>4 hours</unseenLifeTime>
<autoWhiteListLifeTime>36 days</autoWhiteListLifeTime>
<whitelistedNetworks>127.0.0.0/8</whitelistedNetworks>
</handler>
-->
<!-- Tarpitting is a method to insert a small sleep after each rcpt. For more -->
<!-- infos read this: http://www.palomine.net/qmail/tarpit.html . -->
<!-- Default is set to 0 (disabled). -->
<!-- You can also configure the time to sleep in milliseconds -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.TarpitHandler">
<tarpitRcptCount>5</tarpitRcptCount>
<tarpitSleepTime>5000</tarpitSleepTime>
</handler>
-->
<!-- This handler ignore duplicated recipients per session. So the email will get only send on time even -->
<!-- if the recipient is specified more then once -->
<!--
<handler class="org.apache.james.smtpserver.protocol.core.fastfail.SuppressDuplicateRcptHandler"/>
-->
<!-- Load the core command handlers -->
<handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
<!-- This handler can add a hint to the mail which tells the MailQueue which email should get processed first -->
<!-- Normally the MailQueue will just handles Mails in FIFO manner -->
<!-- Valid priority values are 1,5,9 where 9 is the highest-->
<!--
<handler class="org.apache.james.smtpserver.MailPriortyHandler">
<priorityEntries>
<priorityEntry>
<domain>yourdomain1</domain>
<priority>1</priority>
</priorityEntry>
<priorityEntry>
<domain>yourdomain2</domain>
<priority>9</priority>
</priorityEntry>
<priorityEntries>
</handler>
-->
<!-- This MessageHandler could be used to check message against spamd before -->
<!-- accept the email. So its possible to reject a message on smtplevel if a -->
<!-- configured hits amount is reached. -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.SpamAssassinHandler">
<spamdHost>127.0.0.1</spamdHost>
<spamdPort>783</spamdPort>
<spamdRejectionHits>10</spamdRejectionHits>
</handler>
-->
<!-- This MessageHandler could be used to extract domain out of the message and check -->
<!-- this domains against uriRbllists. See http://www.surbl.org for more informations. -->
<!-- The message get rejected if a domain matched . -->
<!--
<handler class="org.apache.james.smtpserver.fastfail.URIRBLHandler">
<action>reject</action>
<getDetail>true</getDetail>
<uriRblServers>
<server>multi.surbl.org</server>
</uriRblServers>
</handler>
-->
<!--
<handler class="org.apache.james.smtpserver.SetMimeHeaderHandler">
<headername>SPF-test</headername>
<headervalue>passed</headervalue>
</handler>
-->
</handlerchain>
</smtpserver>
</smtpservers>

View File

@ -0,0 +1,938 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<sqlResources>
<dbMatchers>
<dbMatcher db="mssql" databaseProductName="microsoft sql server"/>
<dbMatcher db="oracle" databaseProductName="oracle.*"/>
<dbMatcher db="mysql" databaseProductName="my.*"/>
<dbMatcher db="derby" databaseProductName="derby.*"/>
<dbMatcher db="postgresql" databaseProductName="postgres.*"/>
<dbMatcher db="hsqldb" databaseProductName="hsql.*"/>
<dbMatcher db="sapdb" databaseProductName="sap.*"/>
<dbMatcher db="hypersonic" databaseProductName="HypersonicSQL"/>
<dbMatcher db="db2" databaseProductName="db2.*"/>
<dbMatcher db="ingres" databaseProductName="ingres.*"/>
</dbMatchers>
<dbOptions>
<dbOption name="getBody" value="useBytes"/>
<dbOption name="getAttributes" value="useBytes"/>
<dbOption db="mssql" name="getBody" value="useBytes"/>
<dbOption db="mssql" name="getAttributes" value="useBytes"/>
<dbOption db="oracle" name="getBody" value="useBlob"/>
<dbOption db="oracle" name="getAttributes" value="useBlob"/>
<dbOption db="mysql" name="getBody" value="useBytes"/>
<dbOption db="mysql" name="getAttributes" value="useBytes"/>
<dbOption db="derby" name="getBody" value="useBytes"/>
<dbOption db="derby" name="getAttributes" value="useBytes"/>
<dbOption db="postgresql" name="getBody" value="useBytes"/>
<dbOption db="postgresql" name="getAttributes" value="useBytes"/>
<dbOption db="sapdb" name="getBody" value="useBytes"/>
<dbOption db="sapdb" name="getAttributes" value="useBytes"/>
<dbOption db="hypersonic" name="getBody" value="useBytes"/>
<dbOption db="hypersonic" name="getAttributes" value="useBytes"/>
<dbOption db="hsqldb" name="getBody" value="useBytes"/>
<dbOption db="hsqldb" name="getAttributes" value="useBytes"/>
<dbOption db="db2" name="getBody" value="useBlob"/>
<dbOption db="db2" name="getAttributes" value="useBlob"/>
<dbOption db="ingres" name="getBody" value="useBytes"/>
<dbOption db="ingres" name="getAttributes" value="useBytes"/>
</dbOptions>
<sqlDefs name="org.apache.james.user.jdbc.JamesUsersJdbcRepository">
<sql name="tableName">${table}</sql>
<!-- Statements used to retrieve all user information for a user from this repository. -->
<sql name="select">SELECT username, pwdHash, pwdAlgorithm, useForwarding,
forwardDestination, useAlias, alias
FROM ${table}
ORDER BY username
</sql>
<!-- Statements used to get all user information for a user with a particular user name in a -->
<!-- case-insensitive fashion from this repository. -->
<sql name="selectByLowercaseName">
SELECT username, pwdHash, pwdAlgorithm, useForwarding,
forwardDestination, useAlias, alias
FROM ${table}
WHERE lower(username) = ?
</sql>
<sql name="selectByLowercaseName" db="mysql">
SELECT username, pwdHash, pwdAlgorithm, useForwarding,
forwardDestination, useAlias, alias
FROM ${table}
WHERE username = ?
</sql>
<!-- Statements used to insert a user into this repository. -->
<sql name="insert">INSERT INTO ${table}
(username, pwdHash, pwdAlgorithm, useForwarding, forwardDestination, useAlias, alias)
VALUES (?,?,?,?,?,?,?)
</sql>
<!-- Statements used to update information for a user from this repository. -->
<sql name="update">UPDATE ${table} SET
pwdHash = ?, pwdAlgorithm = ?, useForwarding = ?, forwardDestination = ?, useAlias = ?, alias = ?
WHERE username = ?
</sql>
<!-- Statements used to delete a user from this repository. -->
<sql name="delete">DELETE FROM ${table} WHERE username = ?</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding INTEGER, forwardDestination VARCHAR(255), useAlias INTEGER, alias VARCHAR(255), PRIMARY KEY(username))</sql>
<sql name="createTable">CREATE TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, forwardDestination VARCHAR(255), useAlias SMALLINT, alias VARCHAR(255), PRIMARY KEY(username))</sql>
<!-- An example of a database-specific sql statement
<sql name="createTable" db="mssql">CREATE TABLE ${table} (uniqueId UNIQUEIDENTIFIER, username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, forwardDestination VARCHAR(255), useAlias SMALLINT, alias VARCHAR(255), PRIMARY KEY(username))</sql>
-->
</sqlDefs>
<sqlDefs name="org.apache.james.user.jdbc.DefaultUsersJdbcRepository">
<sql name="tableName">${table}</sql>
<!-- Statements used to retrieve all user information for a user from this repository. -->
<sql name="select">SELECT username, pwdHash, pwdAlgorithm
FROM ${table}
</sql>
<!-- Statements used to insert a user into this repository. -->
<sql name="insert">INSERT INTO ${table}
(username, pwdHash, pwdAlgorithm)
VALUES (?,?,?)
</sql>
<!-- Statements used to update information for a user from this repository. -->
<sql name="update">UPDATE ${table} SET
pwdHash = ?, pwdAlgorithm = ?
WHERE username = ?
</sql>
<!-- Statements used to delete a user from this repository. -->
<sql name="delete">DELETE FROM ${table} WHERE username = ?</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql>
<sql name="createTable">CREATE TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.user.jdbc.ListUsersJdbcRepository">
<!-- An example of defining "default" parameters within the definition file.
This is used if no key parameter is specified in config. -->
<parameters key="unknownList"/>
<sql name="tableName">${table}</sql>
<!-- Statements used to retrieve all users on a particular list from this repository. -->
<sql name="select">SELECT listSubscriber
FROM ${table}
WHERE listName = '${key}'
</sql>
<!-- Statements used to insert a user/list mapping into this repository. -->
<sql name="insert">INSERT INTO ${table}
(listSubscriber, listName)
VALUES (?, '${key}')
</sql>
<!-- Statements used to update a user/list mapping in this repository. -->
<sql name="update">UPDATE ${table} SET
listSubscriber = ?
WHERE listSubscriber = ? AND listName = '${key}'
</sql>
<!-- Statements used to delete a user/list mapping from this repository. -->
<sql name="delete">DELETE FROM ${table}
WHERE listSubscriber = ? AND listName = '${key}'
</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (listName VARCHAR(64) NOT NULL, listSubscriber VARCHAR(255) NOT NULL, PRIMARY KEY(listName, listSubscriber))</sql>
<sql name="createTable">CREATE TABLE ${table} (listName VARCHAR(64) NOT NULL, listSubscriber VARCHAR(255) NOT NULL, PRIMARY KEY(listName, listSubscriber))</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.mailrepository.jdbc.JDBCMailRepository">
<!-- Statements used to check whether a particular message exists in this repository. -->
<sql name="checkMessageExistsSQL">SELECT count(*) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to update a message stored in this repository. -->
<sql name="updateMessageSQL">UPDATE ${table} SET message_state = ?, error_message = ?, sender = ?, recipients = ?, remote_host = ?, remote_addr = ?, last_updated = ? WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to update the body of a message stored in this repository. -->
<sql name="updateMessageBodySQL">UPDATE ${table} SET message_body = ? WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to update the attributes of a message stored in this repository. -->
<sql name="updateMessageAttributesSQL">UPDATE ${table} SET message_attributes = ? WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to insert a message into this repository. -->
<sql name="insertMessageSQL">INSERT INTO ${table} (message_name,
repository_name, message_state, error_message, sender, recipients,
remote_host, remote_addr, last_updated, message_body,
message_attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)</sql>
<!-- Statements used to retrieve a message stored in this repository. -->
<sql name="retrieveMessageSQL">SELECT message_state, error_message, sender, recipients, remote_host, remote_addr, last_updated FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to retrieve the body of a message stored in this repository. -->
<sql name="retrieveMessageBodySQL">SELECT message_body FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to retrieve the attributes of a message stored in this repository. -->
<sql name="retrieveMessageAttributesSQL">SELECT message_attributes FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to retrieve the size of the body of a message stored in this repository. -->
<!-- NOTE: This statement is optional and need not be implemented for a particular database to be supported. -->
<sql name="retrieveMessageBodySizeSQL" db="mssql">SELECT datalength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="mysql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="hypersonic">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="hsqldb">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="postgresql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="oracle">SELECT dbms_lob.getlength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="db2">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="ingres">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="derby">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to delete a message stored in this repository. -->
<sql name="removeMessageSQL">DELETE FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to list all messages stored in this repository. -->
<sql name="listMessagesSQL">SELECT message_name, message_state, last_updated FROM ${table} WHERE repository_name = ? ORDER BY last_updated ASC</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="mysql">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (100) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients text NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body longblob NOT NULL ,
message_attributes longblob NULL ,
last_updated datetime NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="hypersonic">
CREATE CACHED TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients varchar NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body varchar NOT NULL ,
message_attributes varchar NULL ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients varchar NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body varchar NOT NULL ,
message_attributes varchar NULL ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="mssql">
CREATE TABLE [${table}] (
[message_name] [varchar] (200) NOT NULL,
[repository_name] [varchar] (255) NOT NULL,
[message_state] [varchar] (30) NOT NULL ,
[error_message] [varchar] (1000) NULL ,
[sender] [varchar] (255) NULL ,
[recipients] [text] NOT NULL ,
[remote_host] [varchar] (255) NOT NULL ,
[remote_addr] [varchar] (20) NOT NULL ,
[message_body] [image] NOT NULL ,
[message_attributes] [image] NULL ,
[last_updated] [datetime] NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="oracle">
CREATE TABLE ${table} (
message_name varchar2(200) NOT NULL ,
repository_name varchar2(255) NOT NULL ,
message_state varchar2(30) NOT NULL ,
error_message varchar2(200) NULL ,
sender varchar2(255) ,
recipients varchar2(1000) NOT NULL ,
remote_host varchar2(100) NOT NULL ,
remote_addr varchar2(20) NOT NULL ,
message_body blob NOT NULL ,
message_attributes blob NULL ,
last_updated date NOT NULL ,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="postgresql">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients text NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body bytea NOT NULL ,
message_attributes bytea NULL ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="sapdb">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (200) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (200) NULL ,
recipients long NOT NULL ,
remote_host varchar (100) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body long byte NOT NULL ,
message_attributes long byte NULL ,
last_updated date NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="db2">
CREATE TABLE ${table} (
message_name varchar(200) NOT NULL ,
repository_name varchar(255) NOT NULL ,
message_state varchar(30) NOT NULL ,
error_message varchar(200) ,
sender varchar(255) ,
recipients varchar(1000) NOT NULL ,
remote_host varchar(100) NOT NULL ,
remote_addr varchar(20) NOT NULL ,
message_body blob NOT NULL ,
message_attributes blob ,
last_updated timestamp NOT NULL ,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="ingres">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) ,
sender varchar (255) ,
recipients LONG VARCHAR NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body LONG BYTE NOT NULL ,
message_attributes LONG BYTE ,
last_updated DATE NOT NULL
)
</sql>
<sql name="createTable" db="derby">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) ,
sender varchar (255) ,
recipients long varchar NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body blob NOT NULL ,
message_attributes blob ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.util.bayesian.JDBCBayesianAnalyzer">
<sql name="hamTableName">bayesiananalysis_ham</sql>
<sql name="spamTableName">bayesiananalysis_spam</sql>
<sql name="messageCountsTableName">bayesiananalysis_messagecounts</sql>
<!-- Statements used to retrieve the message counts. -->
<sql name="selectMessageCounts">SELECT HAMCOUNT, SPAMCOUNT FROM bayesiananalysis_messagecounts</sql>
<!-- Statements used to initialize the message counts. -->
<sql name="initializeMessageCounts">INSERT INTO bayesiananalysis_messagecounts (HAMCOUNT, SPAMCOUNT) VALUES (0,0)</sql>
<!-- Statements used to update the ham message counts. -->
<sql name="updateHamMessageCounts">UPDATE bayesiananalysis_messagecounts SET HAMCOUNT=(HAMCOUNT + ?)</sql>
<!-- Statements used to update the spam message counts. -->
<sql name="updateSpamMessageCounts">UPDATE bayesiananalysis_messagecounts SET SPAMCOUNT=(SPAMCOUNT + ?)</sql>
<!-- Statements used to retrieve the ham token counts. -->
<sql name="selectHamTokens">SELECT TOKEN, OCCURRENCES FROM bayesiananalysis_ham</sql>
<!-- Statements used to retrieve the spam token counts. -->
<sql name="selectSpamTokens">SELECT TOKEN, OCCURRENCES FROM bayesiananalysis_spam</sql>
<!-- Statements used to insert the ham token counts. -->
<sql name="insertHamToken">INSERT INTO bayesiananalysis_ham (TOKEN, OCCURRENCES) VALUES (?,?)</sql>
<!-- Statements used to insert the spam token counts. -->
<sql name="insertSpamToken">INSERT INTO bayesiananalysis_spam (TOKEN, OCCURRENCES) VALUES (?,?)</sql>
<!-- Statements used to update the ham token counts. -->
<sql name="updateHamToken">UPDATE bayesiananalysis_ham SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql>
<!-- Statements used to update the spam token counts. -->
<sql name="updateSpamToken">UPDATE bayesiananalysis_spam SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql>
<!-- Statements used to delete ham tokens. -->
<sql name="deleteHamTokens">DELETE FROM bayesiananalysis_ham</sql>
<!-- Statements used to delete spam tokens. -->
<sql name="deleteSpamTokens">DELETE FROM bayesiananalysis_spam</sql>
<!-- Statements used to delete message counts. -->
<sql name="deleteMessageCounts">DELETE FROM bayesiananalysis_messagecounts</sql>
<!-- Statements used to create the "ham" table (the 'token' field must be case sensitive). -->
<sql name="createHamTable" db="mysql">
CREATE TABLE bayesiananalysis_ham (
token varchar(128) binary NOT NULL default '',
occurrences int(11) NOT NULL default '0',
PRIMARY KEY (token)
) TYPE=InnoDB
</sql>
<sql name="createHamTable" db="mssql">
CREATE TABLE [bayesiananalysis_ham] (
[token] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL,
[occurrences] [int] NOT NULL default (0),
PRIMARY KEY (token)
)
</sql>
<sql name="createHamTable" db="derby">
CREATE TABLE bayesiananalysis_ham (
token varchar(128) NOT NULL,
occurrences INTEGER NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<sql name="createHamTable" db="postgresql">
CREATE TABLE bayesiananalysis_ham (
token varchar(128) NOT NULL,
occurrences int NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<!-- Statements used to create the "spam" table (the 'token' field must be case sensitive). -->
<sql name="createSpamTable" db="mysql">
CREATE TABLE bayesiananalysis_spam (
token varchar(128) binary NOT NULL default '',
occurrences int(11) NOT NULL default '0',
PRIMARY KEY (token)
) TYPE=InnoDB
</sql>
<sql name="createSpamTable" db="mssql">
CREATE TABLE [bayesiananalysis_spam] (
[token] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL,
[occurrences] [int] NOT NULL default (0),
PRIMARY KEY (token)
)
</sql>
<sql name="createSpamTable" db="derby">
CREATE TABLE bayesiananalysis_spam (
token varchar (128) NOT NULL,
occurrences INTEGER NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<sql name="createSpamTable" db="postgresql">
CREATE TABLE bayesiananalysis_spam (
token varchar (128) NOT NULL,
occurrences int NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<!-- Statements used to create the "message counts" table. -->
<sql name="createMessageCountsTable" db="mysql">
CREATE TABLE bayesiananalysis_messagecounts (
hamcount int(11) NOT NULL default '0',
spamcount int(11) NOT NULL default '0'
) TYPE=InnoDB
</sql>
<sql name="createMessageCountsTable" db="mssql">
CREATE TABLE [bayesiananalysis_messagecounts] (
[hamcount] [int] NOT NULL default (0),
[spamcount] [int] NOT NULL default (0)
)
</sql>
<sql name="createMessageCountsTable" db="derby">
CREATE TABLE bayesiananalysis_messagecounts (
hamcount INTEGER NOT NULL default 0,
spamcount INTEGER NOT NULL default 0
)
</sql>
<sql name="createMessageCountsTable" db="postgresql">
CREATE TABLE bayesiananalysis_messagecounts (
hamcount int NOT NULL default 0,
spamcount int NOT NULL default 0
)
</sql>
</sqlDefs>
<sqlDefs name="WhiteList">
<sql name="whiteListTableName">whitelist</sql>
<!-- Statements used to retrieve a single entry. -->
<sql name="selectByPK">SELECT localUser, localHost FROM whitelist where (localUser=? AND localHost=? AND remoteUser=? AND remoteHost=?)</sql>
<!-- Statements used to all entries by sender address. -->
<sql name="selectBySender">SELECT remoteUser, remoteHost FROM whitelist where (localUser=? AND localHost=?) ORDER BY remoteUser, remoteHost</sql>
<!-- Statements used to insert an entry. -->
<sql name="insert">INSERT INTO whitelist (localUser, localHost, remoteUser, remoteHost) VALUES (?,?,?,?)</sql>
<!-- Statements used to delete an entry. -->
<sql name="deleteByPK">DELETE FROM whitelist where (localUser=? AND localHost=? AND remoteUser=? AND remoteHost=?)</sql>
<!-- Statements used to create the "whitelist" table. -->
<sql name="createWhiteListTable" db="hypersonic">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
) </sql>
<sql name="createWhiteListTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
) </sql>
<sql name="createWhiteListTable" db="mysql">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) character set latin1 NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) character set latin1 NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
) TYPE=InnoDB
</sql>
<sql name="createWhiteListTable" db="mssql">
CREATE TABLE [whitelist] (
[localUser] [varchar] (64) NOT NULL,
[localHost] [varchar] (255) NOT NULL,
[remoteUser] [varchar] (64) NOT NULL,
[remoteHost] [varchar] (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="oracle">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="postgresql">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="sapdb">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="db2">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="ingres">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="derby">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
</sqlDefs>
<sqlDefs name="NetworkWhiteList">
<sql name="networkWhiteListTableName">networkWhitelist</sql>
<!-- Statements used to retrieve a single entry. -->
<sql name="selectNetwork">SELECT network FROM networkWhitelist where (localUser=? AND localHost=?)</sql>
<!-- Statements used to create the "whitelist" table. -->
<sql name="createNetworkWhiteListTable" db="hypersonic">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost)
) </sql>
<sql name="createNetworkWhiteListTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
) </sql>
<sql name="createNetworkWhiteListTable" db="mysql">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) character set latin1 NOT NULL,
network varchar (255) NOT NULL
) TYPE=InnoDB
</sql>
<sql name="createNetworkWhiteListTable" db="mssql">
CREATE TABLE [networkWhitelist] (
[localUser] [varchar] (64) NOT NULL,
[localHost] [varchar] (255) NOT NULL,
[network] [varchar] (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="oracle">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="postgresql">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="sapdb">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="db2">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="ingres">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="derby">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
</sqlDefs>
<sqlDefs name="GreyList">
<sql name="greyListTableName">greylist</sql>
<!-- Statements used to retrieve a single entry. -->
<sql name="selectQuery">SELECT create_time,count FROM greylist WHERE ipaddress = ? AND sender = ? AND recip = ?</sql>
<!-- Statements used to insert an entry. -->
<sql name="insertQuery">INSERT INTO greylist (ipaddress,sender,recip,count,create_time) values (?,?,?,?,?)</sql>
<!-- Statements used to delete an entry. -->
<sql name="deleteQuery">DELETE FROM greylist WHERE create_time &lt; ? AND count = 0</sql>
<!-- Statements used to delete an entry. -->
<sql name="deleteAutoWhitelistQuery">DELETE FROM greylist WHERE create_time &lt; ?</sql>
<!-- Statements used to delete an entry. -->
<sql name="updateQuery">UPDATE greylist SET create_time = ? , count = ? WHERE ipaddress = ? AND sender = ? AND recip = ?</sql>
<!-- Statements used to create the "whitelist" table. -->
<sql name="createGreyListTable" db="hypersonic">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time datetime NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
) </sql>
<sql name="createGreyListTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamo NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
) </sql>
<sql name="createGreyListTable" db="mysql">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time datetime NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
) TYPE=InnoDB
</sql>
<sql name="createGreyListTable" db="mssql">
CREATE TABLE [greylist] (
[ipaddress] [varchar] (20) NOT NULL,
[sender] [varchar] (255) NOT NULL,
[recip] [varchar] (255) NOT NULL,
[count] [int] NOT NULL,
[create_time] [datetime] NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="oracle">
CREATE TABLE greylist (
ipaddress varchar2(20) NOT NULL,
sender varchar2(255) NOT NULL,
recip varchar2(255) NOT NULL,
count int NOT NULL,
create_time datetime NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="postgresql">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamp NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="sapdb">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time date NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="db2">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamp NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="ingres">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time date NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="derby">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamp NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.rrt.jdbc.JDBCRecipientRewriteTable">
<!-- Statements used to check whether a particular message exists in this repository. -->
<sql name="selectMappings" db="derby">select RecipientRewriteTable.target_address,(RecipientRewriteTable."user" || '@' ||RecipientRewriteTable.domain) from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where ((RecipientRewriteTable."user") like ? or (RecipientRewriteTable."user") = '*') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain = '*')) order by 2 desc</sql>
<sql name="selectMappings">select RecipientRewriteTable.target_address from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where (RecipientRewriteTable.user like ? or RecipientRewriteTable.user = '*') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain = '*')) order by concat(RecipientRewriteTable.user,'@',RecipientRewriteTable.domain) desc limit 1</sql>
<sql name="selectMappings" db="postgresql">select RecipientRewriteTable.target_address from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where (RecipientRewriteTable.user like ? or RecipientRewriteTable.user = '*') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain = '*')) order by (RecipientRewriteTable.user || '@' || RecipientRewriteTable.domain) desc limit 1</sql>
<sql name="selectUserDomainMapping" db="derby">select RecipientRewriteTable.target_address from RecipientRewriteTable where RecipientRewriteTable."user" = ? and RecipientRewriteTable.domain = ? </sql>
<sql name="selectUserDomainMapping">select RecipientRewriteTable.target_address from RecipientRewriteTable where RecipientRewriteTable.user = ? and RecipientRewriteTable.domain = ? </sql>
<sql name="deleteMapping">delete from RecipientRewriteTable where RecipientRewriteTable."user" = ? and RecipientRewriteTable.domain = ? and RecipientRewriteTable.target_address = ?</sql>
<sql name="updateMapping">update RecipientRewriteTable set RecipientRewriteTable.target_address = ? where RecipientRewriteTable."user" = ? and RecipientRewriteTable.domain = ? </sql>
<sql name="addMapping">insert into RecipientRewriteTable values(?,?,?) </sql>
<sql name="selectAllMappings">select * from RecipientRewriteTable </sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="mysql">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<!-- TEMPORARY DISABLED -->
<!--
<sql name="createTable" db="hypersonic">
CREATE CACHED TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="hsqldb">
CREATE CACHED TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="mssql">
CREATE TABLE [RecipientRewriteTable] (
[user] [varchar] (64) NOT NULL default '',
[domain] [varchar] (255) NOT NULL default '',
[target_address] [varchar] (255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="oracle">
CREATE TABLE RecipientRewriteTable (
user varchar2(64) NOT NULL default '',
domain varchar2(255) NOT NULL default '',
target_address varchar2(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="sapdb">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="db2">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="ingres">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
-->
<sql name="createTable" db="postgresql">
CREATE TABLE RecipientRewriteTable (
"user" varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY ("user",domain)
)
</sql>
<sql name="createTable" db="derby">
CREATE TABLE RecipientRewriteTable (
"user" varchar (64) NOT NULL default '',
domain varchar (255) NOT NULL default '',
target_address varchar (255) NOT NULL default '',
PRIMARY KEY ("user",domain)
)
</sql>
</sqlDefs>
</sqlResources>

View File

@ -0,0 +1,938 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<sqlResources>
<dbMatchers>
<dbMatcher db="mssql" databaseProductName="microsoft sql server"/>
<dbMatcher db="oracle" databaseProductName="oracle.*"/>
<dbMatcher db="mysql" databaseProductName="my.*"/>
<dbMatcher db="derby" databaseProductName="derby.*"/>
<dbMatcher db="postgresql" databaseProductName="postgres.*"/>
<dbMatcher db="hsqldb" databaseProductName="hsql.*"/>
<dbMatcher db="sapdb" databaseProductName="sap.*"/>
<dbMatcher db="hypersonic" databaseProductName="HypersonicSQL"/>
<dbMatcher db="db2" databaseProductName="db2.*"/>
<dbMatcher db="ingres" databaseProductName="ingres.*"/>
</dbMatchers>
<dbOptions>
<dbOption name="getBody" value="useBytes"/>
<dbOption name="getAttributes" value="useBytes"/>
<dbOption db="mssql" name="getBody" value="useBytes"/>
<dbOption db="mssql" name="getAttributes" value="useBytes"/>
<dbOption db="oracle" name="getBody" value="useBlob"/>
<dbOption db="oracle" name="getAttributes" value="useBlob"/>
<dbOption db="mysql" name="getBody" value="useBytes"/>
<dbOption db="mysql" name="getAttributes" value="useBytes"/>
<dbOption db="derby" name="getBody" value="useBytes"/>
<dbOption db="derby" name="getAttributes" value="useBytes"/>
<dbOption db="postgresql" name="getBody" value="useBytes"/>
<dbOption db="postgresql" name="getAttributes" value="useBytes"/>
<dbOption db="sapdb" name="getBody" value="useBytes"/>
<dbOption db="sapdb" name="getAttributes" value="useBytes"/>
<dbOption db="hypersonic" name="getBody" value="useBytes"/>
<dbOption db="hypersonic" name="getAttributes" value="useBytes"/>
<dbOption db="hsqldb" name="getBody" value="useBytes"/>
<dbOption db="hsqldb" name="getAttributes" value="useBytes"/>
<dbOption db="db2" name="getBody" value="useBlob"/>
<dbOption db="db2" name="getAttributes" value="useBlob"/>
<dbOption db="ingres" name="getBody" value="useBytes"/>
<dbOption db="ingres" name="getAttributes" value="useBytes"/>
</dbOptions>
<sqlDefs name="org.apache.james.user.jdbc.JamesUsersJdbcRepository">
<sql name="tableName">${table}</sql>
<!-- Statements used to retrieve all user information for a user from this repository. -->
<sql name="select">SELECT username, pwdHash, pwdAlgorithm, useForwarding,
forwardDestination, useAlias, alias
FROM ${table}
ORDER BY username
</sql>
<!-- Statements used to get all user information for a user with a particular user name in a -->
<!-- case-insensitive fashion from this repository. -->
<sql name="selectByLowercaseName">
SELECT username, pwdHash, pwdAlgorithm, useForwarding,
forwardDestination, useAlias, alias
FROM ${table}
WHERE lower(username) = ?
</sql>
<sql name="selectByLowercaseName" db="mysql">
SELECT username, pwdHash, pwdAlgorithm, useForwarding,
forwardDestination, useAlias, alias
FROM ${table}
WHERE username = ?
</sql>
<!-- Statements used to insert a user into this repository. -->
<sql name="insert">INSERT INTO ${table}
(username, pwdHash, pwdAlgorithm, useForwarding, forwardDestination, useAlias, alias)
VALUES (?,?,?,?,?,?,?)
</sql>
<!-- Statements used to update information for a user from this repository. -->
<sql name="update">UPDATE ${table} SET
pwdHash = ?, pwdAlgorithm = ?, useForwarding = ?, forwardDestination = ?, useAlias = ?, alias = ?
WHERE username = ?
</sql>
<!-- Statements used to delete a user from this repository. -->
<sql name="delete">DELETE FROM ${table} WHERE username = ?</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding INTEGER, forwardDestination VARCHAR(255), useAlias INTEGER, alias VARCHAR(255), PRIMARY KEY(username))</sql>
<sql name="createTable">CREATE TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, forwardDestination VARCHAR(255), useAlias SMALLINT, alias VARCHAR(255), PRIMARY KEY(username))</sql>
<!-- An example of a database-specific sql statement
<sql name="createTable" db="mssql">CREATE TABLE ${table} (uniqueId UNIQUEIDENTIFIER, username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, forwardDestination VARCHAR(255), useAlias SMALLINT, alias VARCHAR(255), PRIMARY KEY(username))</sql>
-->
</sqlDefs>
<sqlDefs name="org.apache.james.user.jdbc.DefaultUsersJdbcRepository">
<sql name="tableName">${table}</sql>
<!-- Statements used to retrieve all user information for a user from this repository. -->
<sql name="select">SELECT username, pwdHash, pwdAlgorithm
FROM ${table}
</sql>
<!-- Statements used to insert a user into this repository. -->
<sql name="insert">INSERT INTO ${table}
(username, pwdHash, pwdAlgorithm)
VALUES (?,?,?)
</sql>
<!-- Statements used to update information for a user from this repository. -->
<sql name="update">UPDATE ${table} SET
pwdHash = ?, pwdAlgorithm = ?
WHERE username = ?
</sql>
<!-- Statements used to delete a user from this repository. -->
<sql name="delete">DELETE FROM ${table} WHERE username = ?</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql>
<sql name="createTable">CREATE TABLE ${table} (username VARCHAR(64) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.user.jdbc.ListUsersJdbcRepository">
<!-- An example of defining "default" parameters within the definition file.
This is used if no key parameter is specified in config. -->
<parameters key="unknownList"/>
<sql name="tableName">${table}</sql>
<!-- Statements used to retrieve all users on a particular list from this repository. -->
<sql name="select">SELECT listSubscriber
FROM ${table}
WHERE listName = '${key}'
</sql>
<!-- Statements used to insert a user/list mapping into this repository. -->
<sql name="insert">INSERT INTO ${table}
(listSubscriber, listName)
VALUES (?, '${key}')
</sql>
<!-- Statements used to update a user/list mapping in this repository. -->
<sql name="update">UPDATE ${table} SET
listSubscriber = ?
WHERE listSubscriber = ? AND listName = '${key}'
</sql>
<!-- Statements used to delete a user/list mapping from this repository. -->
<sql name="delete">DELETE FROM ${table}
WHERE listSubscriber = ? AND listName = '${key}'
</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="hypersonic">CREATE CACHED TABLE ${table} (listName VARCHAR(64) NOT NULL, listSubscriber VARCHAR(255) NOT NULL, PRIMARY KEY(listName, listSubscriber))</sql>
<sql name="createTable">CREATE TABLE ${table} (listName VARCHAR(64) NOT NULL, listSubscriber VARCHAR(255) NOT NULL, PRIMARY KEY(listName, listSubscriber))</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.mailrepository.jdbc.JDBCMailRepository">
<!-- Statements used to check whether a particular message exists in this repository. -->
<sql name="checkMessageExistsSQL">SELECT count(*) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to update a message stored in this repository. -->
<sql name="updateMessageSQL">UPDATE ${table} SET message_state = ?, error_message = ?, sender = ?, recipients = ?, remote_host = ?, remote_addr = ?, last_updated = ? WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to update the body of a message stored in this repository. -->
<sql name="updateMessageBodySQL">UPDATE ${table} SET message_body = ? WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to update the attributes of a message stored in this repository. -->
<sql name="updateMessageAttributesSQL">UPDATE ${table} SET message_attributes = ? WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to insert a message into this repository. -->
<sql name="insertMessageSQL">INSERT INTO ${table} (message_name,
repository_name, message_state, error_message, sender, recipients,
remote_host, remote_addr, last_updated, message_body,
message_attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)</sql>
<!-- Statements used to retrieve a message stored in this repository. -->
<sql name="retrieveMessageSQL">SELECT message_state, error_message, sender, recipients, remote_host, remote_addr, last_updated FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to retrieve the body of a message stored in this repository. -->
<sql name="retrieveMessageBodySQL">SELECT message_body FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to retrieve the attributes of a message stored in this repository. -->
<sql name="retrieveMessageAttributesSQL">SELECT message_attributes FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to retrieve the size of the body of a message stored in this repository. -->
<!-- NOTE: This statement is optional and need not be implemented for a particular database to be supported. -->
<sql name="retrieveMessageBodySizeSQL" db="mssql">SELECT datalength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="mysql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="hypersonic">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="hsqldb">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="postgresql">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="oracle">SELECT dbms_lob.getlength(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="db2">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="ingres">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<sql name="retrieveMessageBodySizeSQL" db="derby">SELECT length(message_body) FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to delete a message stored in this repository. -->
<sql name="removeMessageSQL">DELETE FROM ${table} WHERE message_name = ? AND repository_name = ?</sql>
<!-- Statements used to list all messages stored in this repository. -->
<sql name="listMessagesSQL">SELECT message_name, message_state, last_updated FROM ${table} WHERE repository_name = ? ORDER BY last_updated ASC</sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="mysql">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (100) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients text NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body longblob NOT NULL ,
message_attributes longblob NULL ,
last_updated datetime NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="hypersonic">
CREATE CACHED TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients varchar NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body varchar NOT NULL ,
message_attributes varchar NULL ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients varchar NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body varchar NOT NULL ,
message_attributes varchar NULL ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="mssql">
CREATE TABLE [${table}] (
[message_name] [varchar] (200) NOT NULL,
[repository_name] [varchar] (255) NOT NULL,
[message_state] [varchar] (30) NOT NULL ,
[error_message] [varchar] (1000) NULL ,
[sender] [varchar] (255) NULL ,
[recipients] [text] NOT NULL ,
[remote_host] [varchar] (255) NOT NULL ,
[remote_addr] [varchar] (20) NOT NULL ,
[message_body] [image] NOT NULL ,
[message_attributes] [image] NULL ,
[last_updated] [datetime] NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="oracle">
CREATE TABLE ${table} (
message_name varchar2(200) NOT NULL ,
repository_name varchar2(255) NOT NULL ,
message_state varchar2(30) NOT NULL ,
error_message varchar2(200) NULL ,
sender varchar2(255) ,
recipients varchar2(1000) NOT NULL ,
remote_host varchar2(100) NOT NULL ,
remote_addr varchar2(20) NOT NULL ,
message_body blob NOT NULL ,
message_attributes blob NULL ,
last_updated date NOT NULL ,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="postgresql">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (255) NULL ,
recipients text NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body bytea NOT NULL ,
message_attributes bytea NULL ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="sapdb">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (200) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) NULL ,
sender varchar (200) NULL ,
recipients long NOT NULL ,
remote_host varchar (100) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body long byte NOT NULL ,
message_attributes long byte NULL ,
last_updated date NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="db2">
CREATE TABLE ${table} (
message_name varchar(200) NOT NULL ,
repository_name varchar(255) NOT NULL ,
message_state varchar(30) NOT NULL ,
error_message varchar(200) ,
sender varchar(255) ,
recipients varchar(1000) NOT NULL ,
remote_host varchar(100) NOT NULL ,
remote_addr varchar(20) NOT NULL ,
message_body blob NOT NULL ,
message_attributes blob ,
last_updated timestamp NOT NULL ,
PRIMARY KEY (repository_name, message_name)
)
</sql>
<sql name="createTable" db="ingres">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) ,
sender varchar (255) ,
recipients LONG VARCHAR NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body LONG BYTE NOT NULL ,
message_attributes LONG BYTE ,
last_updated DATE NOT NULL
)
</sql>
<sql name="createTable" db="derby">
CREATE TABLE ${table} (
message_name varchar (200) NOT NULL,
repository_name varchar (255) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (200) ,
sender varchar (255) ,
recipients long varchar NOT NULL ,
remote_host varchar (255) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body blob NOT NULL ,
message_attributes blob ,
last_updated timestamp NOT NULL,
PRIMARY KEY (repository_name, message_name)
)
</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.util.bayesian.JDBCBayesianAnalyzer">
<sql name="hamTableName">bayesiananalysis_ham</sql>
<sql name="spamTableName">bayesiananalysis_spam</sql>
<sql name="messageCountsTableName">bayesiananalysis_messagecounts</sql>
<!-- Statements used to retrieve the message counts. -->
<sql name="selectMessageCounts">SELECT HAMCOUNT, SPAMCOUNT FROM bayesiananalysis_messagecounts</sql>
<!-- Statements used to initialize the message counts. -->
<sql name="initializeMessageCounts">INSERT INTO bayesiananalysis_messagecounts (HAMCOUNT, SPAMCOUNT) VALUES (0,0)</sql>
<!-- Statements used to update the ham message counts. -->
<sql name="updateHamMessageCounts">UPDATE bayesiananalysis_messagecounts SET HAMCOUNT=(HAMCOUNT + ?)</sql>
<!-- Statements used to update the spam message counts. -->
<sql name="updateSpamMessageCounts">UPDATE bayesiananalysis_messagecounts SET SPAMCOUNT=(SPAMCOUNT + ?)</sql>
<!-- Statements used to retrieve the ham token counts. -->
<sql name="selectHamTokens">SELECT TOKEN, OCCURRENCES FROM bayesiananalysis_ham</sql>
<!-- Statements used to retrieve the spam token counts. -->
<sql name="selectSpamTokens">SELECT TOKEN, OCCURRENCES FROM bayesiananalysis_spam</sql>
<!-- Statements used to insert the ham token counts. -->
<sql name="insertHamToken">INSERT INTO bayesiananalysis_ham (TOKEN, OCCURRENCES) VALUES (?,?)</sql>
<!-- Statements used to insert the spam token counts. -->
<sql name="insertSpamToken">INSERT INTO bayesiananalysis_spam (TOKEN, OCCURRENCES) VALUES (?,?)</sql>
<!-- Statements used to update the ham token counts. -->
<sql name="updateHamToken">UPDATE bayesiananalysis_ham SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql>
<!-- Statements used to update the spam token counts. -->
<sql name="updateSpamToken">UPDATE bayesiananalysis_spam SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql>
<!-- Statements used to delete ham tokens. -->
<sql name="deleteHamTokens">DELETE FROM bayesiananalysis_ham</sql>
<!-- Statements used to delete spam tokens. -->
<sql name="deleteSpamTokens">DELETE FROM bayesiananalysis_spam</sql>
<!-- Statements used to delete message counts. -->
<sql name="deleteMessageCounts">DELETE FROM bayesiananalysis_messagecounts</sql>
<!-- Statements used to create the "ham" table (the 'token' field must be case sensitive). -->
<sql name="createHamTable" db="mysql">
CREATE TABLE bayesiananalysis_ham (
token varchar(128) binary NOT NULL default '',
occurrences int(11) NOT NULL default '0',
PRIMARY KEY (token)
) TYPE=InnoDB
</sql>
<sql name="createHamTable" db="mssql">
CREATE TABLE [bayesiananalysis_ham] (
[token] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL,
[occurrences] [int] NOT NULL default (0),
PRIMARY KEY (token)
)
</sql>
<sql name="createHamTable" db="derby">
CREATE TABLE bayesiananalysis_ham (
token varchar(128) NOT NULL,
occurrences INTEGER NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<sql name="createHamTable" db="postgresql">
CREATE TABLE bayesiananalysis_ham (
token varchar(128) NOT NULL,
occurrences int NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<!-- Statements used to create the "spam" table (the 'token' field must be case sensitive). -->
<sql name="createSpamTable" db="mysql">
CREATE TABLE bayesiananalysis_spam (
token varchar(128) binary NOT NULL default '',
occurrences int(11) NOT NULL default '0',
PRIMARY KEY (token)
) TYPE=InnoDB
</sql>
<sql name="createSpamTable" db="mssql">
CREATE TABLE [bayesiananalysis_spam] (
[token] [varchar] (128) COLLATE Latin1_General_CS_AS NOT NULL,
[occurrences] [int] NOT NULL default (0),
PRIMARY KEY (token)
)
</sql>
<sql name="createSpamTable" db="derby">
CREATE TABLE bayesiananalysis_spam (
token varchar (128) NOT NULL,
occurrences INTEGER NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<sql name="createSpamTable" db="postgresql">
CREATE TABLE bayesiananalysis_spam (
token varchar (128) NOT NULL,
occurrences int NOT NULL default 0,
PRIMARY KEY (token)
)
</sql>
<!-- Statements used to create the "message counts" table. -->
<sql name="createMessageCountsTable" db="mysql">
CREATE TABLE bayesiananalysis_messagecounts (
hamcount int(11) NOT NULL default '0',
spamcount int(11) NOT NULL default '0'
) TYPE=InnoDB
</sql>
<sql name="createMessageCountsTable" db="mssql">
CREATE TABLE [bayesiananalysis_messagecounts] (
[hamcount] [int] NOT NULL default (0),
[spamcount] [int] NOT NULL default (0)
)
</sql>
<sql name="createMessageCountsTable" db="derby">
CREATE TABLE bayesiananalysis_messagecounts (
hamcount INTEGER NOT NULL default 0,
spamcount INTEGER NOT NULL default 0
)
</sql>
<sql name="createMessageCountsTable" db="postgresql">
CREATE TABLE bayesiananalysis_messagecounts (
hamcount int NOT NULL default 0,
spamcount int NOT NULL default 0
)
</sql>
</sqlDefs>
<sqlDefs name="WhiteList">
<sql name="whiteListTableName">whitelist</sql>
<!-- Statements used to retrieve a single entry. -->
<sql name="selectByPK">SELECT localUser, localHost FROM whitelist where (localUser=? AND localHost=? AND remoteUser=? AND remoteHost=?)</sql>
<!-- Statements used to all entries by sender address. -->
<sql name="selectBySender">SELECT remoteUser, remoteHost FROM whitelist where (localUser=? AND localHost=?) ORDER BY remoteUser, remoteHost</sql>
<!-- Statements used to insert an entry. -->
<sql name="insert">INSERT INTO whitelist (localUser, localHost, remoteUser, remoteHost) VALUES (?,?,?,?)</sql>
<!-- Statements used to delete an entry. -->
<sql name="deleteByPK">DELETE FROM whitelist where (localUser=? AND localHost=? AND remoteUser=? AND remoteHost=?)</sql>
<!-- Statements used to create the "whitelist" table. -->
<sql name="createWhiteListTable" db="hypersonic">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
) </sql>
<sql name="createWhiteListTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
) </sql>
<sql name="createWhiteListTable" db="mysql">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) character set latin1 NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) character set latin1 NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
) TYPE=InnoDB
</sql>
<sql name="createWhiteListTable" db="mssql">
CREATE TABLE [whitelist] (
[localUser] [varchar] (64) NOT NULL,
[localHost] [varchar] (255) NOT NULL,
[remoteUser] [varchar] (64) NOT NULL,
[remoteHost] [varchar] (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="oracle">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="postgresql">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="sapdb">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="db2">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="ingres">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
<sql name="createWhiteListTable" db="derby">
CREATE TABLE whitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
remoteUser varchar (64) NOT NULL,
remoteHost varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost, remoteUser, remoteHost)
)
</sql>
</sqlDefs>
<sqlDefs name="NetworkWhiteList">
<sql name="networkWhiteListTableName">networkWhitelist</sql>
<!-- Statements used to retrieve a single entry. -->
<sql name="selectNetwork">SELECT network FROM networkWhitelist where (localUser=? AND localHost=?)</sql>
<!-- Statements used to create the "whitelist" table. -->
<sql name="createNetworkWhiteListTable" db="hypersonic">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL,
PRIMARY KEY (localUser, localHost)
) </sql>
<sql name="createNetworkWhiteListTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
) </sql>
<sql name="createNetworkWhiteListTable" db="mysql">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) character set latin1 NOT NULL,
network varchar (255) NOT NULL
) TYPE=InnoDB
</sql>
<sql name="createNetworkWhiteListTable" db="mssql">
CREATE TABLE [networkWhitelist] (
[localUser] [varchar] (64) NOT NULL,
[localHost] [varchar] (255) NOT NULL,
[network] [varchar] (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="oracle">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="postgresql">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="sapdb">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="db2">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="ingres">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
<sql name="createNetworkWhiteListTable" db="derby">
CREATE TABLE networkWhitelist (
localUser varchar (64) NOT NULL,
localHost varchar (255) NOT NULL,
network varchar (255) NOT NULL
)
</sql>
</sqlDefs>
<sqlDefs name="GreyList">
<sql name="greyListTableName">greylist</sql>
<!-- Statements used to retrieve a single entry. -->
<sql name="selectQuery">SELECT create_time,count FROM greylist WHERE ipaddress = ? AND sender = ? AND recip = ?</sql>
<!-- Statements used to insert an entry. -->
<sql name="insertQuery">INSERT INTO greylist (ipaddress,sender,recip,count,create_time) values (?,?,?,?,?)</sql>
<!-- Statements used to delete an entry. -->
<sql name="deleteQuery">DELETE FROM greylist WHERE create_time &lt; ? AND count = 0</sql>
<!-- Statements used to delete an entry. -->
<sql name="deleteAutoWhitelistQuery">DELETE FROM greylist WHERE create_time &lt; ?</sql>
<!-- Statements used to delete an entry. -->
<sql name="updateQuery">UPDATE greylist SET create_time = ? , count = ? WHERE ipaddress = ? AND sender = ? AND recip = ?</sql>
<!-- Statements used to create the "whitelist" table. -->
<sql name="createGreyListTable" db="hypersonic">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time datetime NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
) </sql>
<sql name="createGreyListTable" db="hsqldb">
CREATE CACHED TABLE ${table} (
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamo NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
) </sql>
<sql name="createGreyListTable" db="mysql">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time datetime NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
) TYPE=InnoDB
</sql>
<sql name="createGreyListTable" db="mssql">
CREATE TABLE [greylist] (
[ipaddress] [varchar] (20) NOT NULL,
[sender] [varchar] (255) NOT NULL,
[recip] [varchar] (255) NOT NULL,
[count] [int] NOT NULL,
[create_time] [datetime] NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="oracle">
CREATE TABLE greylist (
ipaddress varchar2(20) NOT NULL,
sender varchar2(255) NOT NULL,
recip varchar2(255) NOT NULL,
count int NOT NULL,
create_time datetime NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="postgresql">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamp NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="sapdb">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time date NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="db2">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamp NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="ingres">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time date NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
<sql name="createGreyListTable" db="derby">
CREATE TABLE greylist (
ipaddress varchar (20) NOT NULL,
sender varchar (255) NOT NULL,
recip varchar (255) NOT NULL,
count int NOT NULL,
create_time timestamp NOT NULL,
PRIMARY KEY (ipaddress,sender,recip)
)
</sql>
</sqlDefs>
<sqlDefs name="org.apache.james.rrt.jdbc.JDBCRecipientRewriteTable">
<!-- Statements used to check whether a particular message exists in this repository. -->
<sql name="selectMappings" db="derby">select RecipientRewriteTable.target_address,(RecipientRewriteTable."user" || '@' ||RecipientRewriteTable.domain) from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where ((RecipientRewriteTable."user") like ? or (RecipientRewriteTable."user") = '*') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain = '*')) order by 2 desc</sql>
<sql name="selectMappings">select RecipientRewriteTable.target_address from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where (RecipientRewriteTable.user like ? or RecipientRewriteTable.user = '*') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain = '*')) order by concat(RecipientRewriteTable.user,'@',RecipientRewriteTable.domain) desc limit 1</sql>
<sql name="selectMappings" db="postgresql">select RecipientRewriteTable.target_address from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where (RecipientRewriteTable.user like ? or RecipientRewriteTable.user = '*') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain = '*')) order by (RecipientRewriteTable.user || '@' || RecipientRewriteTable.domain) desc limit 1</sql>
<sql name="selectUserDomainMapping" db="derby">select RecipientRewriteTable.target_address from RecipientRewriteTable where RecipientRewriteTable."user" = ? and RecipientRewriteTable.domain = ? </sql>
<sql name="selectUserDomainMapping">select RecipientRewriteTable.target_address from RecipientRewriteTable where RecipientRewriteTable.user = ? and RecipientRewriteTable.domain = ? </sql>
<sql name="deleteMapping">delete from RecipientRewriteTable where RecipientRewriteTable."user" = ? and RecipientRewriteTable.domain = ? and RecipientRewriteTable.target_address = ?</sql>
<sql name="updateMapping">update RecipientRewriteTable set RecipientRewriteTable.target_address = ? where RecipientRewriteTable."user" = ? and RecipientRewriteTable.domain = ? </sql>
<sql name="addMapping">insert into RecipientRewriteTable values(?,?,?) </sql>
<sql name="selectAllMappings">select * from RecipientRewriteTable </sql>
<!-- Statements used to create the table associated with this class. -->
<sql name="createTable" db="mysql">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<!-- TEMPORARY DISABLED -->
<!--
<sql name="createTable" db="hypersonic">
CREATE CACHED TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="hsqldb">
CREATE CACHED TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="mssql">
CREATE TABLE [RecipientRewriteTable] (
[user] [varchar] (64) NOT NULL default '',
[domain] [varchar] (255) NOT NULL default '',
[target_address] [varchar] (255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="oracle">
CREATE TABLE RecipientRewriteTable (
user varchar2(64) NOT NULL default '',
domain varchar2(255) NOT NULL default '',
target_address varchar2(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="sapdb">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="db2">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
<sql name="createTable" db="ingres">
CREATE TABLE RecipientRewriteTable (
user varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY (user,domain)
)
</sql>
-->
<sql name="createTable" db="postgresql">
CREATE TABLE RecipientRewriteTable (
"user" varchar(64) NOT NULL default '',
domain varchar(255) NOT NULL default '',
target_address varchar(255) NOT NULL default '',
PRIMARY KEY ("user",domain)
)
</sql>
<sql name="createTable" db="derby">
CREATE TABLE RecipientRewriteTable (
"user" varchar (64) NOT NULL default '',
domain varchar (255) NOT NULL default '',
target_address varchar (255) NOT NULL default '',
PRIMARY KEY ("user",domain)
)
</sql>
</sqlDefs>
</sqlResources>

View File

@ -0,0 +1,81 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<!-- Configure User Repositories here. -->
<!-- -->
<!-- User repositories are required for the following purposes: -->
<!-- - storing James user information and authentication data. -->
<!-- -->
<!-- JPA based backend. Support password algorithm are:
MD5, SHA-256, SHA-512, NONE
-->
<usersrepository name="LocalUsers" class="org.apache.james.user.jpa.JPAUsersRepository">
<algorithm>MD5</algorithm>
<enableVirtualHosting>false</enableVirtualHosting>
</usersrepository>
<!-- Read-Only LDAP based UsersRepository -->
<!--
<repository name="LocalUsers" class="org.apache.james.user.ldap.ReadOnlyUsersLDAPRepository" ldapHost="ldap://myldapserver:389"
principal="uid=ldapUser,ou=system" credentials="password" userBase="ou=People,o=myorg.com,ou=system" userIdAttribute="uid"/>;
-->
<!-- The UsersRepository implementations below are DEPRECATED and will get removed in the next release -->
<!-- They are just listed here for backward-compatibility-->
<!-- File-based user repositories Use these configurations to store user info in the filesystem -->
<!-- The LocalUsers repository, for storing James' User info. -->
<!-- DEPRECATED: This implementation will get removed in the next release -->
<!--
<usersrepository name="LocalUsers" class="org.apache.james.user.file.UsersFileRepository">
<destination URL="file://var/users/"/>
<ignoreCase>true</ignoreCase>
<enableAliases>true</enableAliases>
<enableForwarding>true</enableForwarding>
<enableVirtualHosting>false</enableVirtualHosting>
</usersrepository>
-->
<!-- Database backed user repositories -->
<!-- -->
<!-- Use these configurations to store user info in a database. -->
<!-- Note: The<data-source>element must refer to a connection configured -->
<!-- in the<database-connections>configuration section. -->
<!-- The LocalUsers repository, for storing James' User info. -->
<!-- DEPRECATED: This implementation will get removed in the next release -->
<!-- Use JPAUsersRepository if you want to store the Users in a database -->
<!--
<usersrepository name="LocalUsers" class="org.apache.james.user.jdbc.JamesUsersJdbcRepository" destinationURL="db://maildb/users">
<sqlFile>file://conf/sqlResources.xml</sqlFile>
<ignoreCase>true</ignoreCase>
<enableAliases>true</enableAliases>
<enableForwarding>true</enableForwarding>
<enableVirtualHosting>false</enableVirtualHosting>
</usersrepository>
-->

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
This template file can be used as example for James Server configuration
DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-->
<!-- See http://james.apache.org/server/3/config.html for usage -->
<importjames23-usersrepository class="org.apache.james.user.file.UsersFileRepository">
<destination URL="file://var/users/" />
<ignoreCase>true</ignoreCase>
<enableAliases>true</enableAliases>
<enableForwarding>true</enableForwarding>
<enableVirtualHosting>false</enableVirtualHosting>
</importjames23-usersrepository>

View File

@ -0,0 +1,234 @@
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java
wrapper.working.dir=.
# Java Main class. This class must implement the WrapperListener interface
# or guarantee that the WrapperManager class is initialized. Helper
# classes are provided to do this for you. See the Integration section
# of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
set.default.REPO_DIR=../lib
set.default.APP_BASE=.
# Java Classpath (include wrapper.jar) Add class path elements as
# needed starting from 1
wrapper.java.classpath.1=%REPO_DIR%/wrapper.jar
wrapper.java.classpath.2=../conf
wrapper.java.classpath.3=%REPO_DIR%/apache-james-3.0-beta4.jar
wrapper.java.classpath.4=%REPO_DIR%/james-server-cli-3.0-beta4.jar
wrapper.java.classpath.5=%REPO_DIR%/commons-cli-1.2.jar
wrapper.java.classpath.6=%REPO_DIR%/james-server-core-3.0-beta4.jar
wrapper.java.classpath.7=%REPO_DIR%/apache-mailet-2.4.jar
wrapper.java.classpath.8=%REPO_DIR%/apache-mailet-base-1.1.jar
wrapper.java.classpath.9=%REPO_DIR%/commons-io-2.0.1.jar
wrapper.java.classpath.10=%REPO_DIR%/mail-1.4.4.jar
wrapper.java.classpath.11=%REPO_DIR%/james-server-data-api-3.0-beta4.jar
wrapper.java.classpath.12=%REPO_DIR%/james-server-dnsservice-library-3.0-beta4.jar
wrapper.java.classpath.13=%REPO_DIR%/james-server-filesystem-api-3.0-beta4.jar
wrapper.java.classpath.14=%REPO_DIR%/apache-jsieve-manager-api-0.5.jar
wrapper.java.classpath.15=%REPO_DIR%/james-server-lifecycle-api-3.0-beta4.jar
wrapper.java.classpath.16=%REPO_DIR%/commons-configuration-1.6.jar
wrapper.java.classpath.17=%REPO_DIR%/commons-lang-2.6.jar
wrapper.java.classpath.18=%REPO_DIR%/james-server-mailetcontainer-api-3.0-beta4.jar
wrapper.java.classpath.19=%REPO_DIR%/james-server-queue-api-3.0-beta4.jar
wrapper.java.classpath.20=%REPO_DIR%/james-server-container-spring-3.0-beta4.jar
wrapper.java.classpath.21=%REPO_DIR%/apache-james-mailbox-api-0.4.jar
wrapper.java.classpath.22=%REPO_DIR%/apache-james-mailbox-tool-0.4.jar
wrapper.java.classpath.23=%REPO_DIR%/geronimo-annotation_1.0_spec-1.1.1.jar
wrapper.java.classpath.24=%REPO_DIR%/protocols-api-1.6.2.jar
wrapper.java.classpath.25=%REPO_DIR%/spring-core-3.1.0.RELEASE.jar
wrapper.java.classpath.26=%REPO_DIR%/spring-asm-3.1.0.RELEASE.jar
wrapper.java.classpath.27=%REPO_DIR%/spring-beans-3.1.0.RELEASE.jar
wrapper.java.classpath.28=%REPO_DIR%/spring-context-3.1.0.RELEASE.jar
wrapper.java.classpath.29=%REPO_DIR%/spring-expression-3.1.0.RELEASE.jar
wrapper.java.classpath.30=%REPO_DIR%/spring-web-3.1.0.RELEASE.jar
wrapper.java.classpath.31=%REPO_DIR%/log4j-1.2.16.jar
wrapper.java.classpath.32=%REPO_DIR%/james-server-lifecycle-spring-3.0-beta4.jar
wrapper.java.classpath.33=%REPO_DIR%/geronimo-annotation_1.1_spec-1.0.1.jar
wrapper.java.classpath.34=%REPO_DIR%/geronimo-jpa_2.0_spec-1.0.jar
wrapper.java.classpath.35=%REPO_DIR%/slf4j-api-1.6.1.jar
wrapper.java.classpath.36=%REPO_DIR%/slf4j-log4j12-1.6.1.jar
wrapper.java.classpath.37=%REPO_DIR%/jcl-over-slf4j-1.6.1.jar
wrapper.java.classpath.38=%REPO_DIR%/commons-daemon-1.0.5.jar
wrapper.java.classpath.39=%REPO_DIR%/camel-core-2.5.0.jar
wrapper.java.classpath.40=%REPO_DIR%/commons-logging-api-1.1.jar
wrapper.java.classpath.41=%REPO_DIR%/commons-management-1.0.jar
wrapper.java.classpath.42=%REPO_DIR%/camel-spring-2.5.0.jar
wrapper.java.classpath.43=%REPO_DIR%/spring-aop-3.1.0.RELEASE.jar
wrapper.java.classpath.44=%REPO_DIR%/xbean-spring-3.6.jar
wrapper.java.classpath.45=%REPO_DIR%/commons-logging-1.0.3.jar
wrapper.java.classpath.46=%REPO_DIR%/spring-jms-3.1.0.RELEASE.jar
wrapper.java.classpath.47=%REPO_DIR%/aopalliance-1.0.jar
wrapper.java.classpath.48=%REPO_DIR%/spring-orm-3.1.0.RELEASE.jar
wrapper.java.classpath.49=%REPO_DIR%/spring-tx-3.1.0.RELEASE.jar
wrapper.java.classpath.50=%REPO_DIR%/spring-jdbc-3.1.0.RELEASE.jar
wrapper.java.classpath.51=%REPO_DIR%/james-server-mailetcontainer-camel-3.0-beta4.jar
wrapper.java.classpath.52=%REPO_DIR%/james-server-mailbox-adapter-3.0-beta4.jar
wrapper.java.classpath.53=%REPO_DIR%/apache-james-mailbox-store-0.4.jar
wrapper.java.classpath.54=%REPO_DIR%/apache-james-mailbox-maildir-0.4.jar
wrapper.java.classpath.55=%REPO_DIR%/james-server-dnsservice-api-3.0-beta4.jar
wrapper.java.classpath.56=%REPO_DIR%/james-server-dnsservice-dnsjava-3.0-beta4.jar
wrapper.java.classpath.57=%REPO_DIR%/dnsjava-2.1.1.jar
wrapper.java.classpath.58=%REPO_DIR%/james-server-protocols-library-3.0-beta4.jar
wrapper.java.classpath.59=%REPO_DIR%/protocols-netty-1.6.2.jar
wrapper.java.classpath.60=%REPO_DIR%/netty-3.3.1.Final.jar
wrapper.java.classpath.61=%REPO_DIR%/james-server-util-3.0-beta4.jar
wrapper.java.classpath.62=%REPO_DIR%/james-server-data-library-3.0-beta4.jar
wrapper.java.classpath.63=%REPO_DIR%/james-server-data-ldap-3.0-beta4.jar
wrapper.java.classpath.64=%REPO_DIR%/james-server-protocols-smtp-3.0-beta4.jar
wrapper.java.classpath.65=%REPO_DIR%/protocols-smtp-1.6.2.jar
wrapper.java.classpath.66=%REPO_DIR%/apache-jspf-resolver-1.0.0.jar
wrapper.java.classpath.67=%REPO_DIR%/james-server-protocols-imap4-3.0-beta4.jar
wrapper.java.classpath.68=%REPO_DIR%/apache-james-imap-api-0.3.jar
wrapper.java.classpath.69=%REPO_DIR%/jutf7-1.0.0.jar
wrapper.java.classpath.70=%REPO_DIR%/apache-james-imap-message-0.3.jar
wrapper.java.classpath.71=%REPO_DIR%/james-server-protocols-lmtp-3.0-beta4.jar
wrapper.java.classpath.72=%REPO_DIR%/protocols-lmtp-1.6.2.jar
wrapper.java.classpath.73=%REPO_DIR%/james-server-protocols-pop3-3.0-beta4.jar
wrapper.java.classpath.74=%REPO_DIR%/protocols-pop3-1.6.2.jar
wrapper.java.classpath.75=%REPO_DIR%/james-server-fetchmail-3.0-beta4.jar
wrapper.java.classpath.76=%REPO_DIR%/james-server-queue-file-3.0-beta4.jar
wrapper.java.classpath.77=%REPO_DIR%/james-server-queue-jms-3.0-beta4.jar
wrapper.java.classpath.78=%REPO_DIR%/geronimo-jms_1.1_spec-1.0.jar
wrapper.java.classpath.79=%REPO_DIR%/james-server-queue-activemq-3.0-beta4.jar
wrapper.java.classpath.80=%REPO_DIR%/activemq-core-5.4.2.jar
wrapper.java.classpath.81=%REPO_DIR%/activeio-core-3.1.2.jar
wrapper.java.classpath.82=%REPO_DIR%/kahadb-5.4.2.jar
wrapper.java.classpath.83=%REPO_DIR%/activemq-protobuf-1.1.jar
wrapper.java.classpath.84=%REPO_DIR%/geronimo-j2ee-management_1.1_spec-1.0.1.jar
wrapper.java.classpath.85=%REPO_DIR%/james-server-mailets-3.0-beta4.jar
wrapper.java.classpath.86=%REPO_DIR%/apache-jsieve-mailet-0.5.jar
wrapper.java.classpath.87=%REPO_DIR%/apache-jsieve-core-0.5.jar
wrapper.java.classpath.88=%REPO_DIR%/geronimo-javamail_1.4_mail-1.6.jar
wrapper.java.classpath.89=%REPO_DIR%/geronimo-activation_1.1_spec-1.0.2.jar
wrapper.java.classpath.90=%REPO_DIR%/apache-standard-mailets-1.1.jar
wrapper.java.classpath.91=%REPO_DIR%/commons-httpclient-3.0.1.jar
wrapper.java.classpath.92=%REPO_DIR%/commons-collections-3.2.1.jar
wrapper.java.classpath.93=%REPO_DIR%/derby-10.7.1.1.jar
wrapper.java.classpath.94=%REPO_DIR%/apache-james-mailbox-jpa-0.4.jar
wrapper.java.classpath.95=%REPO_DIR%/openjpa-2.1.0.jar
wrapper.java.classpath.96=%REPO_DIR%/serp-1.13.1.jar
wrapper.java.classpath.97=%REPO_DIR%/geronimo-jta_1.1_spec-1.1.1.jar
wrapper.java.classpath.98=%REPO_DIR%/commons-pool-1.5.5.jar
wrapper.java.classpath.99=%REPO_DIR%/jasypt-1.7.1.jar
wrapper.java.classpath.100=%REPO_DIR%/apache-james-mailbox-spring-0.4.jar
wrapper.java.classpath.101=%REPO_DIR%/apache-james-mailbox-hbase-0.4.jar
wrapper.java.classpath.102=%REPO_DIR%/commons-dbcp-1.4.jar
wrapper.java.classpath.103=%REPO_DIR%/jcr-2.0.jar
wrapper.java.classpath.104=%REPO_DIR%/apache-james-mailbox-lucene-0.4.jar
wrapper.java.classpath.105=%REPO_DIR%/apache-mime4j-core-0.7.2.jar
wrapper.java.classpath.106=%REPO_DIR%/apache-mime4j-dom-0.7.2.jar
wrapper.java.classpath.107=%REPO_DIR%/lucene-core-3.1.0.jar
wrapper.java.classpath.108=%REPO_DIR%/lucene-analyzers-3.1.0.jar
wrapper.java.classpath.109=%REPO_DIR%/lucene-smartcn-3.1.0.jar
wrapper.java.classpath.110=%REPO_DIR%/apache-james-mailbox-jcr-0.4.jar
wrapper.java.classpath.111=%REPO_DIR%/jackrabbit-jcr-commons-2.2.5.jar
wrapper.java.classpath.112=%REPO_DIR%/apache-james-mailbox-memory-0.4.jar
wrapper.java.classpath.113=%REPO_DIR%/james-server-data-file-3.0-beta4.jar
wrapper.java.classpath.114=%REPO_DIR%/james-server-data-jpa-3.0-beta4.jar
wrapper.java.classpath.115=%REPO_DIR%/commons-codec-1.5.jar
wrapper.java.classpath.116=%REPO_DIR%/james-server-data-jdbc-3.0-beta4.jar
wrapper.java.classpath.117=%REPO_DIR%/james-server-data-hbase-3.0-beta4.jar
wrapper.java.classpath.118=%REPO_DIR%/james-server-data-jcr-3.0-beta4.jar
wrapper.java.classpath.119=%REPO_DIR%/apache-james-imap-processor-0.3.jar
# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=lib
# Java Additional Parameters
#wrapper.java.additional.1=
wrapper.java.additional.14=-Djames.message.usememorycopy=false
wrapper.java.additional.13=-Dmail.mime.address.strict=false
wrapper.java.additional.12=-Dmail.mime.decodeparameters=true
wrapper.java.additional.11=-Dmail.mime.encodeparameters=true
wrapper.java.additional.10=-Dmail.mime.base64.ignoreerrors=true
wrapper.java.additional.9=-Dmail.mime.multipart.allowempty=true
wrapper.java.additional.8=-Dmail.mime.uudecode.ignoremissingbeginend=true
wrapper.java.additional.7=-Dmail.mime.uudecode.ignoreerrors=true
wrapper.java.additional.6=-Dmail.mime.ignoreunknownencoding=true
wrapper.java.additional.5=-Dmail.mime.multipart.ignoremissingboundaryparameter=true
wrapper.java.additional.4=-Dmail.mime.multipart.ignoremissingendboundary=true
wrapper.java.additional.3=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.2=-Dcom.sun.management.jmxremote=true
wrapper.java.additional.1=-XX:+HeapDumpOnOutOfMemoryError
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3
wrapper.java.initmemory=128
# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64
wrapper.java.maxmemory=512
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=org.apache.james.app.spring.JamesAppSpringMain
wrapper.app.parameter.2=start
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console. (See docs for formats)
wrapper.console.format=PM
# Log Level for console output. (See docs for log levels)
wrapper.console.loglevel=INFO
# Log file to use for wrapper output logging.
wrapper.logfile=log/wrapper.log
# Format of output for the log file. (See docs for formats)
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
wrapper.logfile.loglevel=INFO
# Maximum size that the log file will be allowed to grow to before
# the log is rolled. Size is specified in bytes. The default value
# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
# 'm' (mb) suffix. For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0
# Maximum number of rolled log files which will be allowed before old
# files are deleted. The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0
# Log Level for sys/event log output. (See docs for log levels)
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=Apache James Server App
#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
# using this configuration file has been installed as a service.
# Please uninstall the service before modifying this section. The
# service can then be reinstalled.
# Name of the service
wrapper.ntservice.name=james
# Display name of the service
wrapper.ntservice.displayname=Apache James Server App
# Description of the service
wrapper.ntservice.description=An advanced email server
# Service dependencies. Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed. AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START
# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
configuration.directory.in.classpath.first=../conf
wrapper.java.library.path=../lib

View File

@ -0,0 +1 @@
../../james/apache-james-mailbox-memory/target/apache-james-mailbox-memory-0.4.jar

Binary file not shown.

5
deploy/james/catalog Executable file
View File

@ -0,0 +1,5 @@
cd ~
mkdir -p deploy-catalog
V=`date "+%Y%m%d_%H%M%S"`
tar -czf deploy-catalog/deploy_$V.tar.gz deploy

View File

@ -0,0 +1 @@
../../../../keys/apns/ios-push-certificate-dev.p12

View File

@ -0,0 +1 @@
../../../../keys/apns/ios-push-certificate-prod.p12

View File

@ -0,0 +1 @@
../../../../passwords/mail

View File

@ -0,0 +1 @@
../../../../passwords/mail-pbe

View File

@ -0,0 +1 @@
../../../../passwords/mail_extra

View File

@ -0,0 +1 @@
../../../../passwords/push-certificate

9
deploy/james/run Executable file
View File

@ -0,0 +1,9 @@
./setup
cd ~/apache-james/bin/
echo -------------------------------------------------- >> ~/run.log
date >> ~/run.log
echo -------------------------------------------------- >> ~/run.log
nohup ./run.sh >> ~/run.log 2>&1 &

1
deploy/james/run-block Executable file
View File

@ -0,0 +1 @@
cd apache-james/bin/ && ./run.sh

6
deploy/james/setup Executable file
View File

@ -0,0 +1,6 @@
cd ~
ln -fs deploy/resources
ln -fs deploy/apache-james-conf
ln -fs deploy/apache-james-mailbox-memory.jar
ln -fs deploy/apache-james-server-mailets.jar

2
deploy/james/shutdown Executable file
View File

@ -0,0 +1,2 @@
killall -w -user james java

0
deploy/mail-key. Normal file
View File

5
deploy/mail-key/catalog Executable file
View File

@ -0,0 +1,5 @@
cd ~
mkdir -p deploy-catalog
V=`date "+%Y%m%d_%H%M%S"`
tar -czf deploy-catalog/deploy_$V.tar.gz deploy

View File

@ -0,0 +1 @@
../../../../keys/key/keystore.jks

View File

@ -0,0 +1 @@
../../../../passwords/mail

View File

@ -0,0 +1 @@
../../../../passwords/mail_extra

7
deploy/mail-key/run Executable file
View File

@ -0,0 +1,7 @@
./setup
echo "----------------------------------------------" >> ../run.log
date >> ../run.log
echo "----------------------------------------------" >> ../run.log
nohup java -jar KeyStreamServer.jar >> ../run.log 2>&1 &

3
deploy/mail-key/setup Executable file
View File

@ -0,0 +1,3 @@
cd ~
ln -fs deploy/resources

1
deploy/mail-key/shutdown Executable file
View File

@ -0,0 +1 @@
killall -user mail-key java

0
deploy/mail-user. Normal file
View File

5
deploy/mail-user/catalog Executable file
View File

@ -0,0 +1,5 @@
cd ~
mkdir -p deploy-catalog
V=`date "+%Y%m%d_%H%M%S"`
tar -czf deploy-catalog/deploy_$V.tar.gz deploy

View File

@ -0,0 +1 @@
../../../../keys/mail/keystore.jks

View File

@ -0,0 +1 @@
../../../../passwords/captcha

View File

@ -0,0 +1 @@
../../../../passwords/mail

View File

@ -0,0 +1 @@
../../../../passwords/mail-pbe

View File

@ -0,0 +1 @@
../../../../passwords/mail_extra

7
deploy/mail-user/run Executable file
View File

@ -0,0 +1,7 @@
./setup
echo ---------------------------------------- >> ../run.log
date >> ../run.log
echo ---------------------------------------- >> ../run.log
nohup java -jar MailStreamServer.jar >> ~/run.log 2>&1 &

3
deploy/mail-user/setup Executable file
View File

@ -0,0 +1,3 @@
cd ~
ln -fs deploy/resources

1
deploy/mail-user/shutdown Executable file
View File

@ -0,0 +1 @@
killall -user mail-user java

5
deploy/restart-all Executable file
View File

@ -0,0 +1,5 @@
./server-restart tomcat
./server-restart james
./server-restart mail-user
./server-restart mail-key

24
deploy/server-deploy Executable file
View File

@ -0,0 +1,24 @@
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
server="blue"
echo stopping...
ssh $1@$server "cd deploy && ./shutdown"
echo transfering
rsync -avzL --delete $1/ $1@$server:deploy
echo cataloging
ssh $1@$server "cd deploy && ./catalog"
echo starting...
ssh $1@$server "cd deploy && ./run"
echo tailing...
sleep 2
ssh $1@$server "tail run.log"
echo ...
echo "***** remember to restart mail-user if you restart-james *****"

20
deploy/server-restart Executable file
View File

@ -0,0 +1,20 @@
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
server="blue"
echo stopping...
ssh $1@$server "cd deploy && ./shutdown"
sleep 2
echo starting...
ssh $1@$server "cd deploy && ./run"
echo tailing...
sleep 2
ssh $1@$server "tail run.log"
echo ...
echo "***** remember to restart mail-user if you restart-james *****"

8
deploy/server-shutdown Executable file
View File

@ -0,0 +1,8 @@
if [ -z "$1" ]; then echo "Must supply name"; exit 0; fi
server="blue"
echo stopping...
ssh $1@$server "cd deploy && ./shutdown"

1
deploy/startWebServer Executable file
View File

@ -0,0 +1 @@
cd www && python -m SimpleHTTPServer 80

5
deploy/tomcat-restart Executable file
View File

@ -0,0 +1,5 @@
server="blue"
echo restarting...
ssh tomcat@$server "cd deploy && ./restart"

0
deploy/tomcat. Normal file
View File

5
deploy/tomcat/catalog Executable file
View File

@ -0,0 +1,5 @@
cd ~
mkdir -p deploy-catalog
V=`date "+%Y%m%d_%H%M%S"`
tar -czf deploy-catalog/deploy_$V.tar.gz deploy

View File

@ -0,0 +1 @@
../../../../keys/push/keystore.jks

View File

@ -0,0 +1 @@
../../../../keys/localrelay/keystore.jks

Some files were not shown because too many files have changed in this diff Show More