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郵件服務器了