linux - 连接被拒绝 : how to configure apache james for localhost

标签 linux apache email telnet james

我不清楚如何配置 Apache James。 quick start guide 说:

Step 4: Configure
#################

  * All configuration files are embedded in jars.
  * We ship in the conf foler template configuration files.
  * You can override the default configuration : 
      Copy the conf folder any ...-template... you need and update according to your needs.

配置文件嵌入到 jar 中是什么意思?我应该解压所有这些 jar 来配置文件吗?

目录结构:

thufir@dur:~/apache-james-3.0-beta4$ 
thufir@dur:~/apache-james-3.0-beta4$ tree -L 1
.
├── bin
├── conf
├── lib
├── LICENSE
├── log
├── NOTICE
├── README.crypto
├── README.txt
└── var

5 directories, 4 files
thufir@dur:~/apache-james-3.0-beta4$ 
thufir@dur:~/apache-james-3.0-beta4$ ll conf/
total 272
drwxr-xr-x 4 thufir thufir  4096 Aug 14 06:26 ./
drwxrwxr-x 7 thufir thufir  4096 Aug 14 06:26 ../
-rw------- 1 thufir thufir  2939 Mar 21 03:33 dnsservice-template.conf
-rw------- 1 thufir thufir  2903 Mar 21 03:33 domainlist-template.conf
-rw------- 1 thufir thufir 18715 Mar 21 03:33 fetchmail-template.conf
-rw------- 1 thufir thufir  1197 Mar 21 03:33 hbase-site-template.xml
-rw------- 1 thufir thufir  3466 Mar 21 03:33 imapserver-template.conf
-rw------- 1 thufir thufir  1645 Mar 21 03:33 james-database-template.properties
-rw------- 1 thufir thufir  3510 Mar 21 03:33 jcr-repository-template.xml
-rw------- 1 thufir thufir  1158 Mar 21 03:33 jmx-template.properties
drwxr-xr-x 2 thufir thufir  4096 Aug 14 06:26 lib/
-rw------- 1 thufir thufir  3325 Mar 21 03:33 lmtpserver-template.conf
-rw------- 1 thufir thufir  6944 Mar 21 03:33 log4j.properties
-rw------- 1 thufir thufir  7073 Mar 21 03:33 log4j-template.properties
-rw------- 1 thufir thufir  2885 Mar 21 03:33 mailbox-jcr-template.cnd
-rw------- 1 thufir thufir  1043 Mar 21 03:33 mailbox-maildir-template.properties
-rw------- 1 thufir thufir  1492 Mar 21 03:33 mailbox-template.conf
-rw------- 1 thufir thufir 30474 Mar 21 03:33 mailetcontainer-template.conf
-rw------- 1 thufir thufir  4172 Mar 21 03:33 mailrepositorystore-template.conf
drwxr-xr-x 3 thufir thufir  4096 Aug 14 06:26 META-INF/
-rw------- 1 thufir thufir  3528 Mar 21 03:33 pop3server-template.conf
-rw------- 1 thufir thufir  2497 Mar 21 03:33 recipientrewritetable-template.conf
-rw------- 1 thufir thufir 16011 Mar 21 03:33 smtpserver-template.conf
-rw------- 1 thufir thufir 43220 Mar 21 03:33 sqlResources-template.xml
-rw------- 1 thufir thufir 43220 Mar 21 03:33 sqlResources.xml
-rw------- 1 thufir thufir  1606 Mar 21 03:33 usersrepository23-template.conf
-rw------- 1 thufir thufir  3715 Mar 21 03:33 usersrepository-template.conf
-rw------- 1 thufir thufir 12596 Mar 21 03:33 wrapper.conf
thufir@dur:~/apache-james-3.0-beta4$ 

虽然我确实看到了配置文件,但哪个配置文件可以让我远程登录到 James?

尝试连接:

thufir@dur:~/apache-james-3.0-beta4$ 
thufir@dur:~/apache-james-3.0-beta4$ bin/james console
Running Apache James Server App...
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    | log4j:ERROR setFile(null,true) call failed.
jvm 1    | java.io.FileNotFoundException: ../log/james-server.log (Permission denied)
jvm 1    |  at java.io.FileOutputStream.openAppend(Native Method)
jvm 1    |  at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
jvm 1    |  at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
jvm 1    |  at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
jvm 1    |  at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
jvm 1    |  at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
jvm 1    |  at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
jvm 1    |  at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
jvm 1    |  at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
jvm 1    |  at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
jvm 1    |  at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
jvm 1    |  at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:639)
jvm 1    |  at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:504)
jvm 1    |  at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
jvm 1    |  at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
jvm 1    |  at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
jvm 1    |  at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
jvm 1    |  at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
jvm 1    |  at org.apache.james.app.spring.JamesAppSpringMain.<clinit>(JamesAppSpringMain.java:34)
jvm 1    |  at java.lang.Class.forName0(Native Method)
jvm 1    |  at java.lang.Class.forName(Class.java:186)
jvm 1    |  at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:147)
jvm 1    |  at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:485)
jvm 1    | log4j:ERROR Either File or DatePattern options are not set for appender [FILE].
jvm 1    | INFO  01:04:33,381 | org.apache.james.container.spring.context.JamesServerApplicationContext | Refreshing org.apache.james.container.spring.context.JamesServerApplicationContext@1f5d386: startup date [Thu Aug 16 01:04:33 PDT 2012]; 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    | log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
jvm 1    | INFO  01:04:38,359 | org.apache.james.container.spring.context.JamesServerApplicationContext | Bean 'logprovider' of type [class org.apache.james.container.spring.lifecycle.LogProviderImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
jvm 1    | INFO  01:04:39,987 | james.mailrepositorystore | JamesMailStore init...
jvm 1    | INFO  01:04:40,026 | james.mailrepositorystore | Registering Repository instance of class org.apache.james.mailrepository.file.FileMailRepository to handle file protocol requests for repositories with key file
jvm 1    | INFO  01:04:40,026 | james.mailrepositorystore | Registering Repository instance of class org.apache.james.mailrepository.jdbc.JDBCMailRepository to handle db protocol requests for repositories with key db
jvm 1    | INFO  01:04:40,027 | james.mailrepositorystore | Registering Repository instance of class org.apache.james.mailrepository.jdbc.JDBCMailRepository to handle dbfile protocol requests for repositories with key dbfile
jvm 1    | INFO  01:04:40,027 | james.mailrepositorystore | Registering Repository instance of class org.apache.james.mailrepository.file.MBoxMailRepository to handle mbox protocol requests for repositories with key mbox
jvm 1    | INFO  01:04:41,791 | james.dnsservice | Autodiscovery is enabled - trying to discover your system's DNS Servers
jvm 1    | INFO  01:04:41,821 | james.dnsservice | Adding autodiscovered server 127.0.0.1
jvm 1    | INFO  01:04:41,822 | james.dnsservice | Adding autodiscovered search path bounceme.net.
jvm 1    | INFO  01:04:41,833 | james.dnsservice | DNS Server is: 127.0.0.1
jvm 1    | INFO  01:04:41,870 | james.dnsservice | Registered cache, resolver and search paths as DNSJava defaults
jvm 1    | 54  James  WARN   [WrapperSimpleAppMain] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'James', root URL [file:/home/thufir/apache-james-3.0-beta4/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  01:04:43,208 | james.domainlist | Set autodetect to: true
jvm 1    | INFO  01:04:43,216 | james.domainlist | Set autodetectIP to: true
jvm 1    | 156  James  INFO   [WrapperSimpleAppMain] openjpa.Runtime - Starting OpenJPA 2.1.0
jvm 1    | 368  James  INFO   [WrapperSimpleAppMain] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DerbyDictionary".
jvm 1    | 7087  James  INFO   [WrapperSimpleAppMain] openjpa.Runtime - The Entity "org.apache.james.domainlist.jpa.model.JPADomain" was enhanced at level "2", but the current level of enhancement is "1,055,128". 
jvm 1    | 7094  James  INFO   [WrapperSimpleAppMain] openjpa.Runtime - A down level Entity was detected and logged. Please enable RUNTIME trace to see all down level Entities.
jvm 1    | WARN  01:04:51,660 | james.mailetcontext | The specified postmaster address ( postmaster@localhost ) is not a local address.  This is not necessarily a problem, but it does mean that emails addressed to the postmaster will be routed to another server.  For some configurations this may cause problems.
jvm 1    | INFO  01:04:52,153 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:52,214 | james.mailprocessor | Mailet PostmasterAlias instantiated.
jvm 1    | INFO  01:04:52,238 | james.mailprocessor | Matcher RelayLimit=30 instantiated.
jvm 1    | INFO  01:04:52,262 | james.mailprocessor | Mailet Null instantiated.
jvm 1    | INFO  01:04:52,284 | james.mailprocessor | Matcher SMTPAuthSuccessful instantiated.
jvm 1    | INFO  01:04:52,301 | james.mailprocessor | Mailet ToProcessor instantiated.
jvm 1    | INFO  01:04:52,302 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:52,314 | james.mailprocessor | Mailet ToProcessor instantiated.
jvm 1    | INFO  01:04:54,075 | james.mailprocessor | Matcher SMTPAuthSuccessful instantiated.
jvm 1    | INFO  01:04:54,085 | james.mailprocessor | Mailet SetMimeHeader instantiated.
jvm 1    | INFO  01:04:54,094 | james.mailprocessor | Matcher RecipientIsLocal instantiated.
jvm 1    | INFO  01:04:54,103 | james.mailprocessor | Mailet RecipientToLowerCase instantiated.
jvm 1    | INFO  01:04:54,104 | james.mailprocessor | Matcher RecipientIsLocal instantiated.
jvm 1    | INFO  01:04:54,547 | james.mailprocessor | Mailet LocalDelivery instantiated.
jvm 1    | INFO  01:04:54,556 | james.mailprocessor | Matcher HostIsLocal instantiated.
jvm 1    | INFO  01:04:54,558 | james.mailprocessor | Mailet ToProcessor instantiated.
jvm 1    | INFO  01:04:54,558 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:54,621 | james.mailetcontext | maxRetries is larger than total number of attempts specified.  Increasing last delayTime with 19 attempts 
jvm 1    | INFO  01:04:54,621 | james.mailetcontext | Delay of 21600000 msecs is now attempted: 20 times
jvm 1    | INFO  01:04:54,696 | james.mailprocessor | Mailet RemoteDelivery instantiated.
jvm 1    | INFO  01:04:56,336 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:56,387 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentObjectRepository Store
jvm 1    | INFO  01:04:56,390 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentObjectRepository opened in ../var/mail/error
jvm 1    | INFO  01:04:56,392 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentStreamRepository Store
jvm 1    | INFO  01:04:56,393 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentStreamRepository opened in ../var/mail/error
jvm 1    | INFO  01:04:56,395 | james.mailrepositorystore | added repository: file://var/mail/error/->org.apache.james.mailrepository.file.FileMailRepository
jvm 1    | INFO  01:04:56,395 | james.mailprocessor | Mailet ToRepository instantiated.
jvm 1    | INFO  01:04:56,801 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:56,806 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentObjectRepository Store
jvm 1    | INFO  01:04:56,807 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentObjectRepository opened in ../var/mail/spam
jvm 1    | INFO  01:04:56,808 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentStreamRepository Store
jvm 1    | INFO  01:04:56,808 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentStreamRepository opened in ../var/mail/spam
jvm 1    | INFO  01:04:56,809 | james.mailrepositorystore | added repository: file://var/mail/spam/->org.apache.james.mailrepository.file.FileMailRepository
jvm 1    | INFO  01:04:56,809 | james.mailprocessor | Mailet ToRepository instantiated.
jvm 1    | INFO  01:04:57,180 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:57,183 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentObjectRepository Store
jvm 1    | INFO  01:04:57,183 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentObjectRepository opened in ../var/mail/address-error
jvm 1    | INFO  01:04:57,184 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentStreamRepository Store
jvm 1    | INFO  01:04:57,184 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentStreamRepository opened in ../var/mail/address-error
jvm 1    | INFO  01:04:57,185 | james.mailrepositorystore | added repository: file://var/mail/address-error/->org.apache.james.mailrepository.file.FileMailRepository
jvm 1    | INFO  01:04:57,185 | james.mailprocessor | Mailet ToRepository instantiated.
jvm 1    | INFO  01:04:57,633 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:57,636 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentObjectRepository Store
jvm 1    | INFO  01:04:57,636 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentObjectRepository opened in ../var/mail/relay-denied
jvm 1    | INFO  01:04:57,637 | james.mailrepositorystore | Init org.apache.james.repository.file.FilePersistentStreamRepository Store
jvm 1    | INFO  01:04:57,637 | james.mailrepositorystore | org.apache.james.repository.file.FilePersistentStreamRepository opened in ../var/mail/relay-denied
jvm 1    | INFO  01:04:57,637 | james.mailrepositorystore | added repository: file://var/mail/relay-denied/->org.apache.james.mailrepository.file.FileMailRepository
jvm 1    | INFO  01:04:57,638 | james.mailprocessor | Mailet ToRepository instantiated.
jvm 1    | INFO  01:04:57,996 | james.mailprocessor | Matcher All instantiated.
jvm 1    | INFO  01:04:58,043 | james.mailprocessor | Mailet DSNBounce instantiated.
jvm 1    | INFO  01:04:58,398 | james.mailspooler | org.apache.james.mailetcontainer.impl.JamesMailSpooler init...
jvm 1    | INFO  01:04:58,400 | james.mailspooler | org.apache.james.mailetcontainer.impl.JamesMailSpooler uses 20 Thread(s)
jvm 1    | INFO  01:04:58,407 | james.mailspooler | Run org.apache.james.mailetcontainer.impl.JamesMailSpooler: dequeuer-1
jvm 1    | INFO  01:04:58,407 | james.mailspooler | Queue=MailQueue:spool
jvm 1    | INFO  01:04:58,423 | james.mailspooler | Run org.apache.james.mailetcontainer.impl.JamesMailSpooler: dequeuer-2
jvm 1    | INFO  01:04:58,423 | james.mailspooler | Queue=MailQueue:spool
jvm 1    | INFO  01:04:58,577 | james.fetchmail | FetchMail Disabled
jvm 1    | INFO  01:04:58,807 | james.smtpserver | SMTP Service bound to: 0.0.0.0:25
jvm 1    | INFO  01:04:58,808 | james.smtpserver | SMTP Service is running on: dur.bounceme.net
jvm 1    | INFO  01:04:58,808 | james.smtpserver | SMTP Service handler hello name is: dur.bounceme.net
jvm 1    | INFO  01:04:58,809 | james.smtpserver | SMTP Service handler connection timeout is: 360
jvm 1    | INFO  01:04:58,809 | james.smtpserver | SMTP Service connection backlog is: 200
jvm 1    | INFO  01:04:58,810 | james.smtpserver | This SMTP server requires authentication.
jvm 1    | INFO  01:04:58,810 | james.smtpserver | No maximum message size is enforced for this server.
jvm 1    | INFO  01:05:00,105 | james.mailspooler | org.apache.james.mailetcontainer.impl.JamesMailSpooler dispose...
jvm 1    | INFO  01:05:00,110 | james.mailspooler | Stop org.apache.james.mailetcontainer.impl.JamesMailSpooler: dequeuer-2
jvm 1    | INFO  01:05:00,113 | james.mailspooler | org.apache.james.mailetcontainer.impl.JamesMailSpooler thread shutdown completed.
jvm 1    | INFO  01:05:00,112 | james.mailspooler | Stop org.apache.james.mailetcontainer.impl.JamesMailSpooler: dequeuer-1
jvm 1    | 
jvm 1    | WrapperSimpleApp: Encountered an error running main: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smtpserver': Invocation of init method failed; nested exception is org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:25
jvm 1    | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smtpserver': Invocation of init method failed; nested exception is org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:25
jvm 1    |  at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)
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:1448)
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:294)
jvm 1    |  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
jvm 1    |  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
jvm 1    |  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
jvm 1    |  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
jvm 1    |  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
jvm 1    |  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
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.context.JamesServerApplicationContext.<init>(JamesServerApplicationContext.java:39)
jvm 1    |  at org.apache.james.app.spring.JamesAppSpringMain.init(JamesAppSpringMain.java:61)
jvm 1    |  at org.apache.james.app.spring.JamesAppSpringMain.main(JamesAppSpringMain.java:42)
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:679)
jvm 1    | Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:25
jvm 1    |  at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:298)
jvm 1    |  at org.apache.james.protocols.netty.AbstractAsyncServer.bind(AbstractAsyncServer.java:101)
jvm 1    |  at org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.init(AbstractConfigurableAsyncServer.java:274)
jvm 1    |  at org.apache.james.protocols.lib.netty.AbstractServerFactory.init(AbstractServerFactory.java:75)
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:346)
jvm 1    |  at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
jvm 1    |  at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
jvm 1    |  ... 22 more
jvm 1    | Caused by: java.net.SocketException: Permission denied
jvm 1    |  at sun.nio.ch.Net.bind(Native Method)
jvm 1    |  at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
jvm 1    |  at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
jvm 1    |  at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:140)
jvm 1    |  at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:92)
jvm 1    |  at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:66)
jvm 1    |  at org.jboss.netty.channel.Channels.bind(Channels.java:462)
jvm 1    |  at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:186)
jvm 1    |  at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:343)
jvm 1    |  at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:170)
jvm 1    |  at org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:77)
jvm 1    |  at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:137)
jvm 1    |  at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:85)
jvm 1    |  at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:277)
jvm 1    |  ... 32 more
wrapper  | <-- Wrapper Stopped
thufir@dur:~/apache-james-3.0-beta4$ 

配置文件(不适合):

https://gist.github.com/3368324

最佳答案

Most UNIX systems require superuser privileges to open sockets below 1024, which includes the IANA-standard SMTP (on port 25), POP3 (on port 110) and IMAP4 (on port 143). These default ports can be changed in the conf file (read for pop3, smtp and imap4. Obviously, you would then need to reconfigure your clients. This may not be an option if you want to receive mail from external mail servers.

此文本来自 james 安装指南,找到 here 。您是否尝试过以 root 用户身份运行 james 来尝试绑定(bind)到端口 25?试试这个:sudo ./james start。如果这似乎不起作用,您也许可以在各自的配置文件中更改各个服务的端口:smtpserver.conf for smtp,您可能会感兴趣,因为您正在尝试使用smtp 服务器。

[编辑]:您可以在任何标准文本编辑器中打开配置文件,如 nano、vi、emacs、gedit 等...

[编辑#2]:您是否拥有运行 james 所需的正确 java 实现?来自安装指南:

James requires a Java Runtime Environment. Java version 1.5 or higher is required to run the James application. The exact JREs available depend on the platform. In addition, the environment variable JAVA_HOME should be set to the JRE home directory before running James.

If you run JDK7, James will not start due to a bug in JAXB. As temporary workaround, you can download the latest 2.1 version of JAXB from http://jaxb.java.net/2.1.13/JAXB2_20100510.jar and copy the extracted jaxb-impl.jar into conf/lib.

James 3.0 has been successfully tested on OpenJDK, Sun JDK and IBM JDK

如果我是你,我会选择下载 OpenJDK 1.6 版并看看它会去哪里。作为旁注,您是否尝试过使用./james help,看看那里是否有任何帮助?此外,请尝试附加 james 可能在您的问题中生成的任何日志文件,以帮助我们进一步检查问题。

关于linux - 连接被拒绝 : how to configure apache james for localhost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11981867/

相关文章:

sleep 和循环期间的 PHP 内存使用情况

php - 使用 php email() 发送的电子邮件是否显示在已发送文件夹中?

excel - 验证在 Outlook 全局地址列表中找到的电子邮件地址的 VBA 代码

ios - 点击文本字段中的电子邮件地址时激活 iOS 电子邮件应用程序

linux - 在无限循环过程中删除打开的文件

linux - 如何在未 checkout 的分支上应用 git 补丁?

regex - 在 Linux 中附加到带有 "sed"的文本文件

angularjs - 为我的 angularJS Web 应用程序提供静态内容、nodeJS 还是 apache?

java - JTextField - 将边框重置为系统默认值

java - 如何在 Apache 访问日志中包含精确到毫秒的时间格式