[ 
https://issues.apache.org/jira/browse/JAMES-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylvain Vieujot updated JAMES-1105:
-----------------------------------

    Attachment: spring-beans.xml

Gives the following output :

# ./james console
Running Apache James Server Container Spring...
wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    | 
jvm 1    | INFO  10:31:11,825 | 
org.apache.james.container.spring.JamesServerApplicationContext | Refreshing 
org.apache.james.container.spring.jamesserverapplicationcont...@7d95d4fe: 
startup date [Fri Dec 03 10:31:11 CET 2010]; root of context hierarchy
jvm 1    | log4j:WARN No appenders could be found for logger 
(org.apache.commons.configuration.ConfigurationUtils).
jvm 1    | log4j:WARN Please initialize the log4j system properly.
jvm 1    | INFO  10:31:15,322 | 
org.apache.james.container.spring.JamesServerApplicationContext | Bean 
'configurationProvider' of type [class 
org.apache.james.container.spring.lifecycle.SpringConfigurationProvider] is not 
eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)
jvm 1    | INFO  10:31:15,331 | 
org.apache.james.container.spring.JamesServerApplicationContext | Bean 
'logProvider' of type [class 
org.apache.james.container.spring.lifecycle.SpringLogProvider] is not eligible 
for getting processed by all BeanPostProcessors (for example: not eligible for 
auto-proxying)
jvm 1    | INFO  10:31:16,359 | james.domainlist | Set autodetect to: false
jvm 1    | INFO  10:31:16,360 | james.domainlist | Set autodetectIP to: true
jvm 1    | INFO  10:31:16,365 | james.domainlist | Bean  
org.apache.james.domainlist.xml.XMLDomainList started.
jvm 1    | INFO  10:31:16,368 | james.mailserver | JAMES init...
jvm 1    | INFO  10:31:16,421 | james.domainlist | Local host is: 
localhost.localdomain.
jvm 1    | INFO  10:31:16,424 | james.mailserver | VirtualHosting supported: 
false
jvm 1    | INFO  10:31:16,424 | james.mailserver | Defaultdomain: reit.ae
jvm 1    | Apache-James Mail Server 3.0-M1
jvm 1    | INFO  10:31:16,467 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.JamesWelcomeMessageHandler
jvm 1    | INFO  10:31:16,472 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler
jvm 1    | INFO  10:31:16,476 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.esmtp.AuthCmdHandler
jvm 1    | INFO  10:31:16,481 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.JamesDataCmdHandler
jvm 1    | INFO  10:31:16,485 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler
jvm 1    | INFO  10:31:16,487 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.ExpnCmdHandler
jvm 1    | INFO  10:31:16,491 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.HeloCmdHandler
jvm 1    | INFO  10:31:16,493 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.HelpCmdHandler
jvm 1    | INFO  10:31:16,498 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.JamesMailCmdHandler
jvm 1    | INFO  10:31:16,501 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.NoopCmdHandler
jvm 1    | INFO  10:31:16,504 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.QuitCmdHandler
jvm 1    | INFO  10:31:16,509 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.JamesRcptCmdHandler
jvm 1    | INFO  10:31:16,511 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.RsetCmdHandler
jvm 1    | INFO  10:31:16,514 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.VrfyCmdHandler
jvm 1    | INFO  10:31:16,516 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension
jvm 1    | 28  James  WARN   [WrapperSimpleAppMain] openjpa.Runtime - An error 
occurred while registering a ClassTransformer with PersistenceUnitInfo: name 
'James', root URL 
[file:/home/james/server/james-server-container-spring-3.0-M3-SNAPSHOT/conf/]. 
The error has been consumed. To see it, set your openjpa.Runtime log level to 
TRACE. Load-time class transformation will not be available.
jvm 1    | INFO  10:31:16,858 | james.usersrepository | Bean  LocalUsers 
started.
jvm 1    | INFO  10:31:16,859 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.UsersRepositoryAuthHook
jvm 1    | INFO  10:31:16,863 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.AuthRequiredToRelayRcptHook
jvm 1    | INFO  10:31:16,867 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.SenderAuthIdentifyVerificationRcptHook
jvm 1    | INFO  10:31:16,869 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.PostmasterAbuseRcptHook
jvm 1    | INFO  10:31:16,871 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.ReceivedDataLineFilter
jvm 1    | INFO  10:31:16,879 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.DataLineJamesMessageHookHandler
jvm 1    | INFO  10:31:16,881 | james.smtpserver | Added Handler: 
org.apache.james.protocols.smtp.core.esmtp.StartTlsCmdHandler
jvm 1    | INFO  10:31:16,883 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.AddDefaultAttributesMessageHook
jvm 1    | INFO  10:31:17,325 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.SendMailHandler
jvm 1    | INFO  10:31:17,344 | james.smtpserver | Added Handler: 
org.apache.james.smtpserver.fastfail.ValidRcptHandler
jvm 1    | INFO  10:31:17,350 | james.smtpserver | SMTP Service is running on: 
localhost.localdomain.
jvm 1    | INFO  10:31:17,350 | james.smtpserver | SMTP Service handler hello 
name is: null
jvm 1    | INFO  10:31:17,350 | james.smtpserver | SMTP Service handler 
connection timeout is: 360
jvm 1    | INFO  10:31:17,350 | james.smtpserver | SMTP Service connection 
backlog is: 200
jvm 1    | INFO  10:31:17,351 | james.smtpserver | This SMTP server requires 
authentication.
jvm 1    | INFO  10:31:17,353 | james.smtpserver | Authorized addresses: 
[127.0.0.0/255.0.0.0]
jvm 1    | INFO  10:31:17,353 | james.smtpserver | No maximum message size is 
enforced for this server.
jvm 1    | INFO  10:31:17,353 | james.smtpserver | The idle timeout will be 
reset every 20480 bytes.
jvm 1    | INFO  10:31:17,553 | james.smtpserver | Dispose SMTP Service
jvm 1    | 
jvm 1    | WrapperSimpleApp: Encountered an error running main: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'exporter' defined in class path resource [spring-beans.xml]: Cannot 
resolve reference to bean 'smtpserverssl' while setting bean property 'beans' 
with key [TypedStringValue: value 
[org.apache.james:type=server,name=smtpserverssl], target type [null]]; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'smtpserverssl': Invocation of init method failed; 
nested exception is java.lang.RuntimeException: Unable to register mbean
jvm 1    | org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'exporter' defined in class path resource 
[spring-beans.xml]: Cannot resolve reference to bean 'smtpserverssl' while 
setting bean property 'beans' with key [TypedStringValue: value 
[org.apache.james:type=server,name=smtpserverssl], target type [null]]; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'smtpserverssl': Invocation of init method failed; 
nested exception is java.lang.RuntimeException: Unable to register mbean
jvm 1    |      at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
jvm 1    |      at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
jvm 1    |      at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:378)
jvm 1    |      at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:161)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
jvm 1    |      at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
jvm 1    |      at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
jvm 1    |      at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
jvm 1    |      at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
jvm 1    |      at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
jvm 1    |      at 
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
jvm 1    |      at 
org.apache.james.container.spring.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:37)
jvm 1    |      at org.apache.james.container.spring.Main.main(Main.java:29)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    |      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
jvm 1    |      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:616)
jvm 1    |      at 
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1    |      at java.lang.Thread.run(Thread.java:636)
jvm 1    | Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'smtpserverssl': Invocation of init method 
failed; nested exception is java.lang.RuntimeException: Unable to register mbean
jvm 1    |      at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
jvm 1    |      at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
jvm 1    |      at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
jvm 1    |      at 
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
jvm 1    |      ... 24 more
jvm 1    | Caused by: java.lang.RuntimeException: Unable to register mbean
jvm 1    |      at 
org.apache.james.util.concurrent.JMXEnabledThreadPoolExecutor.registerMBean(JMXEnabledThreadPoolExecutor.java:76)
jvm 1    |      at 
org.apache.james.util.concurrent.JMXEnabledThreadPoolExecutor.<init>(JMXEnabledThreadPoolExecutor.java:50)
jvm 1    |      at 
org.apache.james.util.concurrent.JMXEnabledThreadPoolExecutor.newCachedThreadPool(JMXEnabledThreadPoolExecutor.java:165)
jvm 1    |      at 
org.apache.james.socket.netty.AbstractConfigurableAsyncServer.createBossExecutor(AbstractConfigurableAsyncServer.java:461)
jvm 1    |      at 
org.apache.james.protocols.impl.AbstractAsyncServer.start(AbstractAsyncServer.java:106)
jvm 1    |      at 
org.apache.james.socket.netty.AbstractConfigurableAsyncServer.init(AbstractConfigurableAsyncServer.java:260)
jvm 1    |      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1    |      at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
jvm 1    |      at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1    |      at java.lang.reflect.Method.invoke(Method.java:616)
jvm 1    |      at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:340)
jvm 1    |      at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:293)
jvm 1    |      at 
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:130)
jvm 1    |      ... 33 more
jvm 1    | Caused by: javax.management.InstanceAlreadyExistsException: 
org.apache.james:type=server,name=smtpserver,sub-type=threadpool,threadpool=boss
jvm 1    |      at 
com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:467)
jvm 1    |      at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1520)
jvm 1    |      at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:986)
jvm 1    |      at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
jvm 1    |      at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
jvm 1    |      at 
com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
jvm 1    |      at 
org.apache.james.util.concurrent.JMXEnabledThreadPoolExecutor.registerMBean(JMXEnabledThreadPoolExecutor.java:74)
jvm 1    |      ... 45 more
wrapper  | <-- Wrapper Stopped
[root]# 


> Support multiple port configurations per protocol
> -------------------------------------------------
>
>                 Key: JAMES-1105
>                 URL: https://issues.apache.org/jira/browse/JAMES-1105
>             Project: JAMES Server
>          Issue Type: Improvement
>          Components: IMAPServer, POP3Server, SMTPServer
>    Affects Versions: 3.0-M1
>            Reporter: Patrick Pyette
>         Attachments: spring-beans.xml
>
>
> A single instance of James should be able to accept connections on multiple 
> ports for each protocol.   As an example, I want to have the following SMTP 
> connections:
> port 25:  no authorization, no relaying
> port 465: STARTTLS, AUTH required, relaying allowed
> port 587:  SMTP/TLS, AUTH required, relaying allowed.
> I can set up the relaying decision with a mailet/matcher, but having multiple 
> port configurations per protocol allow me to deploy James as a primary 
> multi-domain mail server.
> The config files might look something like:
>     <!-- 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">
>       <!-- 
>             Port 25 is the well-known/IANA registered port for SMTP. 
>             Port 465 is the well-known/IANA registered port for SMTP over TLS.
>          -->
>       <endpoints>
>          <endpoint port="465">
>           <!-- Uncomment this if you want to bind this port 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 
> -->
>           <!--
>           <bind> </bind>
>           -->
>          <!-- 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">
>             <!-- To create a new keystore execute:
>             keytool -genkey -alias james -keyalg RSA -keystore 
> /path/to/james/conf/keystore
>             -->
>            <keystore>file://conf/keystore</keystore>
>            <secret>changeit</secret>
>            
> <provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
>          </tls>
>          <!--  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>announce</authRequired>
>          
>          <!--  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>
>          -->
>     </endpoint>
>     <endpoint port="587">
>       ...
>     </endpoint>
> </endpoints>   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to