1. 下载ApacheJames-2.3.2.(下载地址 http://james.apache.org/download.cgi#Apache_James_2.3.2_is_the_stable_version)
2. 解压到*\James-2.3.2文件夹下
3. 设置好jdk环境变量
4. 进入.\james-2.3.2\bin,双击运行run.bat文件 。jamas服务就启动了。然后关闭运行窗口。
5. 进入 .\james-2.3.2\apps\james\SAR-INF\ 找到config.xml文件,对该文件进行编辑
5.1 将 :(52行左右)
<postmaster>Postmaster@localhost</postmaster>
修改为 :
<postmaster>Postmaster@自定义后缀名(如 mysoft.com)</postmaster>
5.2 将 :(71行左右)<servernames autodetect="true"autodetectIP="true">
<!-- CONFIRM? -->
<servername>localhost</servername>
</servernames>
修改为 :
<servernamesautodetect="false" autodetectIP="false">
<!-- CONFIRM? -->
<servername>自定义后缀名(如mysoft.com)</servername>
</servernames>
5.3 将 :(551行左右)
<mailetmatch="RemoteAddrNotInNetwork=127.0.0.1" class="ToProcessor">
<processor> relay-denied </processor>
<notice>550 - Requestedaction not taken: relaying denied</notice>
</mailet>
以上部分整体注释掉
5.4 将 :(896行左右)
<authRequired>true</authRequired>的注释去掉,使其生效
6. 重复第4步,启动james服务,然后打开cmd,在cmd中输入命令
telnet localhost 4555 ,然后在提示下输入默认的用户名:root ,密码:root
6.1 添加用户
输入:adduser username password 添加新的用户,例如 :adduser service 123456
7.客户端
客户端
在C:\WINDOWS\system32\drivers\etc\hosts中,添加服务器的域名解析,例如,服务器ip为:192.168.1.19 ,config.xml设置的后缀为mysoft.com,则在hosts文件中要加入一行:
192.168.1.19 mysoft.com
这样在客户端就可以访问服务器上面的james邮件服务器了