AppFuse搭建本地邮件服务器



  • 邮件服务器选用apache-james-2.3.2,官网http://james.apache.org/下载解压即可;
  • 运行\james-2.3.2\bin\run.bat,出现如下界面:
Text代码AppFuse搭建本地邮件服务器
  1. D:\ProgramFiles\james-2.3.2\bin>run.bat
  2. UsingPHOENIX_HOME:D:\ProgramFiles\james-2.3.2
  3. UsingPHOENIX_TMPDIR:D:\ProgramFiles\james-2.3.2\temp
  4. UsingJAVA_HOME:D:\ProgramFiles\Java\jdk1.5.0_22
  5. Phoenix4.2
  6. JamesMailServer2.3.2
  7. RemoteManagerServicestartedplain:4555
  8. POP3Servicestartedplain:110
  9. SMTPServicestartedplain:25
  10. NNTPServicestartedplain:119
  11. FetchMailDisabled

  • Telnet进入邮件管理界面,命令:
Text代码AppFuse搭建本地邮件服务器
  1. telnetlocalhost4555

  • 正常的话出现输入账号密码界面,默认账号/密码为root/root:
Text代码AppFuse搭建本地邮件服务器
  1. JAMESRemoteAdministrationTool2.3.2
  2. Pleaseenteryourloginandpassword
  3. Loginid:
  4. root
  5. Password:
  6. root
  7. Welcomeroot.HELPforalistofcommands

  • 添加邮件用户test,命令:adduser [username] [password]
Text代码AppFuse搭建本地邮件服务器
  1. addusertesttest
  2. Usertestadded

  • 根据需要修改appfuse应用/myapp/web/WEB-INF/classes/mail.properties配置文件
Text代码AppFuse搭建本地邮件服务器
  1. #Thispropertiesfileisusedtoconfiguremailsettingsin
  2. #/WEB-INF/applicationContext-service.xml.
  3. mail.default.from=AppFuse<[email protected]>
  4. mail.debug=false
  5. mail.transport.protocol=smtp
  6. mail.host=localhost
  7. mail.username=
  8. mail.password=

Sql代码AppFuse搭建本地邮件服务器
  1. updatemydb.app_usersetemail='[email protected]'whereusername='tomcat';

  • 启动服务,发送密码提示邮件


AppFuse搭建本地邮件服务器

  • 配置foxmail客户端接收邮件:

  • AppFuse搭建本地邮件服务器

  • AppFuse搭建本地邮件服务器
  • 发送外网邮件,经测试163邮箱可用,QQ等其它邮箱无法接收,有待研究apache james:
Sql代码AppFuse搭建本地邮件服务器
  1. updatemydb.app_usersetemail='[email protected]'whereusername='tomcat';

  • AppFuse搭建本地邮件服务器

  • 至此无需对apache james做任何配置,就搭建好了满足appfuse测试的邮件服务器。