[jboss-jira] [JBoss JIRA] Closed: (JBMAIL-242) NullPointerException on LocalDelivery

Andrew Oliver (JIRA) jira-events at jboss.com
Wed Dec 13 19:27:21 EST 2006


     [ http://jira.jboss.com/jira/browse/JBMAIL-242?page=all ]

Andrew Oliver closed JBMAIL-242.
--------------------------------

    Resolution: Won't Fix
      Assignee:     (was: Andrew Oliver)

> NullPointerException on LocalDelivery
> -------------------------------------
>
>                 Key: JBMAIL-242
>                 URL: http://jira.jboss.com/jira/browse/JBMAIL-242
>             Project: JBoss Mail ** Closed - moved to http://buni.org **
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Storage, Mail Server APIs, POP
>    Affects Versions: 1.0-M5
>         Environment: Windows XP SP2 JDK1.5
>            Reporter: Stefaan Nachtergaele
>
> I'm sending from user1 at mail.com to user2 at mail.com. The server is running at list.com. Both domains are local. DNS for both domains via hosts file set 127.0.0.1. I can ping both domains. Send from user1 to user2 works fine it would appear. When user2 tries to retrieve mail the error occurs.
> I have included 
> the log entry below.
> the jboss-service.xml
> 2006-07-08 11:05:48,875 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
> 2006-07-08 11:05:48,875 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
> 2006-07-08 11:05:48,875 INFO  [org.jboss.mail.maillistener.JMSMailListener] PUT MESSAGE ON QUEUE:org.jboss.mail.message.MailRetryWrapper at 1a27d4b
> 2006-07-08 11:06:25,843 DEBUG [org.jboss.mail.delivery.DeliveryMDB] Passing mail to delivery chain
> 2006-07-08 11:06:25,843 DEBUG [org.jboss.mail.mailhandler.localmailbox.LocalDelivery] Attempting local delivery to: <user2 at mail.com>
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4720023903612928
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join2006-07-08 11:06:25,843 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Transaction already joined
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.SQL] select mailbox0_.id as id14_0_, folder1_.id as id14_1_, mailbox0_.name as name14_0_, mailbox0_.parent_id as parent4_14_0_, mailbox0_.defaultInFolder_id as defaultI5_14_0_, mailbox0_.defaultOutFolder_id as defaultO6_14_0_, folder1_.name as name14_1_, folder1_.parent_id as parent4_14_1_, folder1_.defaultInFolder_id as defaultI5_14_1_, folder1_.defaultOutFolder_id as defaultO6_14_1_, folder1_.DTYPE as DTYPE14_1_ from Folder mailbox0_ inner join Folder folder1_ on mailbox0_.defaultInFolder_id=folder1_.id, Alias aliases2_ where mailbox0_.DTYPE='Mailbox' and mailbox0_.id=aliases2_.FOLDER_ID and aliases2_.name=?
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() user2 at mail.com -> alias [1]
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
> 2006-07-08 11:06:25,843 DEBUG [org.hibernate.engine.StatefulPersistenceContext] initializing non-lazy collections
> 2006-07-08 11:06:25,843 ERROR [org.jboss.mail.mailhandler.localmailbox.LocalDelivery] Could not deliver local mail
> java.lang.NullPointerException
> 	at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.org$jboss$mail$mailhandler$localmailbox$LocalDelivery$deliver$aop(LocalDelivery.java:117)
> 	at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.access$1(LocalDelivery.java)
> 	at org.jboss.mail.mailhandler.localmailbox.LocalDelivery$deliver_7597238674321613949.invokeNext(LocalDelivery$deliver_7597238674321613949.java)
> 	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
> 	at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
> 	at org.jboss.mail.mailhandler.localmailbox.LocalDelivery$deliver_7597238674321613949.invokeNext(LocalDelivery$deliver_7597238674321613949.java)
> 	at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.deliver(LocalDelivery.java)
> 	at org.jboss.mail.mailhandler.localmailbox.LocalDelivery.send(LocalDelivery.java:67)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
> 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
> 	at $Proxy96.send(Unknown Source)
> 	at org.jboss.mail.MailListenerChainService.processMail(MailListenerChainService.java:189)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
> 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> 	at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:201)
> 	at $Proxy119.processMail(Unknown Source)
> 	at org.jboss.mail.delivery.DeliveryMDB.onMessage(DeliveryMDB.java:108)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
> 	at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
> 	at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
> 	at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
> 	at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
> 	at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
> 	at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
> 	at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
> 	at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
> 	at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:208)
> 	at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
> 	at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
> 	at org.jboss.ejb.Container.invoke(Container.java:927)
> 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
> 	at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
> 	at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
> 	at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:902)
> 	at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
> 	at org.jboss.mq.SpySession.run(SpySession.java:323)
> 	at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
> 	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
> 	at java.lang.Thread.run(Thread.java:595)
> 2006-07-08 11:06:25,859 ERROR [org.jboss.mail.mailhandler.localmailbox.LocalDelivery] Unable to deliver message to local user: user2 at mail.com.  Unknown user.
> 2006-07-08 11:06:25,859 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
> 2006-07-08 11:06:25,859 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
> 2006-07-08 11:06:25,859 INFO  [org.jboss.mail.maillistener.JMSMailListener] PUT MESSAGE ON QUEUE:org.jboss.mail.message.MailRetryWrapper at 86f847
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE server
>     PUBLIC "-//JBoss//DTD MBean Service 4.0//EN"
>     "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
> <server>
> <!--
> JBoss Mail Server 1.0 milestone 5 configruation.
> Please see http://wiki.jboss.org/wiki/Wiki.jsp?page=JBMSInstallingM5 for more
> configuration details.
> -->
>    <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
>       name="jboss.mail:type=SecurityConfig,name=LoginConfig">
>       <attribute name="PolicyConfig" serialDataType="jbxb">
>          <jaas:policy
>             xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd"
>             xmlns:jaas="urn:jboss:security-config:4.1"
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>             >
>             <jaas:application-policy name="jbms">
>                <jaas:authentication>
>                   <jaas:login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
>                      flag="required">
>                          <jaas:module-option name="usersProperties">jbms-users.properties</jaas:module-option>
>                          <jaas:module-option name="rolesProperties">jbms-roles.properties</jaas:module-option>
>                          <jaas:module-option name="unauthenticatedIdentity">nobody</jaas:module-option>
>                   </jaas:login-module>
>                </jaas:authentication>
>             </jaas:application-policy>
>          </jaas:policy>         
>       </attribute>
>       <depends optional-attribute-name="LoginConfigService">
>          jboss.security:service=XMLLoginConfig
>       </depends>
>       <depends optional-attribute-name="SecurityManagerService">
>          jboss.security:service=JaasSecurityManager
>       </depends>
>    </mbean>
> <!--
>   <mbean code="org.jboss.mail.maillist.memory.MemoryMailListManager"
>          name="jboss.mail:type=MailServices,name=MailListManager">
>      <attribute name="MailingLists">
>          <mailingLists>  
>             <mailingList>
>                  <listAddress>testlist at localhost.localdomain</listAddress>
>                  <property><name>replyToList</name><value>true</value></property> 
>                  <property><name>subjectPrefix</name><value>Test List</value></property> 
>                  <property><name>prefixAutoBracketed</name><value>true</value></property> 
>                  <property><name>attachmentAllowed</name><value>false</value></property> 
>                  <property><name>membersOnly</name><value>true</value></property>
>                  <members>
>                     <member>test at localhost.localdomain</member>
>                     <member>acoliver at localhost.localdomain</member>
>                     <member>test at localhost.localdomain</member>
>                     <member>jboss at localhost.localdomain</member>
>                     <member>eric at localhost.localdomain</member>
>                     <member>mikea at localhost.localdomain</member>
>                     <member>mikek at localhost.localdomain</member>
>                     <member>kabir at localhost.localdomain</member>
>                  </members>
>             </mailingList>
>          </mailingLists>  
>      </attribute>
>   </mbean>
> -->
> <!--
>  Queue for messages meant for posting replies to nukes forums
> -->
> <!--
>   <mbean code="org.jboss.mq.server.jmx.Queue"
>          name="jboss.mq.destination:service=Queue,name=nukespost">
>     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
>   </mbean>
> -->
> <!--
>  Queue for messages meant for a mail list hosted by this server
> -->
> <!--  <mbean code="org.jboss.mq.server.jmx.Queue"
>          name="jboss.mq.destination:service=Queue,name=maillist">
>     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
>   </mbean>
> -->
> <!--
>  Queue for messages which will be delivered to users in a domain served by this
>  server. (local users with an account here)
> -->
>   <mbean code="org.jboss.mq.server.jmx.Queue"
>          name="jboss.mq.destination:service=Queue,name=onServer">
>     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
>   </mbean>
>   <mbean code="org.jboss.mq.server.jmx.Queue"
>          name="jboss.mq.destination:service=Queue,name=localMail">
>     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
>   </mbean>
>   
>   <mbean code="org.jboss.mq.server.jmx.Queue"
>          name="jboss.mq.destination:service=Queue,name=remoteMail">
>     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
>   </mbean>
>   
> <!--
>  Queue for messages which will be delivered to users in a domain not served by
> this server.
> -->
>   <mbean code="org.jboss.mq.server.jmx.Queue"
>          name="jboss.mq.destination:service=Queue,name=offServer">
>     <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
>   </mbean>
> <!--
>  Local domain group.  The server will try to deliver any message to any user
> with the exact string in the @ clause locally.  
> -->
>   <mbean code="org.jboss.mail.domaingroup.DomainGroup"
>     name="jboss.mail:type=MailServices,name=DomainGroup,group=Local">
>      <attribute name="Postmaster">postmaster at list.com</attribute>
>      <attribute name="Domains">
>         <domains includes-local-interfaces="true">
>           <domain>list.com</domain>
>           <domain>mail.com</domain>
>         </domains>
>      </attribute>
>   </mbean>
>   
> <!--
>  The SMTPSender MBean is used to send mails to remote hosts.  It also maintains
>  the DNS server list.
> -->
>   <mbean code="org.jboss.mail.smtp.sender.SMTPSender"
>     name="jboss.mail:type=MailServices,name=SMTPSender">
>      <!-- if no servers then uses the default DNS servers from the host's resolution path. -->
>   </mbean>
>    <!-- StaticUserRepository maintains the user account information as part of
>        this configuration.  You must specify the username and password below.
>        Each user will be accepted as a local mailbox for any domain in the
>        local domain group.  You should be using JAAS login modules instead (like
>        the database login module).  Using SUR requires a restart for each change.
>        -->
> <!--
>   <mbean code="org.jboss.mail.userrepository.StaticUserRepository"
>     name="jboss.mail:type=MailServices,name=UserRepository,uimanageable=true">
>      <attribute name="Users">
>         <users>
>           <user><id>admin at list.com</id><password>password</password></user>
>           <user><id>user1 at mail.com</id><password>password</password></user>
>           <user><id>user2 at mail.com</id><password>password</password></user>
>           <user><id>user3 at mail.com</id><password>password</password></user>
>         </users>
>      </attribute>
>   </mbean>
> -->
>    <!-- UserRepository implementation for JAAS
>    		Uncomment and comment StaticUserRepository above to enable
>    		A JAAS security domain must be configured in conf/login-config.xml
>    		Currently only authenticates a user, no roles are checked.
>                 TODO make a REAL xmbean...is presently standard
>   --> 		
>   <mbean code="org.jboss.mail.userrepository.jaas.JaasUserRepository"
>     name="jboss.mail:type=MailServices,name=UserRepository,uimanageable=true">
>     <depends>jboss.security:service=JaasSecurityManager</depends>
>     <depends>jboss.mail:type=SecurityConfig,name=LoginConfig</depends>
>         <attribute name="SecurityDomain">jbms</attribute>
>   </mbean>
>  
>    <!-- UserRepository implementation for JAAS
>    		Uncomment and comment StaticUserRepository above to enable
>    		A JAAS security domain must be configured in conf/login-config.xml
>    		Currently only authenticates a user, no roles are checked
>    		
>   <mbean code="org.jboss.mail.userrepository.jaas.JaasUserRepository"
>     name="jboss.mail:type=MailServices,name=UserRepository,uimanageable=true,apop=true">
>     <depends>jboss.security:service=JaasSecurityManager</depends>
>         <attribute name="SecurityDomain">jboss-mail-apop</attribute>
>   </mbean -->
>  
>  
> 	<!-- 
> 		Hibernate based store that uses a Paging mechanism 
> 		to achieve partial I/O across a range of databases
> 	-->
> 	<mbean code="org.jboss.mail.store.paged.PagedStore"
> 		name="jboss.mail:type=MailServices,name=PagedStore">
> 		<attribute name="PageSize">65536</attribute>
> 		<attribute name="Compress">true</attribute>
> 		<attribute name="CompressBufferSize">65536</attribute>
> 		<attribute name="StartIndex">0</attribute>
> 		<attribute name="Hashed">false</attribute>
> 		<!--depends>jboss.mail:service=Hibernate</depends-->
> 	</mbean>
> 	
> 	
>   
>   	<!-- Mail Body Manager -->
>   	<mbean code="org.jboss.mail.message.MailBodyManager"
>   		name="jboss.mail:type=MailServices,name=MailBodyManager">
>   		<attribute name="UseStore">true</attribute>
>   		<depends optional-attribute-name="Store" 
>   			proxy-type="attribute">jboss.mail:type=MailServices,name=PagedStore</depends>
>   	</mbean>
>   
>   <mbean code="org.jboss.mail.mailbox.MailboxServiceImpl"
>          name="jboss.mail:type=MailServices,name=MailboxManager" xmbean-dd="META-INF/Mailbox-xmbean.xml">
>       <depends optional-attribute-name="BodyManager"
>                proxy-type="attribute">jboss.mail:type=MailServices,name=MailBodyManager</depends>
>   </mbean>
>   <!--
>    JMS is used to asynchronously process mails, however the bodies are not stored via JMS as JBossMQ, the present
>    JBosss messaging solution, doesn't do this efficiently.  This instance is to support nukes mail list integration.
>    -->	
> <!--
>   <mbean code="org.jboss.mail.maillistener.NukesPosterJMSMailListener"
>     name="jboss.mail:type=MailServices,name=NukesPosterJMSListener">
>     <constructor>
>         <arg type="java.lang.String" value="java:/ConnectionFactory"/>
>         <arg type="java.lang.String" value="java:/ConnectionFactory"/>
>     </constructor>
>     <attribute name="NukesForumPoster">nukes.modules:name=NukesForumMailPoster</attribute>
>      <attribute name="DestinationType">queue</attribute>
>      <attribute name="Destination">nukespost</attribute>
>     <depends optional-attribute-name="DomainGroup">jboss.mail:type=MailServices,name=DomainGroup,group=Local</depends>
>     <depends>jboss.mq:service=DestinationManager</depends>
>     <depends>jboss.mq.destination:name=maillist,service=Queue</depends>
>   </mbean> -->
>   <!--
>    This JMS mail listener is used to pass things to the mail list processing plugins (MDBs). 
>    -->
> <!--
>   <mbean code="org.jboss.mail.maillistener.MailListJMSMailListener"
>     name="jboss.mail:type=MailServices,name=MailListJMSListener">
>     <constructor>
>         <arg type="java.lang.String" value="java:/ConnectionFactory"/>
>         <arg type="java.lang.String" value="java:/ConnectionFactory"/>
>     </constructor>
>     <attribute name="DestinationType">queue</attribute>
>     <attribute name="Destination">maillist</attribute>
>     <depends>jboss.mq:service=DestinationManager</depends>
>     <depends>jboss.mq.destination:name=maillist,service=Queue</depends>
>     <depends optional-attribute-name="MailListManager">jboss.mail:type=MailServices,name=MailListManager</depends>
>   </mbean> 
> -->
>   <!--
>    JMS is used to asynchronously process mails, however the bodies are not stored via JMS as JBossMQ, the present
>    JBosss messaging solution, doesn't do this efficiently.  This is used for normal mail processing.
>    -->	
>   <mbean code="org.jboss.mail.maillistener.JMSMailListener"
>     name="jboss.mail:type=MailServices,name=MailListener">
>     <constructor>
>         <arg type="java.lang.String" value="java:/ConnectionFactory"/>
>         <arg type="java.lang.String" value="java:/ConnectionFactory"/>
>     </constructor>
>     <depends>jboss.mq:service=DestinationManager</depends>
>     <!-- <depends>jboss.management.local:j2eeType=JCAManagedConnectionFactory,name=JmsXA</depends>-->
>     <depends>jboss.mq.destination:name=localMail,service=Queue</depends>
>     <depends>jboss.mq.destination:name=remoteMail,service=Queue</depends>
>     <depends optional-attribute-name="DomainGroup">jboss.mail:type=MailServices,name=DomainGroup,group=Local</depends>
>      <!-- queue or topic -->
>      <attribute name="DestinationType">queue</attribute>
>      <!-- posts which are OnServer meaning they are for our domain and presumably a "local" user
>           and won't go through an additional SMTP server should be sent here -->
>      <attribute name="OnServerPostDestination">localMail</attribute>
>      <!-- posts which are OffServer meaning they will go through an additional SMTP server before
>           finally being received should go here -->
>      <attribute name="OffServerPostDestination">remoteMail</attribute>
>      <!-- Specifies the retry policy for failed local mail recipients. You can add as many retryTime
>           elements as you like. Each retryTime element specifies the time in seconds to wait before 
>           redelivery, and they are processed from the top. Once you run out of retry entries a bounce 
>           message is generated for the sender. In the configuration shown below, if a message fails
>              it will retry after a minute, if the retry fails
>              it will retry again after a further two minutes, if the retry fails
>              it will retry after after a further ten minutes, if the retry fails
>              it will retry after after a further hour, if the retry fails
>              it will retry after after a further hour, if the retry fails
>              it will generate a bounce message
>       -->                     
>      <attribute name="LocalRetryTimes">
>         <localRetryTimes>
>            <retryTime>60</retryTime>
>            <retryTime>120</retryTime>
>            <retryTime>600</retryTime>
>            <retryTime>3600</retryTime>
>            <retryTime>3600</retryTime>
>         </localRetryTimes>
>      </attribute>
>      <!-- Specifies the retry policy for failed remote mail recipients. You can add as many retryTime
>           elements as you like. Each retryTime element specifies the time in seconds to wait before 
>           redelivery, and they are processed from the top. Once you run out of retry entries a bounce 
>           message is generated for the sender. In the configuration shown below, if a message fails
>              it will retry after a minute, if the retry fails
>              it will retry again after a further two minutes, if the retry fails
>              it will retry after after a further ten minutes, if the retry fails
>              it will retry after after a further hour, if the retry fails
>              it will retry after after a further hour, if the retry fails
>              it will generate a bounce message
>      -->                     
>      <attribute name="RemoteRetryTimes">
>         <remoteRetryTimes>
>            <retryTime>60</retryTime>
>            <retryTime>120</retryTime>
>            <retryTime>600</retryTime>
>            <retryTime>3600</retryTime>
>            <retryTime>3600</retryTime>
>         </remoteRetryTimes>
>       </attribute>
>   </mbean> 
>   
>   <mbean code="org.jboss.mail.MailListenerChainService"
>        name="jboss.mail:type=MailServices,name=MailListenerChain" xmbean-dd="META-INF/chain-xmbean.xml">
>        <depends>jboss.mail:type=MailServices,name=MailListener</depends>
>        <attribute name="Listeners">
>             <listeners>
>                  <!-- Uncomment to allow replies to go to Nukes
>                      <value>jboss.mail:type=MailServices,name=NukesPosterJMSListener</value>
>                  -->
>                  <listener>jboss.mail:type=MailServices,name=MailListener</listener>
>             </listeners>
>        </attribute>          
>   </mbean>
>   <!--
>   	Mail Listener responsible for delivering mails to local mailboxes.
>   -->
>   <mbean code="org.jboss.mail.mailhandler.localmailbox.LocalDelivery"
> 	name="jboss.mail:type=MailServices,name=LocalDelivery">
>  	<depends optional-attribute-name="MailboxManager"
>  	  proxy-type="attribute">jboss.mail:type=MailServices,name=MailboxManager</depends>
>  	<depends optional-attribute-name="Router"
>  	  proxy-type="org.jboss.mail.MailListener">jboss.mail:type=MailServices,name=MailListener</depends>
>   </mbean>
>   
>   <!--
>   	Mail Listener chain for mails to be delivered locally.
>   	Any listeners that are specific to locally delivered mail should be
>   	added here.  E.g. SPAM filtering.
>   -->
>   <mbean code="org.jboss.mail.MailListenerChainService"
>     name="jboss.mail:type=MailServices,name=LocalDeliveryChain" xmbean-dd="META-INF/chain-xmbean.xml">
>     <depends>jboss.mail:type=MailServices,name=LocalDelivery</depends>
>     <attribute name="Listeners">
>       <listeners>
>         <listener>jboss.mail:type=MailServices,name=LocalDelivery</listener>
>       </listeners>
>     </attribute>          
>   </mbean>
>   <!--
>   	Mail Listener responsible for delivering mails to remote addresses.
>   -->
>   <mbean code="org.jboss.mail.mailhandler.remote.RemoteDelivery"
> 	name="jboss.mail:type=MailServices,name=RemoteDelivery">
>  	<depends optional-attribute-name="Router"
>  	  proxy-type="org.jboss.mail.MailListener">jboss.mail:type=MailServices,name=MailListener</depends>
>     <depends optional-attribute-name="DomainGroup"
>       proxy-type="attribute">jboss.mail:type=MailServices,name=DomainGroup,group=Local</depends>
>  	<depends optional-attribute-name="Sender"
>  	  proxy-type="attribute">jboss.mail:type=MailServices,name=SMTPSender</depends>
>   </mbean>
>   
>   <!--
>   	Mail Listener chain for mails to be delivered remotely.
>   -->
>   <mbean code="org.jboss.mail.MailListenerChainService"
>     name="jboss.mail:type=MailServices,name=RemoteDeliveryChain" xmbean-dd="META-INF/chain-xmbean.xml">
>     <depends>jboss.mail:type=MailServices,name=RemoteDelivery</depends>
>     <attribute name="Listeners">
>       <listeners>
>         <listener>jboss.mail:type=MailServices,name=RemoteDelivery</listener>
>       </listeners>
>     </attribute>
>   </mbean>
>   <!--
>     SMTPProtocol is used for a "Server" instance.  This is an unencrypted 
>     protocol 
>   -->
>   <mbean code="org.jboss.mail.smtp.SMTPProtocol"
>     name="jboss.mail:type=Protocol,name=SMTPProtocol">
>     
>     <depends optional-attribute-name="DomainGroup"
>     		 proxy-type="attribute">jboss.mail:type=MailServices,name=DomainGroup,group=Local</depends>
>     <depends optional-attribute-name="MailBodyManager" 
>     	     proxy-type="attribute">jboss.mail:type=MailServices,name=MailBodyManager</depends>
>     <depends optional-attribute-name="ListenerChain" 
>              proxy-type="org.jboss.mail.MailListenerChain">jboss.mail:type=MailServices,name=MailListenerChain</depends>
>   	<depends optional-attribute-name="UserRepository"
>   			 proxy-type="attribute">jboss.mail:type=MailServices,name=UserRepository,uimanageable=true</depends>
>   			 
>  <!--register the protocols you want to use -->
>     <attribute name="Servername">list.com</attribute>	
>     <!-- 
>       auth-required - optional, default = true:  Determines whether we require the
>       user to login to the SMTP server in order to send the mail.  By default we
>       do require it.  I'd rather folks say that JBMail doesn't work at all than
>       say its an open relay....if YOU misconfigure it you CAN make it an open
>       relay....Its going to warn you in big bold fat letters.  This is only 
>       required to send mail to some SMTP server outside of your domain 
>     -->
>     <attribute name="AuthRequired">false</attribute>
>     <!--
>       JBMail can not be configured as an open relay, you must specify a list of domains
>       to allow relaying to.
>     -->
>     <attribute name="RelayByDomain">false</attribute>
>     <!--
>       auth-allowed means that users are allowed to login.  This is othogonal to AuthRequired.
>       Where AuthRequired means "auth required in order to send mail", AuthAllowed means 
>       "is anyone able to log in at all?"  A completely open relay (spam machine) would not 
>       require authenticaiton and might not even allow it (so it can't be tracked or whatever).  
>       One reason to FORBID authentication is if you want users to only authenticate over SSL but 
>       want a seperate instance of SMTP (on the same box even) to receive mails from the outside for
>       local users.
>     -->
>     <attribute name="AuthAllowed">true</attribute>
>     <!-- 
>       auth methods allowed.  DO NOT CHANGE THIS (unless you really know what 
>       you are doing and have a very good reason to)
>     -->
>     <attribute name="AuthMethods">AUTH LOGIN PLAIN</attribute>
>   		
>     <!-- verify the identity -->
>     <attribute name="VerifyIdentity">false</attribute>
>     <attribute name="MaxMessageSize">10000000</attribute>
>     <!-- block size for messages (should be about your average message size)   -->
>     <attribute name="BlockSize">4096</attribute>
>     <!-- rfc 2487 related properties -->
>     <attribute name="RequireTls">false</attribute>
>     <attribute name="RequireTlsForAuth">false</attribute>
>     <attribute name="RequireClientCert">false</attribute> 
>     <!-- change to true for TLS support -->
>     <attribute name="TlsEnabled">false</attribute>                  
>     <attribute name="Postmaster">postmaster at list.com</attribute>  
>     <!-- 
>       The maximum number of received headers allowed (to avoid looping). 
>       If greater than this the message is not accepted. Default is 100 if not present
>     -->
>     <attribute name="MaxReceivedHdrs">100</attribute>  
>     <!-- 
>       The number of received headers before we start inspecting them looking
>       for our server to see if more than maxOwnReceivedHdrs are present
>       Default is 20 if not present 
>     -->
>     <attribute name="ReceivedHdrsThreshold">20</attribute>  
>     <!--
>       The number of received headers for our server allowed.
>       Default is 5 if not present
>     -->
>     <attribute name="MaxOwnReceivedHdrs">5</attribute>
>   </mbean> 
>   <mbean code="org.jboss.mail.ThreadPool"
>          name="jboss.mail:type=ThreadPool,name=ThreadPoolSMTP">
>          <attribute name="Initial">5</attribute>
>          <attribute name="Min">5</attribute>
>          <attribute name="Max">10</attribute>
>          <attribute name="IdleKeepAlive">120000</attribute>
>   </mbean>
>   <!-- defines an SMTP server.  -->
>   <mbean code="org.jboss.mail.Server"
>     name="jboss.mail:type=Service,name=SMTP">
>     <depends optional-attribute-name="Protocol">jboss.mail:type=Protocol,name=SMTPProtocol</depends>
>     <depends optional-attribute-name="ThreadPool"
>              proxy-type="attribute">jboss.mail:type=ThreadPool,name=ThreadPoolSMTP</depends>
>       <!-- protocol should reference SMTP -->
>      <!-- port to listen on -->
>      <attribute name="Port">26</attribute>
>      <!-- which addresses to listen on 0.0.0.0 = all or localhost means only the localhost  -->
>      <attribute name="Address">0.0.0.0</attribute>
>      <!-- timeout between commands (not presently supported) -->
>      <!-- note from mikea: rfc 821 sets strict guidelines on allowable timeouts -->
>      <attribute name="Timeout">30000</attribute>
>      <!-- timeout for the connection regardless of whether it is finished.  Thus it will kill the
>           socket and thread mid-stream/operation.  This should be big enough to allow whatever the
>           messages you're sending while defending against folks who might try to DoS your server 
>           by keeping a large number of connections alive -->
>      <!-- note from mikea: 10 mb in 120 seconds is about 100 kb/s - which may or may not be 
>           the actual bandwidth achieved depending on server. therefore, i believe this value should 
> 	  be set somewhat higher to avoid timing out on 10mb emails, 
> 	  and other methods be used to detect DoS's -->
>      <attribute name="Life">120000</attribute>
>   </mbean> 
>   <mbean code="org.jboss.mail.ThreadPool"
>          name="jboss.mail:type=ThreadPool,name=ThreadPoolPOP">
>          <attribute name="Initial">5</attribute>
>          <attribute name="Min">5</attribute>
>          <attribute name="Max">10</attribute>
>          <attribute name="IdleKeepAlive">120000</attribute>
>   </mbean>
>   <mbean code="org.jboss.mail.pop3.POP3Protocol"
>     name="jboss.mail:type=Protocol,name=POP3Protocol">
>     <depends>jboss.mail:type=MailServices,name=MailListener</depends>
>     <depends optional-attribute-name="MailboxManager" 
>     	proxy-type="attribute">jboss.mail:type=MailServices,name=MailboxManager</depends>
>    	<depends optional-attribute-name="UserRepository"
>    			 proxy-type="attribute">jboss.mail:type=MailServices,name=UserRepository,uimanageable=true</depends>
>    	<!--depends optional-attribute-name="APOPUserRepository"
>    			 proxy-type="attribute">jboss.mail:type=MailServices,name=UserRepository,uimanageable=true,apop=true</depends-->
>  	<!--register the protocols you want to use -->
>   	<attribute name="Servername">list.com</attribute>
>   	<attribute name="TlsEnabled">false</attribute>       
>         <attribute name="RequireTls">false</attribute>
>         <!-- enable for forcing clients to use their own certificats -->
>   	<attribute name="RequireClientCert">false</attribute> 
>   </mbean>
>   
>   <!-- defines a POP server. -->
>   <mbean code="org.jboss.mail.Server"
>     name="jboss.mail:type=Service,name=POP3">
>     <depends>jboss.mail:type=Protocol,name=POP3Protocol</depends>
>     <depends optional-attribute-name="ThreadPool"
>              proxy-type="attribute">jboss.mail:type=ThreadPool,name=ThreadPoolPOP</depends>
>      <!-- options are presently POP or SMTP, we want POP -->
>      <attribute name="Protocol">jboss.mail:type=Protocol,name=POP3Protocol</attribute>
>      <!-- port to listen on -->
>      <attribute name="Port">110</attribute>
>      <!-- which addresses to listen on 0.0.0.0 = all or localhost means only the localhost  -->
>      <attribute name="Address">0.0.0.0</attribute>
>      <!-- timeout between commands (not presently supported) -->
>      <attribute name="Timeout">30000</attribute>
>      <!-- timeout for the connection regardless of whether it is finished.  Thus it will kill the
>           socket and thread mid-stream/operation.  This should be big enough to allow whatever the
>           messages you're sending while defending against folks who might try to DoS your server 
>           by keeping a large number of connections alive -->
>      <attribute name="Life">120000</attribute>
>      <attribute name="UsesSSL">false</attribute>
>   </mbean>
> <!-- fetchmail example see http://wiki.jboss.org/wiki/Wiki.jsp?page=HowToConfigurePOPFetchmailForJBossMailServer1.0M4 for details
>    <mbean code="org.jboss.mail.fetchmail.Popper"
>         name="jboss.mail:type=Fetchmail,name=Popper,instance=example">       must be unique 
>         <attribute name="Servername">foo.nowhere.com</attribute>
>         <attribute name="PopPort">110</attribute>
>         <attribute name="PopUser">remoteuser</attribute>
>         <attribute name="Password">mypassword</attribute>
>         <attribute name="LocalUser">andy at localhost</attribute>
>         <attribute name="DeleteAfterPop">false</attribute>
>         <depends optional-attribute-name="SMTPProtocol"
>                  proxy-type="org.jboss.mail.smtp.SMTPProtocolMBean">jboss.mail:type=Protocol,name=SMTPProtocol</depends>
>         </mbean>
> <mbean code="org.jboss.varia.scheduler.Scheduler"
>          name="jboss.mail:service=Scheduler,name=Popper,instance=example">     unique 
>     <attribute name="StartAtStartup">true</attribute>
> this needs to match your Popper instance's mbean name
>     <attribute name="SchedulableMBean">jboss.mail:type=Fetchmail,name=Popper,instance=example</attribute>
>     <attribute name="SchedulableMBeanMethod">pop()</attribute>
>     <attribute name="InitialStartDate">NOW</attribute>
>     <attribute name="SchedulePeriod">10000</attribute>
>     <attribute name="InitialRepetitions">-1</attribute>
>   </mbean>
> -->
> <!-- if(IMAP_ENABLED.equals(true))
>   <mbean code="org.jboss.mail.imap4.IMAP4Protocol"
>     name="jboss.mail:type=Protocol,name=IMAP4Protocol">
>     <depends>jboss.mail:type=MailServices,name=MailListener</depends>
>     <depends optional-attribute-name="MailboxManager" 
>     	proxy-type="attribute">jboss.mail:type=MailServices,name=MailboxManager</depends>
>    	<depends optional-attribute-name="UserRepository"
>    			 proxy-type="attribute">jboss.mail:type=MailServices,name=UserRepository,uimanageable=true</depends>
>   	<attribute name="Servername">list.com</attribute>
>   </mbean>
> -->
> <!--if(IMAP_ENABLED.equals(true))
>   <mbean code="org.jboss.mail.Server"
>     name="jboss.mail:type=Service,name=IMAP">
>     <depends>jboss.mail:type=Protocol,name=IMAP4Protocol</depends>
>     <depends optional-attribute-name="ThreadPool"
>              proxy-type="attribute">jboss.mail:type=ThreadPool,name=ThreadPoolSMTP</depends>
>      <attribute name="Protocol">jboss.mail:type=Protocol,name=IMAP4Protocol</attribute>
>      <attribute name="Port">${IMAP_PORT}</attribute>
>      <attribute name="Address">0.0.0.0</attribute>
>      <attribute name="Timeout">30000</attribute>
>      <attribute name="Life">120000</attribute>
>   </mbean> 
> -->
>   <mbean code="org.jboss.mail.userapi.MailSenderImpl"
>          name="jboss.mail:type=MailServices,name=MailSender" xmbean-dd="META-INF/MailSender-xmbean.xml">
>       <depends optional-attribute-name="ListenerChain"
>                proxy-type="attribute">jboss.mail:type=MailServices,name=MailListenerChain</depends>
>       <depends optional-attribute-name="BodyManager"
>                proxy-type="attribute">jboss.mail:type=MailServices,name=MailBodyManager</depends>
>       <depends optional-attribute-name="MailboxManager"
>                proxy-type="attribute">jboss.mail:type=MailServices,name=MailboxManager</depends>
>   </mbean>
> <!-- REQUIRES JB404GA NOT YET IN USE
>   <mbean code="org.jboss.mail.management.DumDOMImpl" interface="org.jboss.mail.management.DumDOM" name="jboss.mail:type=MailServices,name=DumDOM">
>          <attribute name="DeploymentURL">/home/andy/jboss-4.0.4.CR2-test/server/default/deploy/mail.ear</attribute>
>          <attribute name="ConfigFile">/home/andy/jboss-4.0.4.CR2-test/server/default/deploy/mail.ear/mail.sar/META-INF/jboss-service.xml</attribute>
>   </mbean>
>   <mbean code="org.jboss.mail.management.AdminToolImpl" interface="org.jboss.mail.management.AdminTool"
>          name="jboss.mail:type=MailServices,name=AdminTool">
>          <depends optional-attribute-name="DumDOM" proxy-type="attribute">jboss.mail:type=MailServices,name=DumDOM</depends>
>   </mbean>
> -->
> <!--
>   <mbean code="org.jboss.mail.management.DumDOMImpl"
>          name="jboss.mail:type=MailServices,name=DumDOM" xmbean-dd="META-INF/DumDOM-xmbean.xml">
>          <attribute name="DeploymentURL">/home/andy/jboss-4.0.4.CR2-test/server/default/deploy/mail.ear</attribute>
>          <attribute name="ConfigFile">/home/andy/jboss-4.0.4.CR2-test/server/default/deploy/mail.ear/mail.sar/META-INF/jboss-service.xml</attribute>
>   </mbean>
> -->
> </server>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list