一、准备工作
1.Jdk 1.5
试过用1.6,但启动james失败,最好用1.5。
另外别忘记在“环境变量”里配置。
2.Xampp
下载完成后,确定mysql 是否能用,Tomcat 是否能启动等。
下载地址:http://www.apachefriends.org/zh_cn/xampp-windows.html
3.Claros intouch2.1
下载地址:http://www.claros.org/web/download.do
4.Apache James 2.3.2
下载地址:http://james.apache.org/download.cgi#Apache_James_2.3.2_is_the_stable_version
二、Apache James 2.3.2 Conf.xml 配置
1. 确定JDK1.5 安装成功
2.解压 Apache James 2.3.2 .zip 压缩包
3.在.../apache-james-2.3.2,下运行 build.bat ,最好在dos下运行,这样出错时,可查看信息,也可以知道是否成功。
如果 成功 会在dos 里提示成功,并生成两个文件夹(1) dist (2) build
4. 修改 ...\apache-james-2.3.2\dist\james-2.3.2\apps\james\SAR-INF ,里的 Conf.xml 文件
(1) 改邮件服务器名
1 <postmaster>Postmaster@mail.com</postmaster>
2 <servernames autodetect="false" autodetectIP="false">
3 <servername>mail.com</servername>
4 </servernames>
(2) 修改dns
1 <dnsserver>
2 <servers>
3 <server>mail.com</server>
4 <server>smtp.163.com</server>
5 <server>mail.126.com</server>
6 </servers>
7 <!-- 修改自动探测为false 如果为true 可能在开发时出现异常 -->
8 <autodiscover>false</autodiscover>
9 <authoritative>false</authoritative>
10 <maxcachesize>50000</maxcachesize>
11</dnsserver>
(3) 注释以下配置
1<mailet match="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">
2 <processor> relay-denied </processor>
3 <notice>550 - Requested action not taken: relaying denied</notice>
4</mailet>
(4) 开启Smtp 身份验证
1<authRequired>true</authRequired>
(5)修改远程管理
1 <remotemanager enabled="true">
2 <port>4555</port>
3 <handler>
4 <helloName autodetect="true">myMailServer</helloName>
5 <administrator_accounts>
6 <account login="root" password="root"/> <!--用户名、密码 -->
7 </administrator_accounts>
8 <connectiontimeout>60000</connectiontimeout>
9 <prompt>welcome to my Sever></prompt>
10 </handler>
11 </remotemanager>
(6) 修改 pop3 、sntp、nntp 服务
1 <pop3server enabled="true">
2 <port>110</port>
3 <handler>
4 <helloName autodetect="true">myMailServer</helloName>
5 <connectiontimeout>120000</connectiontimeout>
6 </handler>
7</pop3server>
8 <smtpserver enabled="true">
9 <port>25</port>
10 <handler>
11 <helloName autodetect="true">myMailServer</helloName>
12 <connectiontimeout>360000</connectiontimeout>
13 <authRequired>true</authRequired>
14 <authorizedAddresses>127.0.0.0/8</authorizedAddresses>
15 <maxmessagesize>0</maxmessagesize>
16 </handler>
17 </smtpserver>
18 <nntpserver enabled="true">
19 <port>119</port>
20 <handler>
21 <helloName autodetect="true">myMailServer</helloName>
22 <connectiontimeout>120000</connectiontimeout>
23 <authRequired>false</authRequired>
24 </handler>
25 </nntpserver>
5. 当以上配置完成,就可以创建邮箱用户、密码
(1) 打开文件夹 .../apache-james-2.3.2\dist\james-2.3.2\bin ,运行 bin.bat ,是否会出现以下信息,如有证明 服务成功打开
有时会错误,有可能是端口被占用,所以打开前请检查端口
(2).当服务打开时,再打开dos ,输入:telnet localhost 4555
-->然后再输入 用户名、密码
输入help , 查看建用户名、密码 格式
输入:adduser 258 123456
到此邮件服务器已搭建成功
扫码关注公众号: ,回复:claros ,即可免费下载:claros-intouch-2.2-beta